`for-space` in the `provide` form?

According to the for-space,

Like the union of the provide-specs, but adjusted to apply to the binding space specified by space—where space is either an identifier or #f for the default binding space.

But I got an error as follows.

> (module a racket/base
    (provide (for-space #f +)))
make-export: contract violation
  expected: phase+space?
  given: '(0 . #f)
 [,bt for context]

And there seems to be an issue describing an analogous phenomenon on Github.

Is this a bug? Or what can I do to repair it?

Yes, this was a bug. It was fixed only recently, unfortunately, and I don't have a workaround to offer, but you could try a snapshot build via https://snapshot.racket-lang.org/.

1 Like

I tried to install several packages with it, and then got an error like this:

raco setup: error: during making for <pkgs>/rackjure/rackjure (rackjure)
raco setup:   invalid memory reference.  Some debugging context lost
raco setup:     compiling: <pkgs>/rackjure/rackjure/rackjure.scrbl
raco setup: error: during making for <pkgs>/sugar/sugar/unstable
raco setup:   invalid memory reference.  Some debugging context lost
raco setup:     compiling: <pkgs>/sugar/sugar/unstable/string.rkt

That does not look good. Which platform are you running on, and which snapshot site did you download from?

snapshot

On x64, Ubuntu22.04.

Thanks! I haven't been able to replicate the problem, so far. Are there packages other than rackjure and sugar that you installed?

raco automatically installed these two packages in order to setup pollen, racket-langserver and rash.

Still no crash for me. Let me know if you think of something about your environment that I might be missing.

Do you see the crash again if you use raco pkg remove --auto pollen racket-langserver rash and then raco pkg install --auto pollen racket-langserver rash again?

This time another error is raised:

raco setup: error: during making for <pkgs>/parsack-test/parsack/examples
raco setup:   illegal instruction.  Some debugging context lost
raco setup:     compiling: <pkgs>/parsack-test/parsack/examples/url-query-parser.rkt
raco pkg install: packages installed, although setup reported errors

But when I setup those collections manually, I never met these errors.

I still have no good ideas, but some possible things to explore:

  • Do the executables from the Northwestern builds behave any differently? I think they end up linking with a different version of ncurses, for example, although I don't see how that would be relevant to raco setup.

  • Does it matter if you leave out one of the packages, such as installing only pollen and racket-langserver?