ann: rp - a package manager for ringojs

36 views
Skip to first unread message

Robert Gaggl

unread,
Jan 29, 2012, 12:41:42 PM1/29/12
to RingoJS
Hi everybody,

i'd like to announce a project i've been working on for the last
weeks: "rp", a package manager for ringojs (https://github.com/grob/
rp/).

rp is a commandline app which in it's present state allows to publish,
search for, install, activate and list ringojs packages. the registry
that rp works with (also a ringojs app) is running at http://rpr.nomatic.org/.
you can find the source of it at https://github.com/grob/rpr/.

rp is capable to resolve package dependencies and installs packages in
a directory "packages.available" within a ringojs installation - which
is not on ringojs' module search path and thus allows installing
different versions of the same package. package activation is done by
rp using symlinks in packages directory pointing to installed packages
(which is why activation isn't yet supported on windows).

publishing a package in the registry is easy, too: create an account
in the registry, change into the package directory and type "rp
publish". note that currently the initial publisher of a package
becomes its "owner" in rpr - publishing new versions of a package is
limited to this account (until now rpr doesn't have a way to transfer
packages from one account to another).

see the readme on how to install rp. apologies to those running
ringojs on windows, currently you'll need to manually unzip rp into
packages directory if you want to try it out (there's definetly room
for improvement reg. rp on windows).

both rp and rpr are in a very early state, and are by no means
finished in any aspect. however, i hope it is already useful. please
give it a try, i'll be glad to hear your opinions and ideas for
improvement.

robert

Hannes Wallnöfer

unread,
Jan 30, 2012, 4:51:03 AM1/30/12
to rin...@googlegroups.com
This is very cool! Thanks, Robert!

I see that packages I already have in my ringojs/packasges directory
are listed as installed by rp. How does it treat those packages? What
happens if I uninstall them?

A minor note: on Linux where the HotSpot server vm is used by default
adding "-J-client" to the java command line in bin/rp helps reduce
startup time by almost half.

Hannes

2012/1/29 Robert Gaggl <grob...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups "RingoJS" group.
> To post to this group, send email to rin...@googlegroups.com.
> To unsubscribe from this group, send email to ringojs+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/ringojs?hl=en.
>

Robert Gaggl

unread,
Jan 30, 2012, 5:28:10 AM1/30/12
to RingoJS
> I see that packages I already have in my ringojs/packasges directory
> are listed as installed by rp. How does it treat those packages? What
> happens if I uninstall them?

rp won't touch entries in packages directory that are not a symlink,
or a symlink that doesn't point to packages.available - in other
words, it should not touch anything it didn't install. you'll get an
error message instead. reg. listing: "rp list" shows the active
packages, "rp list -i" the installed ones (those in
packages.available). i wanted "rp list" to show all packages that are
available to ringojs, but maybe that's too confusing.

> A minor note: on Linux where the HotSpot server vm is used by default
> adding  "-J-client" to the java command line in bin/rp helps reduce
> startup time by almost half.

ah, thanks for the reminder. i tried that on my machines (osx/linux,
both 64bit), and -client didn't have any effect. using "-J-d32 -J-
client" did reduce startup time dramatically on os x, but this threw
an error on my linux boxes (probably because i had the 64bit jdk
installed), that's why i hesitated to add that to the rp script.

robert

Hannes Wallnöfer

unread,
Jan 30, 2012, 5:41:13 AM1/30/12
to rin...@googlegroups.com
2012/1/30 Robert Gaggl <grob...@gmail.com>:

>> I see that packages I already have in my ringojs/packasges directory
>> are listed as installed by rp. How does it treat those packages? What
>> happens if I uninstall them?
>
> rp won't touch entries in packages directory that are not a symlink,
> or a symlink that doesn't point to packages.available - in other
> words, it should not touch anything it didn't install. you'll get an
> error message instead. reg. listing: "rp list" shows the active
> packages, "rp list -i" the installed ones (those in
> packages.available). i wanted "rp list" to show all packages that are
> available to ringojs, but maybe that's too confusing.

Good to know! Current behaviour seems reasonable to me.

>> A minor note: on Linux where the HotSpot server vm is used by default
>> adding  "-J-client" to the java command line in bin/rp helps reduce
>> startup time by almost half.
>
> ah, thanks for the reminder. i tried that on my machines (osx/linux,
> both 64bit), and -client didn't have any effect. using "-J-d32 -J-
> client" did reduce startup time dramatically on os x, but this threw
> an error on my linux boxes (probably because i had the 64bit jdk
> installed), that's why i hesitated to add that to the rp script.

Did -J-client alone not help on OS X? I think that one should be
available on all Oracle and OpenJDK versions (of course there's other
VMs as well..)

Hannes

Robert Gaggl

unread,
Jan 30, 2012, 5:51:29 AM1/30/12
to RingoJS
> Did -J-client alone not help on OS X? I think that one should be
> available on all Oracle and OpenJDK versions (of course there's other
> VMs as well..)

iirc -client alone did not have any effect (that's why i added -d32,
found that at http://blog.headius.com/2010/03/jruby-startup-time-tips.html).
but i'll check again - if it does help i'll put it into the rp script.

Hannes Wallnoefer

unread,
Feb 2, 2012, 5:46:45 PM2/2/12
to RingoJS
One question that just crossed my mind: Can rp/rpr deal with
dependencies on specific versions of ringojs? It probably should!

Hannes

On Jan 29, 6:41 pm, Robert Gaggl <grobs...@gmail.com> wrote:
> Hi everybody,
>
> i'd like to announce a project i've been working on for the last
> weeks: "rp", a package manager for ringojs (https://github.com/grob/
> rp/).
>
> rp is a commandline app which in it's present state allows to publish,
> search for, install, activate and list ringojs packages. the registry
> that rp works with (also a ringojs app) is running athttp://rpr.nomatic.org/.
> you can find the source of it athttps://github.com/grob/rpr/.

Robert Gaggl

unread,
Feb 3, 2012, 3:38:52 AM2/3/12
to RingoJS
On Feb 2, 11:46 pm, Hannes Wallnoefer <hann...@gmail.com> wrote:
> One question that just crossed my mind: Can rp/rpr deal with
> dependencies on specific versions of ringojs? It probably should!

rp currently doesn't check that, but that's definitely necessary. i've
created an issue for that: https://github.com/grob/rp/issues/1

robert
Reply all
Reply to author
Forward
0 new messages