How to run multiple Racket installations?

52 views
Skip to first unread message

zeRusski

unread,
May 8, 2020, 4:55:17 AM5/8/20
to Racket Users
I have two builds of Racket on my local machine. Racket CS resides in one directory and was built with `RACKETCS_SUFFIX=""` and stardard Racket also built from source in a separate directory. Normally I have my .bashrc setup PATH as needed to use e.g. Racket CS. I ran into a problem with an upstream package which maybe FFI related, so now I want to test it against standard Racket build so I switch over the PATH and run it with non-cs `raco` and `racket`.

First, does that even work? I noticed that both of them install packages into ~/Library/Racket/development/ for me. Are both builds so compatible I don't need to worry about packages stepping on each others toes i.e. compiled with one but executed with the other? I think I'd rather have the two systems completely separated so I can actually compare oranges to oranges. Is there a way to guarantee that? I don't have a mental model of having two builds like this.

How do you run and test multiple builds? Is there a good setup I can steal please?
Thanks

Sam Tobin-Hochstadt

unread,
May 8, 2020, 7:51:04 AM5/8/20
to zeRusski, Racket Users
This is the tooling I use: https://github.com/takikawa/racket-dev-goodies/

Note that it works primarily with "in-place" installations. 

Sam

--
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/195b0260-19f2-45b2-a36d-4edc344fef87%40googlegroups.com.

Matthew Flatt

unread,
May 8, 2020, 8:19:33 AM5/8/20
to zeRusski, Racket Users
At Fri, 8 May 2020 01:55:17 -0700 (PDT), zeRusski wrote:
> First, does that even work? I noticed that both of them install packages
> into ~/Library/Racket/development/ for me. Are both builds so compatible I
> don't need to worry about packages stepping on each others toes i.e.
> compiled with one but executed with the other?

No, the builds will collide there.

The intent of development mode is that you install further packages
"installation" scope, etc., to avoid contention at
"~/Library/Racket/development".

But if you need the "~/Library/Racket" space, there are tools like the
one Sam suggested, and there's a specific configuration for this...

> I think I'd rather have the two systems completely separated so I can
> actually compare oranges to oranges. Is there a way to guarantee
> that?

You can use something like

raco pkg config -u --set name other-development

to give one of your development builds a different name. In this case,
that build would use "~/Library/Racket/other-development".

James Platt

unread,
May 8, 2020, 12:02:04 PM5/8/20
to Racket Users
Would virtual machines be an option? You do have to have a pretty good host machine with lots of RAM. I do this mainly to have different development and testing environments. It works pretty smoothly on my Mac Pro, with VirtualBox for Linux and Windows guest machines and VMWare for macOS guests.

James

Simon Schlee

unread,
May 9, 2020, 6:06:21 AM5/9/20
to Racket Users
You could use the nix package manager https://nixos.org/nix/ it runs on many linux platforms and macOS.

It has predefined racket and racket-minimal packages, you can define derived versions of those packages and adapt them to your needs.
It allows you to easily switch between different packages, you could e.g. use different profiles within nix to manage the different installations or create a own/private package for each one.

I just started using nix, but so far I would recommend it, it is refreshing to be able to undo your changes by just activating a previous state/generation.
https://pyvideo.org/europython-2014/rethinking-packaging-development-and-deployment.html

Simon
Reply all
Reply to author
Forward
0 new messages