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

Cache invalidation issue with AstGen errors and imports #20286

Open
SuperAuguste opened this issue Jun 13, 2024 · 0 comments
Open

Cache invalidation issue with AstGen errors and imports #20286

SuperAuguste opened this issue Jun 13, 2024 · 0 comments
Labels
bug Observed behavior contradicts documented or intended behavior frontend Tokenization, parsing, AstGen, Sema, and Liveness.
Milestone

Comments

@SuperAuguste
Copy link
Sponsor Contributor

SuperAuguste commented Jun 13, 2024

Zig Version

0.13.0 to 0.14.0-dev.32+4aa15440c

Steps to Reproduce and Observed Behavior

I've put this all in a repo for ease of reproduction: https://github.com/SuperAuguste/cache-invalidation-astgen-repro.

In short, this bug hinges on an AstGen error (a control flow diversion was chosen here, but I believe it works with other AstGen errors as well) present in an import analyzed by AstGen but not Sema.

On the first zig build, no control flow diversion error appears. All is well.

But, if you uncomment the @compileError causing the control flow diversion, instead of the error appearing, compilation still succeeds.

Thank you nitanmarcel on the Zig Discord for finding this bug!

Expected Behavior

An error occurs when the @compileError is introduced.

@SuperAuguste SuperAuguste added the bug Observed behavior contradicts documented or intended behavior label Jun 13, 2024
@mlugg mlugg added the frontend Tokenization, parsing, AstGen, Sema, and Liveness. label Jun 13, 2024
@mlugg mlugg added this to the 0.14.0 milestone Jun 13, 2024
@SuperAuguste SuperAuguste changed the title Cache invalidation issue with AstGen errors in dependencies Cache invalidation issue with AstGen errors and imports Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior frontend Tokenization, parsing, AstGen, Sema, and Liveness.
Projects
None yet
Development

No branches or pull requests

2 participants