Storing License metadata in methods?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Storing License metadata in methods?

Michael van der Gulik-2
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/

Reply | Threaded
Open this post in threaded view
|

Re: Storing License metadata in methods?

Damien Pollet
what about pragmas intead of comments ?

On 11/01/2008, Michael van der Gulik <[hidden email]> 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

Reply | Threaded
Open this post in threaded view
|

re: Storing License metadata in methods?

ccrraaiigg
In reply to this post by Michael van der Gulik-2

Hi Michael--

      For what it's worth, the Naiad module system design I am
implementing stores license information for each version of each method,
class, category, and module, separately from each described object. (You
could also go to a finer grain of source code characters and compiled
method instructions, but that seems like overkill to me.) I think
storing that information "in band" in source code is more likely to
become untenable.


      thanks,

-C

--
Craig Latta
improvisational musical informaticist
www.netjam.org
Smalltalkers do: [:it | All with: Class, (And love: it)]