Skip to content

Conversation

@kLabz
Copy link
Contributor

@kLabz kLabz commented Oct 30, 2025

This currently can happen when current display module (which will be invalidated in case of completion for example) is an indirect dependency of a module that ends up being loaded from init macros. Other cases should usually behave already from what I've seen.

So here, when we're not in full restore mode (display requests only, with some additional constraints), we're allowing hxb restoration of "BadModule" modules, avoiding a compiler failure. That "bad" module is then discarded, avoiding cache corruption (yes, this means it technically can happen more than once in a request, but that should be very rare and not that much of an issue since no typing is involved).

Ideally, this would trigger some specific warning(s).. (see TODOs in diff) but:

  • there isn't much the dev can do when seeing such warning?
  • warning support during display requests is pretty much non existent?
  • Come up with a checklist of doom to please Simon
  • Tick the boxes
  • Merge the PR

This currently can happen when current display module (which will be
invalidated in case of completion for example) is an indirect dependency
of a module that ends up being loaded from init macros. Other cases
should usually behave already from what I've seen.

So here, when we're _not_ in full restore mode (display requests only,
with some additional constraints), we're allowing hxb restoration of
"BadModule" modules, avoiding a compiler failure. That "bad" module is
then discarded, avoiding cache corruption (yes, this means it
technically can happen more than once in a request, but that should be
_very_ rare and not that much of an issue since no typing is involved).

Ideally, this would trigger some specific warning.. but:
- there isn't much the dev can do when seeing such warning?
- warning support during display requests is pretty much non existent?
@Simn
Copy link
Member

Simn commented Oct 30, 2025

Can we use a variant type instead of a bool flag? I find these both more descriptive and easier to extend.

@kLabz
Copy link
Contributor Author

kLabz commented Oct 30, 2025

Can we use a variant type instead of a bool flag? I find these both more descriptive and easier to extend.

Sure. Though at the moment I don't have much inspiration for the naming of the type + argument name 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants