Jython's package caching mechanism roughly extracted

22 views
Skip to first unread message

Frank Wierzbicki

unread,
Jul 13, 2007, 10:56:55 PM7/13/07
to jvm-la...@googlegroups.com, Charles Oliver Nutter
Hi Charles (and jvm-languages),

I while back you had requested that we (the Jython folks) try to
extract out the caching mechanism that Jython uses. I've done a rough
extraction (basically I replaced all of the PyList and other
pythonisms with Java List and other Java-isms and removed any links
into Jython's core. I've dummied out the class representing a
JavaPackage. This is very rough and is in no way threadsafe or for
that matter safe for any purpose :) -- but it does create the cache
files for jars the way Jython does. To try it out check it out from
here:

https://jython.svn.sourceforge.net/svnroot/jython/trunk/sandbox/wierzbicki/packagecache

It has a simple ant file that builds the java classes. It also has
two test directories, one for jython and one for jruby (src/jython and
src/jruby) with a test.py and test.rb. Both test directories contain
an empty "jars" directory. If you put some jars in the "jars"
directory and run the tests a "cachedir" gets generated and cache
files are produced from the jars. I haven't gotten around to testing
the mechanism for actually using the cache -- so that part could be
completely broken, but the cache files produced from the jars are
exactly the same (at least for the handful of jars that I studied) as
those produced by Jython.

-Frank

Charles Oliver Nutter

unread,
Jul 13, 2007, 11:02:28 PM7/13/07
to Frank Wierzbicki, jvm-la...@googlegroups.com
Frank Wierzbicki wrote:
> Hi Charles (and jvm-languages),
>
> I while back you had requested that we (the Jython folks) try to
> extract out the caching mechanism that Jython uses. I've done a rough
> extraction (basically I replaced all of the PyList and other
> pythonisms with Java List and other Java-isms and removed any links
> into Jython's core. I've dummied out the class representing a
> JavaPackage. This is very rough and is in no way threadsafe or for
> that matter safe for any purpose :) -- but it does create the cache
> files for jars the way Jython does. To try it out check it out from
> here:

Frank! Excellent!

This is in a sense the first contribution in code to our common goals.
Perhaps this would be a good time to set up a respository in which to
store such things?

I will have a look at the cache, we would certainly find uses for it.

- Charlie

Frank Wierzbicki

unread,
Jul 13, 2007, 11:33:46 PM7/13/07
to Charles Oliver Nutter, jvm-la...@googlegroups.com
On 7/13/07, Charles Oliver Nutter <charles...@sun.com> wrote:

> Frank! Excellent!
>
> This is in a sense the first contribution in code to our common goals.
> Perhaps this would be a good time to set up a respository in which to
> store such things?

Yes I think it would be great to start such a repository. Even though
I live there and appreciate everything they have done for Jython, I
vote against sourceforge for such a repo :). Are you happy at
codehaus?

> I will have a look at the cache, we would certainly find uses for it.

Great!

-Frank

Charles Oliver Nutter

unread,
Jul 13, 2007, 11:53:33 PM7/13/07
to jvm-la...@googlegroups.com
Frank Wierzbicki wrote:
> On 7/13/07, Charles Oliver Nutter <charles...@sun.com> wrote:
>
>> Frank! Excellent!
>>
>> This is in a sense the first contribution in code to our common goals.
>> Perhaps this would be a good time to set up a respository in which to
>> store such things?
> Yes I think it would be great to start such a repository. Even though
> I live there and appreciate everything they have done for Jython, I
> vote against sourceforge for such a repo :). Are you happy at
> codehaus?

I think Codehaus would be less than ideal, since they have some
licensing restrictions. I'm open to suggestions.

java.net seems like a natural place, though we wouldn't want to use the
built-in bug tracker. But bug tracking wouldn't be the first thing we
need set up, and java.net at least has SVN working well.

Other suggestions?

- Charlie

Frank Wierzbicki

unread,
Jul 13, 2007, 11:58:33 PM7/13/07
to jvm-la...@googlegroups.com
java.net would be fine with me.

>
> Other suggestions?
There is code.google.com -- but I have no experience with them (I have
heard positive things though). They also use svn.

-Frank

John Wilson

unread,
Jul 14, 2007, 3:25:20 AM7/14/07
to jvm-la...@googlegroups.com
On 7/14/07, Charles Oliver Nutter <charles...@sun.com> wrote:
>
> Frank Wierzbicki wrote:
> > On 7/13/07, Charles Oliver Nutter <charles...@sun.com> wrote:
[snip]

> I think Codehaus would be less than ideal, since they have some
> licensing restrictions. I'm open to suggestions.
>
> java.net seems like a natural place, though we wouldn't want to use the
> built-in bug tracker. But bug tracking wouldn't be the first thing we
> need set up, and java.net at least has SVN working well.
>
> Other suggestions?

I use Google http://code.google.com/hosting/ . It's trivial to set the
project up and uptime has been 100% so far. They have a Wiki and a bug
tracker but I have not used either yet.

Hanni recently biled the service so they must be dioing something right:)

John Wilson

Guillaume Laforge

unread,
Jul 14, 2007, 5:06:38 AM7/14/07
to jvm-la...@googlegroups.com
On 7/14/07, Charles Oliver Nutter <charles...@sun.com> wrote:
> [...]

> I think Codehaus would be less than ideal, since they have some
> licensing restrictions. I'm open to suggestions.

What's wrong with Codehaus?
And which licensing restrictions?

--
Guillaume Laforge
Groovy Project Manager
http://glaforge.free.fr/blog/groovy

Charles Oliver Nutter

unread,
Jul 14, 2007, 7:03:09 AM7/14/07
to jvm-la...@googlegroups.com
Guillaume Laforge wrote:
> On 7/14/07, Charles Oliver Nutter <charles...@sun.com> wrote:
>> [...]
>> I think Codehaus would be less than ideal, since they have some
>> licensing restrictions. I'm open to suggestions.
>
> What's wrong with Codehaus?
> And which licensing restrictions?

Codehaus does not allow projects solely licensed under the GPL. No
decisions have been made on what the results of our efforts would use
for a license, but I'd like options to remain open.

And no, I don't want to get into a debate about the GPL :)

- Charlie

John Wilson

unread,
Jul 14, 2007, 7:09:11 AM7/14/07
to jvm-la...@googlegroups.com
On 7/14/07, Charles Oliver Nutter <charles...@sun.com> wrote:
>
> Guillaume Laforge wrote:
> > On 7/14/07, Charles Oliver Nutter <charles...@sun.com> wrote:
> >> [...]
> >> I think Codehaus would be less than ideal, since they have some
> >> licensing restrictions. I'm open to suggestions.
> >
> > What's wrong with Codehaus?
> > And which licensing restrictions?
>
> Codehaus does not allow projects solely licensed under the GPL. No
> decisions have been made on what the results of our efforts would use
> for a license, but I'd like options to remain open.


I don't think the Haus would accept this project at the moment:

"The Codehaus places a high bar on entry for projects. They should be
released or near it."

(from the Manifesto)

I think we really just need a sandbox site at the moment.

John Wilson

Guillaume Laforge

unread,
Jul 14, 2007, 11:11:39 AM7/14/07
to jvm-la...@googlegroups.com
On 7/14/07, Charles Oliver Nutter <charles...@sun.com> wrote:
> [...]
> Codehaus does not allow projects solely licensed under the GPL. No
> decisions have been made on what the results of our efforts would use
> for a license, but I'd like options to remain open.
>
> And no, I don't want to get into a debate about the GPL :)

Ah well, but if I had a choice, I would really prefer using a really
open license like ASL 2, and not this viral GPL thingy ;-)

Guillaume Laforge

unread,
Jul 14, 2007, 11:12:41 AM7/14/07
to jvm-la...@googlegroups.com
On 7/14/07, John Wilson <tugw...@gmail.com> wrote:
> [...]

> I don't think the Haus would accept this project at the moment:
>
> "The Codehaus places a high bar on entry for projects. They should be
> released or near it."
>
> (from the Manifesto)

There are always exceptions to the rules.

> I think we really just need a sandbox site at the moment.

Then Google Code should be okay, despite the lack of good high-level
services (JIRA, FishEye, Confluence, etc...)

David Pollak

unread,
Jul 15, 2007, 5:46:35 PM7/15/07
to jvm-la...@googlegroups.com
I use Google Code with lift.  I've had a couple transient issues (they went away within 5 minutes and who knows... could have been some wacky routing thing.)  One does have to declare a license type when setting up a project (although presumably one could select a little of column A [GPL], a little of column B [MPL] and a little of column C [MIT] as it's not uncommon these days for code to be dual licensed and the three columns should cover whatever is ultimately done with the code)

The Google Code tools are very much like GMail.  They are "flat" and are oriented towards searching for the thing you care about.  I'm not sure I'd host a 40 person project there, but hosting a 10 person collaboration until the project turns into a 40 person collaboration might not be the worst thing in the world.

My 2 cents.

Frank Wierzbicki

unread,
Jul 17, 2007, 2:43:19 PM7/17/07
to jvm-la...@googlegroups.com
Charles,

Looks like we are between java.net and code.google. Since you
originated all of this, you should probably have naming rights -- and
I have no preference between these two services. Do you want to
choose?

-Frank

Charles Oliver Nutter

unread,
Jul 17, 2007, 5:01:46 PM7/17/07
to jvm-la...@googlegroups.com

I'm willing to give Google Code a try, and it seems to be (in most
circles) the least offensive of all services. And if we need to make a
move off it to java.net or codehaus or whatever in the future, I doubt
it would be a big deal.

I'll raise the licensing question (blech) in another thread.

- Charlie

Attila Szegedi

unread,
Jul 22, 2007, 2:58:24 AM7/22/07
to jvm-la...@googlegroups.com
Sorry to chime in late, but what's exactly wrong with SourceForge?

Attila.

On Tue, 17 Jul 2007 23:01:46 +0200, Charles Oliver Nutter

Frank Wierzbicki

unread,
Jul 22, 2007, 9:47:06 AM7/22/07
to jvm-la...@googlegroups.com
On 7/22/07, Attila Szegedi <att...@szegedi.org> wrote:
> Sorry to chime in late, but what's exactly wrong with SourceForge?
Well, there are fairly common outages in svn access, I don't really
like the bug tracker, and there are also too many times that I can't
access the shell they provide. Probably they are just a victim of
their own success, and some of the early choices they made. At the
moment they are just a bit too annoying to use for a beginning project
with so many other options IMO.

-Frank

Reply all
Reply to author
Forward
0 new messages