Developing Scribble as a user when Scribble is installed system-wide

54 views
Skip to first unread message

Christopher Lemmer Webber

unread,
Nov 4, 2020, 8:10:54 PM11/4/20
to racket...@googlegroups.com
I've done the following to my git repo of scribble:

raco pkg update --scope user --clone scribble-lib
raco pkg update --scope user --clone scribble-doc
raco pkg update --scope user --clone scribble

I also tried removing that and doing:

raco pkg install --scope user --clone scribble-lib
raco pkg install --scope user --clone scribble-doc
raco pkg install --scope user --clone scribble

Regardless, like it installed it in userspace. Okay.

But it seems like running "raco scribble" or importing scribble and
then checking where the install paths are from, it's still seeming to
use the system install verison of scribble.

Not sure what I should do... shouldn't it be the case that user packages
take priority?

- Chris

Sam Tobin-Hochstadt

unread,
Nov 5, 2020, 11:06:07 AM11/5/20
to Christopher Lemmer Webber, Racket Users
Can you post the output of `raco pkg show -l --rx scribble`?

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/87eel87goo.fsf%40dustycloud.org.

Christopher Lemmer Webber

unread,
Nov 5, 2020, 1:03:06 PM11/5/20
to Sam Tobin-Hochstadt, Racket Users
Thanks for your help Sam (and for trying to help me on IRC earlier, even
though I still apparently haven't understoood).

It looks like via that command, I really don't have anything installed:

$ raco pkg show -l --rx scribble
Installation-wide:
Package[*=auto] Checksum Source
scribble* a5cb923ee68ca75f7c38fa292d0676fd864ce4d8 (catalog "scribble")
scribble-doc* 75fc2487c34972216972c28170e27132ea73486d (catalog "scribble-doc")
scribble-html-lib* 312698505f94222be672038938cef024f20f8f1f (catalog "scribble-html-lib")
scribble-lib* a103fc2974188b3d007fd4e38f424e3498993ffb (catalog "scribble-lib")
scribble-text-lib* 817c9ad5450aec2d7fcdbe217a134b535d32f4fb (catalog "scribble-text-lib")
User-specific for installation "7.8":
[none]

I'm guessing it's probably due to these error messages:

$ raco pkg update --scope user --clone scribble-lib
Inferred package name from given `--clone' path
package: scribble-lib
given path: scribble-lib
raco pkg update: package installed in a different scope
package: scribble-lib
current scope: user
installed in scope: installation

I see that I can make it happen using the following steps:

cwebber@twig:~/devel/scribble/scribble-lib$ raco pkg install --force
Linking current directory as a package
...
cwebber@twig:~/devel/scribble/scribble-lib$ raco pkg show -l --rx scribble
warning: tool "scribble" registered twice: "scribble" and #<path:/gnu/store/8bpd156gsb4yjapx9gcmw4xn56vnl063-racket-7.8/share/racket/pkgs/scribble-lib/scribble>
Installation-wide:
Package[*=auto] Checksum Source
scribble* a5cb923ee68ca75f7c38fa292d0676fd864ce4d8 (catalog "scribble")
scribble-doc* 75fc2487c34972216972c28170e27132ea73486d (catalog "scribble-doc")
scribble-html-lib* 312698505f94222be672038938cef024f20f8f1f (catalog "scribble-html-lib")
scribble-lib* a103fc2974188b3d007fd4e38f424e3498993ffb (catalog "scribble-lib")
scribble-text-lib* 817c9ad5450aec2d7fcdbe217a134b535d32f4fb (catalog "scribble-text-lib")
User-specific for installation "7.8":
Package Checksum Source
scribble-lib #f (link "/home/cwebber/devel/scribble/scribble-lib")

I know you've warned me I don't want to do install --force though. :)

Though... now I've done it for all of the Scribble sub-packages, and
things seem to work now...

Might I ask why I shouldn't do the thing I've just done then?

Matthew Flatt

unread,
Nov 5, 2020, 1:20:44 PM11/5/20
to Christopher Lemmer Webber, Racket Users
At Thu, 05 Nov 2020 13:01:36 -0500, Christopher Lemmer Webber wrote:
> I'm guessing it's probably due to these error messages:
>
> $ raco pkg update --scope user --clone scribble-lib
> Inferred package name from given `--clone' path
> package: scribble-lib
> given path: scribble-lib
> raco pkg update: package installed in a different scope
> package: scribble-lib
> current scope: user
> installed in scope: installation

The right way to avoid this message in you case is likely to specify
the same scope as the starting "scribble" copy, which is installation
scope, via `-i`.

> I see that I can make it happen using the following steps:
>
> cwebber@twig:~/devel/scribble/scribble-lib$ raco pkg install --force
> [...]
>
> I know you've warned me I don't want to do install --force though. :)
>
> Though... now I've done it for all of the Scribble sub-packages, and
> things seem to work now...
>
> Might I ask why I shouldn't do the thing I've just done then?

Your installation is now in a state where some packages that depend on
"scribble" are built against the installation-wide copy, while others
are (or will become as you run `raco setup` or more package commands)
built with your user-specific copy.

As long as your work as the same user, and as long as you don't run
anything that constraints effects to installation scope, then it might
all work... until it doesn't. Fundamentally, `raco setup` is not
designed to support dependencies that go backward from installation
scope to user scope, and so it doesn't make that work reliably.

Most likely, the installation is really all your own, and not
multi-user. In that case, you should just work at the level of the
installation to avoid a mismatch.


Matthew

Christopher Lemmer Webber

unread,
Nov 5, 2020, 2:41:03 PM11/5/20
to Matthew Flatt, Racket Users
I see. That's a good explaination.

Also all the more motivation to support Guix-based Racket
development... :)
Reply all
Reply to author
Forward
0 new messages