Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

require: namespace mismatch, custom logging, module+ main #4818

Open
skanaley opened this issue Nov 8, 2023 · 0 comments
Open

require: namespace mismatch, custom logging, module+ main #4818

skanaley opened this issue Nov 8, 2023 · 0 comments

Comments

@skanaley
Copy link

skanaley commented Nov 8, 2023

What version of Racket are you using?
8.10 [cs], however it was custom compiled with a change to the logger to allow prefixing logs with a parameter (built in-place, typed-racket-lib is the only modified package beyond the direct change to the logger)

What program did you run?

#lang racket/base`

(define-logger lg)

<code that doesn't use broken-import.rkt but does logging>

(module+ main
  (require "broken-import.rkt") ;this import does not log anything
  <code that uses it>
)

What should have happened?
There should be no errors when running the file on the command line.

If you got an error message, please include it here.
require: namespace mismatch;
reference to a module that is not instantiated
module: <broken-import.krt>
phase: 0

Change the above program so that broken-import is required at the top level, it works, including if you change it back (somehow it successfully compiles "once and for all", provided you don't clean out the compiled files). Also, as in https://racket.discourse.group/t/require-namespace-mismatch/2016, it can be fixed by either requiring racket/logger at the top level or commenting out the logging code, also once and for all.

The program errors whether or not -W debug@lg is on the command line.

Please include any other relevant details
Host MacOS 14.1 on Apple Silicon
Guest Ubuntu 20.04.6 LTS + desktop, aarch64, running under UTM with Apple Virtualization
Custom Racket 8.10 (see at the top)

If I made an (obvious?) error with modifying the logging system or how I installed the modified typed-racket-lib package, I would appreciate some pointers from those in the know (additional details can be provided if needed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant