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

Fix order in which *macro-lints* is set during expansion #1185

Merged
merged 2 commits into from
Jun 18, 2023

Conversation

chris-chambers
Copy link
Contributor

@chris-chambers chris-chambers commented Jun 9, 2023

Previously, *macro-lints* was set after the macroexpand1 fiber was resumed, rather than just before. And, *macro-lints* was never cleared. This behavior was typically fine since the main users of compile pass the same lint array repeatedly, and the first macro expansion (somewhere in boot.janet) never produces a lint. But, when compiling with a fresh lint array, if the first macro invocation produced a lint, the lint was always lost.

Previously, `*macro-lints*` was set after the `macroexpand1` fiber was
resumed, rather than just before.  And, `*macro-lints*` was never
cleared.  This behavior was typically fine since the main users of
`compile` pass the same lint array repeatedly, and the first macro
expansion (somewhere in boot.janet) never produces a lint.  But, when
compiling with a fresh lint array, if the first macro invocation
produced a lint, the lint was always lost.
@bakpakin bakpakin merged commit e2459cf into janet-lang:master Jun 18, 2023
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.

2 participants