Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include copyright licenses in bundled distributions #432

Merged
merged 2 commits into from
Jun 16, 2020
Merged

Conversation

Avaq
Copy link
Member

@Avaq Avaq commented Jun 14, 2020

Fluture distributes several bundles which include its dependencies.

Each of these dependencies are licensed under the MIT license (thank you @davidchambers), so I am allowed to redistribute them.

There is one condition though, and that is that I include the copyright notice in these distributions, which I haven't (sorry @davidchambers).

This PR rectifies that.

@Avaq Avaq requested review from davidchambers and dicearr June 14, 2020 11:41
@Avaq Avaq self-assigned this Jun 14, 2020
@codecov

This comment has been minimized.

Comment on lines +11 to +13
return Array.from(new Set(deps.concat(deps.flatMap(dependency => (
dependencies(require(`${dependency}/package.json`))
)))));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this array be sorted in some way?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see why. But I'm considering listing them out myself instead of generating them like this, in which case I can choose any order I'd like.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like to rely on the internal ordering of unordered data structures. Even if the ordering is deterministic, it may appear arbitrary. Additionally, the relative ordering of elements may change when an element is added to the set, which could result in noisy diffs.

I don't know whether these concerns apply in this particular situation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it matters for the licenses to be listed in arbitrary order.

@Avaq
Copy link
Member Author

Avaq commented Jun 14, 2020

@davidchambers How do you view this change at the conceptual level?

@Avaq
Copy link
Member Author

Avaq commented Jun 14, 2020

I'm asking because the license conditions for JavaScript libraries are very commonly ignored without consequences. Just think of all the WebPack -created web apps that bundle thousands of packages with various open source licenses and distribute those bundles to thousands of computers without any kind of attribution. Such is the nature of the web.

The lines also get fairly blurry fairly quickly. Imagine I don't bundle my dependencies, but host them as-is on my web server. This might become more common in the future as HTTP2 and ESM gain traction. The license file is neatly hosted as well, alongside the JavaScript. But a user agent only ever fetches the JavaScript file, because index.js contains import S from './web_modules/sanctuary.js'. Now did I do enough as a developer to adhere to the license terms?

I'm just curious about your views and opinions on this matter.

@davidchambers
Copy link
Contributor

How do you view this change at the conceptual level?

Very positively. You are doing what you can to respect the licences, which is laudable. :)

@Avaq Avaq requested a review from davidchambers June 15, 2020 15:02
@@ -1,5 +1,5 @@
The MIT License (MIT)
Copyright (c) 2018 Aldwin Vlasblom
Copyright (c) 2020 Aldwin Vlasblom
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that this project does not yet use sanctuary-scripts. ;)

@Avaq Avaq merged commit 1c4f198 into master Jun 16, 2020
@Avaq Avaq deleted the avaq/licenses branch June 16, 2020 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants