[racket-dev] Splitting the Racket repository

From: Sam Tobin-Hochstadt (samth at cs.indiana.edu)
Date: Sat Nov 29 20:30:59 EST 2014

On Sat, Nov 29, 2014 at 8:16 PM, Eli Barzilay <eli at barzilay.org> wrote:
> On Sat, Nov 29, 2014 at 7:14 PM, Sam Tobin-Hochstadt
> <samth at cs.indiana.edu> wrote:
>>
>> All the history for the code has been preserved, and for code that
>> dates back before 2005, the history is extended back to the original
>> CVS repository. See https://github.com/racket/games/ for an example of
>> this.
>
> There's a failure in the import -- if you look at the commits of this
> repo (https://github.com/racket/games/commits/master), then starting
> from Robby's commit from Jul 17 ("add a contract to make-card...") and
> going back, the "original commit" references are all bogus.

For packages with old history, the shas are in reference to
https://github.com/samth/old-plt-new/ (which should maybe have a
better name).

>> If you build Racket from source from Git, that build now contains
>> fewer packages. There is not yet an single-step way to get all of the
>> split pkgs as git repositories; we plan to write a script for this
>> soon.
>
> Any reason they are not git modules?  (They've improved a lot, and
> they're even supported in github as links as long as they point to other
> GH repos.  See for example: https://github.com/elibarzilay/test)

The goal is to have packages that are in the main distribution not
have a particular special status, beyond being in the list of things
that gets put in the distribution.

Also, a situation where you have to update two things when you do a
commit is not ideal.

>> To clone individual repositories, use the new `--clone` option for
>> `raco pkg`, such as:
>>
>>     raco pkg install --clone pkg-build git://github.com/racket/pkg-build
>>
>> or for packages that are grouped together in a single repository
>>
>>     raco pkg install --clone remote-shell
>> git://github.com/racket/remote-shell?path=remote-shell-lib
>> git://github.com/racket/remote-shell?path=remote-shell
>> git://github.com/racket/remote-shell?path=remote-shell-doc
>>
>> Note that the clones created by `raco pkg install` cannot be pushed to
>> with the default origin remote.
>
> This is very obscure.  Is there a compact description of what to do when
> you want to make a change in a file that is not on the main repo?

You just need to edit and change the relevant repository -- nothing
else is required. You don't have to use --clone or any other
mechanism.

Note that the command line above can be shortened to:

    raco pkg install --clone remote-shell remote-shell-lib
remote-shell-doc remote-shell

(that `remote-shell` appears twice there is intentional).

Sam

Posted on the dev mailing list.