These days it is very common to use a tool like webpack to concatenate much or all of the Javascript code for a website into a single (often also minified) file. This file may thus contain many chunks of code under different licenses. It seems like the magnet link format would be suitable for this, ala:

// @license 
magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt 
GPL-v3-or-Later
// @source: https://archive.softwareheritage.org/.../blah1.js
[ ... minified code ... ]
// @license-end
// @license 
magnet:?xt=urn:btih:b8999bbaf509c08d127678643c515b9ab0836bae&dn=ISC.txt ISC
// @source: https://archive.softwareheritage.org/.../blah2.js
[ ... more minified code ... ]
// @license-end

LibreJS could then check if every line in a file was enclosed between a license/license-end pair and that all declared licenses are known as free. The whole file would then be accepted or blocked based on this full analysis.

Does this seem like the right format to use in this situation? Would it be very difficult to extend LibreJS to support this use case?

Attachment: signature.asc
Description: PGP signature

Reply via email to