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

Clarification of code sample licensing #689

Open
parlough opened this issue May 8, 2018 · 11 comments
Open

Clarification of code sample licensing #689

parlough opened this issue May 8, 2018 · 11 comments
Labels
FLARD This is gathering dust help wanted We would appreciate contributions input wanted We would like to hear your opinion meta Issues/Discussions about the docs backend

Comments

@parlough
Copy link
Contributor

parlough commented May 8, 2018

From the looks of it, even code snippets are licensed under CC-BY-SA-4.0 which is not meant for code, and has some implications that basically makes a lot of plugins which may have taken code from the docs break the license.

The code on the docs is meant for developers to use and not have to be worried about meeting some license requirements. I honestly think we should release all code samples/snippets on the docs under something like the Unlicense as developers shouldn't have to worry about including our copyright notice/MIT license for some code samples they took from our documentation. If this is not desired or too volatile, the MIT license will work as well.

Too avoid concerns with relicensing and getting agreements from everyone, I will be happy to rewrite every code sample/snippet from scratch(which has the added benefit of catching outdated code).

This will also require us to include clarification on what is licensed under what and include the new license. I would handle that in my rewrite PR.

So I guess from here, I just need clarification on if the code's license is already MIT or something similar, and if not - what license we should go with for the code from here. Unlicense, MIT, custom license, your favorite permissive license goes here?

@parlough parlough changed the title Clarify license for the code samples/snippets or work to change it to MIT Clarification of code sample licensing May 8, 2018
@parlough parlough added the input wanted We would like to hear your opinion label May 8, 2018
@parlough parlough self-assigned this May 8, 2018
@ST-DDT
Copy link
Member

ST-DDT commented May 8, 2018

I'm willing to help you with this.

If we rewrite code examples we should think of a way to detect scripts that no longer compile after a api update. So they won't get outdated again. Maybe we can do it as part of #690

@Inscrutable
Copy link
Member

It may seem odd, but SpongeDocs is effectively a textbook and the code examples are treated as such. They should be able to be re-used without license implications, under some interpretation of "Fair Use" (the right to use portions of copyrighted materials without permission for purposes of education, commentary, or parody). The usual acknowledgement for a written reference would apply in this case. i.e.:

"Code examples contained in SpongeDocs are provided as starting points for development, and are necessarily incomplete. We permit the use of these code examples in Sponge plugins under Fair Use, without further license restrictions, and we simply ask that SpongeDocs be acknowledged when this is the case." (stronger wording than "ask" may be needed).

That said, it would be preferable to have it all under MIT so there is no confusion between the examples and the licensing of SpongeAPI itself.

@Inscrutable Inscrutable added the meta Issues/Discussions about the docs backend label May 9, 2018
@parlough
Copy link
Contributor Author

Say we relicense the code examples under the MIT license, should we still include this fair use statement? I feel it still has value and our stance is still the same.

@Inscrutable
Copy link
Member

Something like "As SpongeDocs is an educational resource, we interpret Fair Use of the code examples in SpongeDocs to include their use in Sponge plugins of any kind, without license restrictions. Please acknowledge SpongeDocs when this is the case" and maybe an example:
"Some parts of this plugin were developed from examples found in the SpongeDocs [Link]." ?

@Inscrutable
Copy link
Member

Actually, if you slap the MIT license on everything, Fair Use might have to go out the window anyway. I'm not sure which trumps which; Fair Use is a looser standard and MIT is explicit. However, as the license holder, you can interpret and/or modify it for yourself.

@parlough
Copy link
Contributor Author

parlough commented May 11, 2018

You've got a good point. In a majority of cases people will use it as an educational basis, rather than directly copying. It's about learning. How about something like:

"""
While the code examples are licensed under the MIT license, the documentation is meant to be used as an educational resource and not to be directly copied, and if used as such we will interpret the usage as fair use. If your usage is more extensive, beyond just background knowledge, please fulfill the normal requirements of the MIT license.
"""

@ryantheleach
Copy link
Contributor

ryantheleach commented May 11, 2018

Explicitly licensing the code sections as MIT, would imply people can't use them without also releasing their plugins as MIT.

I think relegating it to fair use for educational use is fine as-is, as it protects anyone using it in plugins for any purposes, whilst if someone copied every code example out for sake of making a competing Sponge Docs without abiding by the Creative Commons licensing already applying to the docs the code examples would still be subject to Creative Commons.

Not to mention getting permission from every contributor to the code examples.

tldr: It works, don't touch it.

@parlough
Copy link
Contributor Author

parlough commented May 11, 2018

@ryantheleach MIT license does not require releasing your source code under MIT license or even releasing your source code at all, but instead only that the license and copyright notices are included in your distributions. While the CC-BY-SA-4.0 license which it is currently licensed under does require releasing your work and modifications under the same license due to the share-alike portion which is quite problematic. Sure we can claim it is education fair use, but doing so along a less worrying license for code(MIT) will work better, especially if they desire to copy larger portions of code.

@dualspiral
Copy link
Contributor

dualspiral commented May 11, 2018

I want to preface this statement, and add to this discussion that none of us are lawyers and cannot give an official legal opinion. That said, I want to try to add some of my understanding into this.

I think relegating it to fair use for educational use is fine as-is

Short version: This should not be assumed to be fine.

Long answer: You have to be careful with the "fair use" doctrine. Fair use is a national thing, not a global thing. Just because something constitutes fair use in Australia doesn't mean it constitutes fair use in the US or the UK. In fact, under UK law, if someone used the code in their plugin, I don't think (note, not a lawyer) that's not counted as fair use (it defines non-commercial research or private study, neither of which apply to a closed source plugin that would be provided publically). Bear in mind while you might interpret such use as fair use, doesn't mean that I would interpret something as fair use. It might not exist in other countries. It is an "after the fact" statement, something that is a defence in court. Remember, the copyright is owned by the person who wrote the code, so the juristriction of the copyright is their country where this fair use may not exist.

Being explicit is a better idea, but I'm not sure that stock MIT is a good idea either because of the copyright statement.

I suggest continuing to use the CC-BY-SA-4.0 with an exception for reuse of code in Sponge plugins, where we grant the right to use the code with attribution. Remember, while these are code blocks, they are intended as documentation, not as a complete code. Licensing and enforcing the MIT requirement for the copyright statement just seems like a sledgehammer to crack a walnut.

Yep, probably will have to rewrite code samples unless a contributor agrees to that, as I would (though I agree to my code samples in the docs to be relicenced under permissive terms anyway, don't feel like you need to change anything I have written for this). However, don't just slap the MIT licence on this for the sake of. I doubt people will take notice of it anyway.

@parlough
Copy link
Contributor Author

Whether it is MIT license, some other license, a custom license, or even an exception rewritten examples is pretty much a must.

My goal is to be explicit and if we just want to flat out say something along the lines of

"""
The code examples are meant to be instructional only but if you feel you must use them in your plugins, we provide an exception from the normal license, where you can use the code freely in Sponge plugins.
"""

that works for me and explicitly does not require them to meet the license's requirements for any code sample, which is what developers are probably doing already and to be honest what I think should happen.

I will continue my work rewriting examples(outside of dualspiral's or anyone else who wants to permission) and will slap on whatever license or exemption people decide on in the end once I finish.

@Inscrutable
Copy link
Member

If you end up as the sole contributor to the code examples, then you should be free to add whatever caveats you wish to your licensing, including a statement defining what constitutes Fair Use in these circumstances. Subsequent contributions would then implicitly follow this convention. However, you'd still need to consider whether prior work also needed to be acknowledged, and licenses again rear their ugly heads.

Certainly, @dualspiral is correct, we'd need a lawyers argument to add weight - but even then, the definitions of Fair Use are very fuzzy in most systems. IANAL. However, I will opine this: the scope and intent of the docs, as well as their open-source, non-profit educational nature, lends weight to our arguments about Fair Use. It is arguable that the code examples were always intended as a starting point for development, without restrictions, and they are provided in incomplete fragments that require assembly, not in executable form. If we explicitly include what we believe to be Fair Use we may avoid other licensing boondoggles. Otherwise it gets complicated quickly.

In any case, the only folk that could challenge the Fair Use interpretation would be previous contributors, and I have the reasonable expectation that they wanted the code examples to be used freely, with simple acknowledgement. Is there a better way of doing this?

@Inscrutable Inscrutable added the FLARD This is gathering dust label Mar 27, 2019
@Inscrutable Inscrutable added the help wanted We would appreciate contributions label Apr 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FLARD This is gathering dust help wanted We would appreciate contributions input wanted We would like to hear your opinion meta Issues/Discussions about the docs backend
Projects
None yet
Development

No branches or pull requests

5 participants