Git development setup

70 views
Skip to first unread message

Aidan Gauland

unread,
Feb 1, 2019, 11:57:45 PM2/1/19
to racke...@googlegroups.com
I am trying to fix a bug in one of the bundled Racket libraries (but not
the core "Minimal Racket" libraries), so I need to run Racket with this
library (racket/gui in this case) loaded instead of the installed
version.  How do I do this?  Do I need to also run all of Racket from
master, or can I just run the latest release and fiddle with the load
path to have my dev version of racket/gui take precedence?

Regards,
Aidan Gauland

Leo Uino

unread,
Feb 2, 2019, 12:42:11 AM2/2/19
to racke...@googlegroups.com
On 2019/02/02 13:57, Aidan Gauland wrote:
> I am trying to fix a bug in one of the bundled Racket libraries (but not
> the core "Minimal Racket" libraries), so I need to run Racket with this
> library (racket/gui in this case) loaded instead of the installed
> version.

There's a guide for this (I found it via the wiki[1]):

https://blog.racket-lang.org/2017/09/tutorial-contributing-to-racket.html

See "How to contribute to a main distribution package" part 1b.

Essentially,

$ raco pkg update --no-setup --catalog https://pkgs.racket-lang.org <PKG>
$ raco pkg update --clone <PKG>

will get you a checkout with the appropriate links set up.

Hope that helps!


Leo

[1] https://github.com/racket/racket/wiki/Contributing-to-Racket

Aidan Gauland

unread,
Feb 2, 2019, 5:43:39 PM2/2/19
to racke...@googlegroups.com
On 2/02/19 6:42 PM, Leo Uino wrote:
> On 2019/02/02 13:57, Aidan Gauland wrote:
>> I am trying to fix a bug in one of the bundled Racket libraries (but not
>> the core "Minimal Racket" libraries), so I need to run Racket with this
>> library (racket/gui in this case) loaded instead of the installed
>> version.
>
> There's a guide for this (I found it via the wiki):
Ah, the wiki.  I was looking for that.  Just submitted a PR to add a
link on racket-lang.org[1]
>
> https://blog.racket-lang.org/2017/09/tutorial-contributing-to-racket.html
>
> See "How to contribute to a main distribution package" part 1b.
>
> Essentially,
>
> $ raco pkg update --no-setup --catalog https://pkgs.racket-lang.org <PKG>
> $ raco pkg update --clone <PKG>
>
> will get you a checkout with the appropriate links set up.

OK, so that sorts out getting a clone of the repository I need to work
on.  Now how do I invoke racket so that this clone is loaded instead of
the version bundled with Racket?

Thanks,
Aidan

[1] https://github.com/racket/racket-lang-org/pull/85

Ben Greenman

unread,
Feb 2, 2019, 10:06:43 PM2/2/19
to Aidan Gauland, racke...@googlegroups.com
> OK, so that sorts out getting a clone of the repository I need to work
> on. Now how do I invoke racket so that this clone is loaded instead of
> the version bundled with Racket?

You can change your PATH environment variable to include the clone's
racket/bin/ folder, or add a symlink from the clone's
racket/bin/racket to a directory that is on your path.

When I set up my clone, I ran something like:

$ ln -s `pwd`/racket/bin/racket /usr/local/bin/racket

Matthew Flatt

unread,
Feb 2, 2019, 10:10:42 PM2/2/19
to Ben Greenman, Aidan Gauland, racke...@googlegroups.com
That shouldn't be necessary after `raco pkg update --clone`, which
makes the clone the one that's used by the same Racket installation as
`raco`. In other words, there shouldn't be anything more to do after
`raco pkg update --clone`.

Aidan Gauland

unread,
Feb 2, 2019, 11:22:29 PM2/2/19
to racke...@googlegroups.com
I would rather do this with my installation of the latest release of
Racket, rather than run all of Racket from master, if at all possible.

Aidan Gauland

unread,
Feb 3, 2019, 4:43:18 AM2/3/19
to racke...@googlegroups.com

This is not working when running Racket from master, either.  After running

$ ./racket/bin/raco pkg update --clone

and placing the resultant 'gui' directory into extra-pkgs, running drracket gives an error in gui-lib:

$ ./racket/bin/drracket 
open-input-file: cannot open module file
  module path: racket/gui/base
  path: /home/aidan/src/racket/racket-project/racket/racket/collects/racket/gui/base.rkt
  system error: no such file or directory; rktio_err=3
  context...:
   maybe-raise-missing-module
   default-load-handler
   standard-module-name-resolver
   namespace-module-instantiate!96
   for-loop
   [repeats 1 more time]
   run-module-instance!125
   perform-require!78

This has also broken the build, as rerunning make now fails (only including error from output):

racket/bin/racket  -G racket/etc -X racket/collects -N raco -l- raco setup --only-foreign-libs  
raco setup: directory: #<path:/home/aidan/src/racket/racket-project/racket/gui/tex-table> does not exist for collection: "mrlib"
  context...:
   /home/aidan/src/racket/racket-project/racket/racket/collects/setup/setup-core.rkt:333:2: collection-cc!20
   /home/aidan/src/racket/racket-project/racket/racket/collects/setup/setup-core.rkt:451:6: for-loop
   /home/aidan/src/racket/racket-project/racket/racket/collects/setup/setup-core.rkt:448:4: for-loop
   /home/aidan/src/racket/racket-project/racket/racket/collects/setup/setup-core.rkt:71:0: setup-core
   "/home/aidan/src/racket/racket-project/racket/racket/collects/setup/main.rkt": [running body]
   temp37_0
   for-loop
   run-module-instance!125
   "/home/aidan/src/racket/racket-project/racket/racket/collects/raco/main.rkt": [running body]
   temp37_0
   for-loop
   run-module-instance!125
   perform-require!78
Makefile:82: recipe for target 'plain-minimal-in-place-after-base' failed

Any ideas?

Sam Tobin-Hochstadt

unread,
Feb 3, 2019, 9:38:06 AM2/3/19
to Aidan Gauland, racke...@googlegroups.com
You don't want to move things after you do the raco pkg update: what you're seeing is that it no longer can find the files it thinks are where you originally cloned them. 

Sam

On Sun, Feb 3, 2019, 4:43 AM Aidan Gauland <aida...@fastmail.net wrote:
On 3/02/19 5:22 PM, Aidan Gauland wrote:
--
You received this message because you are subscribed to the Google Groups "Racket Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-dev+...@googlegroups.com.
To post to this group, send email to racke...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-dev/1798fafd-a736-530c-3821-efbd77ad6be5%40fastmail.net.
For more options, visit https://groups.google.com/d/optout.

Aidan Gauland

unread,
Feb 4, 2019, 5:10:23 AM2/4/19
to racke...@googlegroups.com
Thanks, that was the problem.  I started over and ran 'raco pkg update'
where I wanted the clone, and it worked.
Reply all
Reply to author
Forward
0 new messages