
I have cloned Scribble locally so I can make some changes and send a PR… However, I am not quite sure how to install / link my checkout, especially since scribble
is part of the main Racket installation, so it’s already pre-installed at installation scope… I’ve tried various approaches from https://docs.racket-lang.org/pkg/git-workflow.html, but I’m getting various errors because scribble
is already installed. Is there a good way to link just scribble
, or am I meant to be doing a full build of all of Racket since it’s a main distribution package?

The command raco pkg update --clone ‹_dir_› ‹_pkg-name_›
will clone racket/scribble.git, after which you can add any git remote repo in the clone. However, this is going to rebuild all packages that depend on scribble.

Hmm, I tried this, but it seems to refuse because it’s already installed with installation scope:
$ raco pkg update --clone $(pwd) <git://github.com/racket/scribble.git>
Inferred package scope: installation
Querying Git references for scribble at <git://github.com/racket/scribble.git>
Updating:
scribble
Querying Git references for scribble at <git://github.com/racket/scribble.git>
Using clone directory directly for metadata
raco pkg update: package conflicts with existing installed item
package: <git://github.com/racket/scribble.git>
item category: exe
item name: "scribble"

Ah, yes. And the catalog is also needed. Let me find the relevant blog post

I noticed there’s some kind of approach that creates a local catalog in Scribble’s CI workflow (https://github.com/racket/scribble/blob/master/.github/workflows/ci.yml), but I wasn’t sure if that was sensible for a development machine as well.

At step 1b, the first command for setting the catalog is necessary https://blog.racket-lang.org/2017/09/tutorial-contributing-to-racket.html Here <PKG> is scribble
, without any reference to the git repository — that’s going to be resolved automatically through the catalog

If the packages are installed globally, I think both of the commands also need the -i
flag

I have a documentation typo I’d like to create a pull request for, but as I do so, github says my branch is 8 commits ahead of racket:master. I’ve only made one prior contribution, and I’m pretty sure it was accepted, so I’m not exactly sure how I got in this state. When I attempt to create the current pull request, it only shows 1 file changed (the doc typo), but it also shows my prior commits. The 3 non-merge commits have checkmarks that seem to imply they were accepted into master, but I don’t want to create a pull request with confusing noise. Any suggestions?

I was hoping I would just keep my branch active and create pull requests occasionally as I make contributions vs. creating a clean fork of racket. What is the typical contributor workflow?

In case a screenshot adds clarity…

Thanks, that seemed to work! :slightly_smiling_face: The catalog step was the main bit I was missing before.

I was initially referring to https://docs.racket-lang.org/racket-build-guide/contribute.html#%28part._pkg-contribute%29, which doesn’t seem to mention any of this catalog stuff, so perhaps I should send a documentation update so that matches the blog post.

I think I’ll create a fresh fork, and then use a topic branch for my contributions vs. making changes on master.

Yes, that worked nicely. A separate topic branch per pull request seems to be the way to go.

I’m trying to compile the main Racket repo for the first time. Following the docs, I’m attempting the in-place style, so I’ve just run make
in the repo directory. For some reason the zlib
within Chez Scheme fails to link properly.

libtool -o libz.a adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o
gcc -g -O2 -Wall -DOS_X -DHAVE_HIDDEN -o example example.o -L. libz.a
gcc -g -O2 -Wall -DOS_X -DHAVE_HIDDEN -o minigzip minigzip.o -L. libz.a
ld: warning: ignoring file libz.a, building for macOS-x86_64 but attempting to link with file built for macOS-x86_64
Undefined symbols for architecture x86_64:
"_compress", referenced from:
_test_compress in example.o
(maybe you meant: _test_compress)

I’m on macOS 11.5.2 with Xcode 12.5.1. It’s odd since the linker message is trying to say there’s an architecture mismatch, but both values stated are the same… :thinking_face:

Ah, seems like some GNU version of ranlib
is taking precedence over Apple’s. I’ll try moving that out of the way…

Yes, much better now after brew unlink binutils
. :slightly_smiling_face:

Yes, the build guide assumes that you’re starting by building from git

Adding discussion of how to do it from a snapshot would be great

Glad that you sort it out. I think adding commits to master
is the issue because the upstream diverges with different commits, so by default git pull
(~= git fetch
+ git merge
) creates new merge commits and it’s not no-op. Using git pull --ff-only
would instead report errors.