anything
2021-1-5 09:32:48

Interesting. Has anyone ever blogged about the top level being hopeless? I’m hearing that for the first time. :slightly_smiling_face:




spdegabrielle
2021-1-5 09:44:18

Cc: @laurent.orseau


laurent.orseau
2021-1-5 12:37:58

Another possibility is to use a special submodule that can be dynamic-required. This is what Quickscript uses.


laurent.orseau
2021-1-5 12:41:34

The nice thing about submodules is that they can be required without even reading the rest of the program (once compiled), which can be particularly beneficial for a plugin in case the program file is large.


kellysmith12.21
2021-1-5 15:36:48

Is there a nice way to visualize the module dependency graph in a Racket project?


samth
2021-1-5 15:46:18

loggers are useful if you want the information to be available either before expansion finishes or when expansion errors


samth
2021-1-5 15:47:14

See the “module browser” in DrRacket (View menu)


laurent.orseau
2021-1-5 15:48:35

can you communicate s-exps easily with loggers, or do you need to parse the text output?


samth
2021-1-5 15:48:56

you can communicate arbitrary values


samth
2021-1-5 15:49:29

although to communicate between the expansion and drracket they need to be sendable between places


laurent.orseau
2021-1-5 15:50:12

Ah yeah, nice, I missed the make-log-receiver


spdegabrielle
2021-1-5 15:52:50

The OP said ping @leif and @florence !ping!:table_tennis_paddle_and_ball::rolling_on_the_floor_laughing:


laurent.orseau
2021-1-5 15:55:20

@samth if some info is logged during syntax expansion, does it mean that once compiled to a .zo you may not receive the same information?


samth
2021-1-5 15:57:46

right, although that’s a pretty different situation


kellysmith12.21
2021-1-5 16:00:48

That’s delightful!


kellysmith12.21
2021-1-5 18:37:31

mflatt
2021-1-5 21:11:19

No, it wouldn’t help. A begin-for-syntax doesn’t so much shift phases as use the bindings of a different phase to generate compile-time code. That is, begin-for-... needs to go to the other phase (in a sense) instead of moving the phase here (in a sense).

The problem with begin-for-template is that its compile time would correspond to the enclosing module’s run time, but the intent of the module system is to be able to compile a module without evaluating any of its run-time code.


jestarray
2021-1-5 23:02:37

is chez scheme ready for this months release?


mflatt
2021-1-5 23:21:15

Yes, we still expect to release v8.0 as Racket CS (with Racket BC still available through non-default routes).


jestarray
2021-1-5 23:44:31

glad there are no more delays


samdphillips
2021-1-6 02:12:01

Would you say custodians are expensive to use or cheap (or in-between?)


wjb
2021-1-6 02:27:20

@wjb has joined the channel


wjb
2021-1-6 05:10:51

I’m getting extremely strange behavior trying to install a package that includes a file that uses at-exp-lib in a Racket minimal installation. Sometimes, the build fails claiming that “syntax/readerr” is an unknown module. Sometimes, it does not. This seems to be determined by some cosmic variable, because it even happens in an apparently clean VM: https://github.com/wilbowma/test-setup-racket/runs/1654453141?check_suite_focus=true#step:4:43 https://github.com/wilbowma/test-setup-racket/runs/1654486000?check_suite_focus=true#step:4:45

Anyone have any insight?


wjb
2021-1-6 05:23:52

Okay… I seem to be able to affect the bug: using raco pkg install -j 1 seems to make it disappear; raco pkg install -j 2 makes it appears frequently, and raco pkg install -j 8 makes it appear very infrequently. It seems to have to do with order of the threads that are building at-exp-lib and the package that uses at-exp-lib.


wjb
2021-1-6 05:28:39

Seems to be some kind of race condition. The package requires at-exp-lib at build time, but when using minimal, that’s not built yet, so when raco installs and builds it as a dependency in parallel with the package that requires it at build time, something goes wrong depending on which thread finishes first.


kellysmith12.21
2021-1-6 06:01:48

Thank-you for clarifying this.


shu--hung
2021-1-6 06:18:25

I agree with the race condition part, but the error message seems to suggest that this is a deeper concurrency problem involving namespaces and module loading (at Racket level), not about whether a file is built or not: instantiate: unknown module module name: #<resolved-module-path:"/usr/share/racket/collects/syntax/readerr.rkt"> compilation context...: /home/runner/work/test-setup-racket/test-setup-racket/foo/dummy-lib/foo/meow.rkt as far as I understand, this could happen when a module is supposed to be registered in a namespace (perhaps registered/loaded by the module name resolver), but later can’t actually be found. https://github.com/racket/racket/blob/17b7033402078038bca85b478243a19baba52f4f/racket/src/expander/namespace/module.rkt#L384