
What is the usual process for working on a package that’s installed in my global (is that the right terminology?) collects?
Say I want to work on web-server-lib
and I have previously installed it using raco pkg install web-server
, but the version I want to work on lives in ~/sandbox/web-server/web-server-lib
and I have another project that lives at ~/sandbox/foo
that depends on web-server. I would like to temporarily point to the version of web-server used by foo to the code in ~/sandbox. What’s the best way to do that?
In Python I might do this by messing with the PYTHONPATH env variable or installing the package in editable mode. Are there similar things in Racket that I can use?

@popa.bogdanp not exactly what you are asking but this might be helpful: https://alex-hhh.github.io/2018/01/changing-built-in-racket-packages.html

@githree thanks! That seems like it’d do it.

@jerome.martin.dev Hi. I went ahead and added new-expressions to Urlang.

The syntax in Urlang is: (new constructor argument …)

@githree @popa.bogdanp Alex’s post sets up the package as a directory link, which severs the connection to the upstream. It is better to tell the package system that the package is a git clone, as described in detail at http://docs.racket-lang.org/pkg/git-workflow.html#%28part._clone-link%29 For web-server-lib
, this is described in https://blog.racket-lang.org/2017/09/tutorial-contributing-to-racket.html#how-to-contribute-to-a-main-distribution-package

@soegaard2 Yeah, you rock! Thank you :smile:

I’ll check the commits so that I can understand how to do it myself next time!

One detail: the tutorial’s method sets up the git repository with the upstream repository as its origin
remote. I prefer to have my fork as the origin
and upstream as upstream
. I suggest: 1. git clone <fork>
2. cd <dir> ; git remote add upstream <upstream> ; cd ..
3. raco pkg update --lookup --catalog <https://pkgs.racket-lang.org> --clone <dir> <pkg-name>

With those steps, raco pkg update
will still use the upstream source for updates.

Thank you!

@mflatt I noticed today that if you bind the same identifier (in the sense of bound-identifier=?
) into a first-class definition context multiple times, no error is raised. I was originally going to file a bug, but I noticed this behavior is consistent with older versions of Racket. Is the behavior intentional? If so, what is the intended semantics?

I don’t remember specifically deciding that rebinding should be allowed. It’s possible that I originally decided to allow rebinding absent any reason to disallow it. Or it may be that it never occurred to me to check.

I’ve been hacking around cmdline.rkt
and it seems very archaic and bloated. Many procedural macros. Would it be desirable to make it a syntax-parser
instead?

iirc a comment in the file states we want as few dependencies as possible but as of now it’s hard to maintain