What should replace intra-file license headers in source files in judrisdictions which necessitate it?

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: 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 [...] 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. 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: Separating every relevant file into a directory containing solely the source file and a duplicate of the license, or header-equivalent reference to it. 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.

Apr 10, 2025 - 18:11
 0
What should replace intra-file license headers in source files in judrisdictions which necessitate it?
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.