5
Context

Some modern, commonplace markup, data interchange, and programming languages still do not support comments. The most popular of this is standard JSON, [1] but I've encountered it when writing vendor-specific assembly, too. However, some situations appear to necessitate that licenses be included inside the content of the file:

  1. Some licenses, like the Artistic License 1.0: [4]

    You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file [...]

  2. a/332584 answers a question about how to exclude certain files from their repository-wide OSS license because they're not relicensable by the repository controller.

    Its recommended solution is to include the applicable license in the file. [3] Its sole alternative (apparently, to combine the licenses) is nullified by its own criticism of them:

    While legal, this can be confusing, since it's not clear which files originated from which author.

  3. Some national jurisdictions' laws: [2]

    I have to remark that in certain countries license text has to be provided together with the licensed work in order for the license to be valid. For example in Poland linking to external license text is considered an "abusive clause". This is a legal requirement and no license text can subsume it.

Question

Consequently, is there a tried-and-tested workaround for when a license and/or law requires that license (or generic legal) information be stored within a file type which must store it in order to not necessitate a non-standard parser?

My estimation is that there is, and that it was probably realised by a solely FOSS OS distribution. However, I've been unable to locate any. [5]

All I've thought of are:

  1. Separating every relevant file into a directory containing solely the source file and a duplicate of the license, or header-equivalent reference to it.

  2. Including the license reference in the filename.

However, neither of these are trivial endeavours.

Alternatively, is my premise erroneous?


Meta

If this isn't on-topic here, or would better be answered at law.stackexchange or opensource.stackexchange, please transfer it there. I posted this here first because most legal questions about software development posted here appear to remain on-topic here.

4
  • 1
    I don't think we can transfer the question. We have an explicit close reason for questions asking for legal advice. Commented Apr 10 at 17:26
  • 2
    I’m allowing this question to stand because it’s about dealing with a technical limitation. But keep in mind, we aren’t the legal experts. You’ll need to ask a lawyer. You’ll find our licensing experts at our sister site Open Source. Commented Apr 10 at 20:09
  • 1
    Fair enough, @candied_orange. Just beware that we can provide technical workarounds, but we cannot attest to their legal efficacy -- for that you need a lawyer. It might technically work but you still run a very real risk of being sued, and pointing to a Q&A on the internet between you and a bunch of strangers won't hold up in court. Honestly, that goes for the law and open source stacks as well. Commented Apr 10 at 20:17
  • @GregBurghardt is there an echo in here? Commented Apr 10 at 20:34

1 Answer 1

3

Are you sure this is a real problem?

Your example of json is easy, just add an extra property at the top.

But I would do something different for a generic approach. You can change the code which loads the json, (presumably part of the same paackage) to load a different file. Put your change explanation in the top of the code file ("changed to load X.json rather than Y.json") and make a new duplicate + changes data file to load, leaving the original unchanged and unused.

You could even change the file format or loading procedure to filter out the comments.

Or add a preprocessor step on compile to remove all the comments?

So your problem is only a problem if..

  1. The licence specifies you must put a comment in the changed file
  2. The file you want to change is in a format which doesn't support comments
  3. The files isn't a "data file" you can just replace out with an alternative

Given that licences can say anything it's not crazy to imagine a scenario where the licence accidentally prohibits a change. But in this case you could just ask for a change to the licence?

OR. I feel i have to add, given the lack of enforcement of copy-left licences, you could just ignore it and put the comment in somewhere else. Can you really imagine a court deciding against you in such a case?

6
  • 1
    Your description of a “generic approach” leaves me confused. You’re going to notify of copyright in a file that doesn’t have that copyright? An example would probably help a lot. Commented Apr 10 at 20:01
  • Regarding "Given that licences can say anything it's not crazy to imagine a scenario where the licence accidentally prohibits a change. But in this case you could just ask for a change to the licence?", should I conclude that this is advising me to choose licenses that are incompatible with the technologies one intends to utilise? If so, that's sensical. Thanks. Commented Apr 10 at 21:54
  • re generic approach: my assumption is that the package consists of some source code, which allows comments, and some json data files, which dont. You can change the source code to load a different file. put the comment in that code to say "changed to load X instead of Y" and make a new file Y with changed data and no comment. As this new file will not have been modified Commented Apr 11 at 8:47
  • re: asking for a change: My assumption is that you have started altering code which has been licenced to you and then find that the licence prohibits the change you want to make on a technicality like json not allowing comments. In this case you can email the copywrite holder and say "please can you update your licence so I can change json file and put the documentation in a seperate file?" Given that it wasnt their intent to limit the change, they should be happy to make the change Commented Apr 11 at 8:49
  • 1
    .. and indeed v2 of the artistic licence replaces the file header wording with "appropriate documentation" Commented Apr 11 at 8:51

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.