Svelte: License statement on generated code?

Created on 30 Nov 2016  Â·  4Comments  Â·  Source: sveltejs/svelte

Can @Rich-Harris confirm that the generated code would not fall under the MIT license of this project?

Ideally I would like to see top-level header blocks such as https://github.com/sveltejs/svelte/blob/master/compiler/generate/index.js#L385-L476 marked with a public license such as CC0 which should be valid in places such as Germany ref: http://opensource.stackexchange.com/questions/4136/whats-the-status-of-cc0-under-the-eyes-of-german-law/4214#4214.

An additional improvement would be to move this and any other verbatim "header blocks" to a referenced external dependency.

meta question

Most helpful comment

This is kind of an interesting philosophical question. Normally the author of the code determines what license gets attached to it – if you use Svelte to generate code, who is the author of it? Presumably you are, since it's just a tool like any other (if you used autocomplete in your editor while typing code, you wouldn't consider the creator of the autocompletion logic to have any authorial claim – this is an extreme version of the same thing).

So, yeah – I would assume that @AfraidKnot has the right idea, and generated code doesn't fall under the MIT License (though it's complicated by the fact that it's generated from snippets that are covered under MIT). IANAL though, I'd be really interested to hear from anyone with a better understanding of this stuff.

All 4 comments

Many compilers let the developer set the license of the generated code as they do with the input source code. I.E. the owners of the source have full control over the generated output. I do agree with @brodybits that a clarification or statement indicating the licensing of the generated code is needed.

This is kind of an interesting philosophical question. Normally the author of the code determines what license gets attached to it – if you use Svelte to generate code, who is the author of it? Presumably you are, since it's just a tool like any other (if you used autocomplete in your editor while typing code, you wouldn't consider the creator of the autocompletion logic to have any authorial claim – this is an extreme version of the same thing).

So, yeah – I would assume that @AfraidKnot has the right idea, and generated code doesn't fall under the MIT License (though it's complicated by the fact that it's generated from snippets that are covered under MIT). IANAL though, I'd be really interested to hear from anyone with a better understanding of this stuff.

In my opinion, you can see Svelte as part of the compiler. What logic do we use when deciding the license of output generated by a compiler?

Will close this as I don't think there's anything particular Svelte needs to do here — it's basically doing a more extreme version of what Babel does. If anyone with legal expertise knows better and can advise then let us know!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ricardobeat picture ricardobeat  Â·  3Comments

bestguy picture bestguy  Â·  3Comments

mmjmanders picture mmjmanders  Â·  3Comments

Rich-Harris picture Rich-Harris  Â·  3Comments

rob-balfre picture rob-balfre  Â·  3Comments