Storing License metadata in methods?

Damien Pollet damien.pollet at gmail.com
Fri Jan 11 13:53:39 UTC 2008


what about pragmas intead of comments ?

On 11/01/2008, Michael van der Gulik <mikevdg at gmail.com> wrote:
> Hi all.
>
> 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 that...
>
> 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:
>
> ------
> copy
>     "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
> comment.
>
> Thoughts?
>
> 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.
>
> Gulik.
>
> --
> http://people.squeakfoundation.org/person/mikevdg
> http://gulik.pbwiki.com/
>
>
>


-- 
Damien Pollet
type less, do more [ | ] http://typo.cdlm.fasmz.org



More information about the Squeak-dev mailing list