[plt-scheme] How best to use PLaneT?
I'm not sure this is really planet-specific, so much as it is a fact
of life when writing programs that use other's programs that are
changing over time. Planet does its best to help you avoid such
problems with its versioning policy, but there is only so much it can
do. One of the things we've been thinking about along these lines is
including test suites in planet packages and then running them as the
package is downloaded, refusing to install the package if the tests
fail (as they probably would have in the cases you describe below).
That's still a little while off, tho.
In the meantime, I suggest that you first test before you deploy
updates to at least avoid some of the frustration.
Sorry,
Robby
On Fri, Oct 10, 2008 at 7:50 AM, Matt Jadud <jadudm at gmail.com> wrote:
> Hi everyone,
>
> I generally find coding against PLaneT to be a frustrating experience.
> This is probably due to the way I use it. For this reason, it becomes
> a question of practice.
>
> Question: Should I always code against a specific library version?
>
> I find that if I code against (say) "instaservlet", I have to hope
> that the library maintainers do major revisions when things change
> substantially. I choose this example because, in late August, I wrote
> a script using this library. Since then, PLT Scheme went from 4.0.3 to
> 4.1.x. Instaservlet went from (1 3) to (1 7). Not long ago, while my
> server was live and running, it started throwing errors: instaservlet
> was failing in a live, running app. So, I blew away my cache and
> updated; this now is producing a stream of errors regarding scribble
> and other parts of the system. Obviously, I cannot use the most recent
> PLaneT packages on 4.0.3, because many of them have been updated for
> 4.1.
>
> In short, 4.0.3 is too old to interact with PLaneT at this point. At
> least, that seems to be the case with respect to some libraries.
>
> My solution seems to be to write my code using very explicit versions
> on PLaneT repository objects.
>
> (require (planet "instaservlet.ss" ("untyped" "instaservlet.plt" 1 (= 3))))
>
> was the require statement I should have used. This prevents the
> library from moving underneath me, and means that if the library
> maintainer does not increment their library version with the language
> version (eg. version (1 6) should perhaps have become (2 0) to reflect
> the change from compatibility with PLT 4.0 to 4.1).
>
> So, that's the long story, and I believe the lesson I learned (or
> should have known) was "code against specific library versions."
> Should I have taken anything else away?
>
> Cheers,
> Matt
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
>