Skip to content

RFC: fix (?) cross-phase-persistent submodules#37

Open
jesboat wants to merge 1 commit intoracket:masterfrom
jesboat:fix-xpp-submods
Open

RFC: fix (?) cross-phase-persistent submodules#37
jesboat wants to merge 1 commit intoracket:masterfrom
jesboat:fix-xpp-submods

Conversation

@jesboat
Copy link

@jesboat jesboat commented Nov 24, 2025

Summary:

Previously, errortrace left cross-phase-persistent modules alone, but the check was not applied to cross-phase-persistent submodules of root modules which were not themselves cross-phase-persistent. This moves the check inward so it is also applied to submodules.

Pending: This moves the check from errortrace-annotate to transform-all-modules which appears to do the submodule recursion, but which is also called after do-annotate which seems to have some implementations which also do submodule recursion. I don't understand how these are interacting and whether the submodule check needs to be earlier, or in both places, or something. Advice welcome.

Fixes racket/racket#5351

Test Plan:

Both of these run with

racket -l errortrace -t file.rkt

without error:

(module outer '#%kernel
  (module u '#%kernel
    (#%declare #:cross-phase-persistent)))

(module outer '#%kernel
  (#%declare #:cross-phase-persistent))

Summary:

Previously, errortrace left cross-phase-persistent modules alone, but the check
was not applied to cross-phase-persistent submodules of root modules which were
not themselves cross-phase-persistent. This moves the check inward so it is also
applied to submodules.

Pending: This moves the check from `errortrace-annotate` to
`transform-all-modules` which appears to do the submodule recursion, but which
is also called after `do-annotate` which seems to have some implementations
which also do submodule recursion. I don't understand how these are interacting
and whether the submodule check needs to be earlier, or in both places, or
something. Advice welcome.

Fixes racket/racket/5351.

Test Plan:

Both of these run with

    racket -l errortrace -t file.rkt

without error:

```racket
(module outer '#%kernel
  (module u '#%kernel
    (#%declare #:cross-phase-persistent)))

(module outer '#%kernel
  (#%declare #:cross-phase-persistent))
```
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

Successfully merging this pull request may close these issues.

Cross-phase persistent submodules of non-xpp modules break with errortrace

1 participant