Storing License metadata in methods?
Michael van der Gulik
mikevdg at gmail.com
Fri Jan 11 09:54:43 UTC 2008
I'm currently re-writing some tools for use with namespaces (
http://gulik.pbwiki.com/Namespaces). Ideally, I'd like a version of the
Kernel-* and Collections-* categories that are licensed under the MIT
license. This is unlikely to happen unless I rewrite them (hmm...). Failing
I want to modify some tools to store license data with each method, so that
I can avoid and rewrite methods which are under disagreeable licenses.
License data can be stored at many levels of granularity - package, class,
method, method change. I think adding it at the "method change" level is
what we need - I want my change to a method to be licensed under MIT even
though the original might be one of the other licenses.
To store license metadata with each method change, I think one approach
would be to have the tools automatically add comments to the end of each
method such as:
"Answer another instance just like the receiver. Subclasses typically
override postCopy; they typically do not override shallowCopy."
^self shallowCopy postCopy
"ajh 8/18/2001 21:25 Original licensed under SqueakL."
"mvdg 11/01/2008 22:41 Change licensed under MIT."
"abc 14/03/2008 03:14 Original relicensed under Apache 2.0."
The user would then have a preference which shows which license they release
any changes under. The actual changes would be visible in the versions
browser because the change would occur in the same commit as the added
To implement this, the .changes file would need to be rewritten with all the
extra licensing info, and the source pointers would all need updating.
A special version of the browser could be made which hides only the code of
methods which have been written under a disagreeable license so that they
can be rewritten without seeing the original source code.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev