Skip to content

Simplify handling of the early exit macros.#124

Merged
gafter merged 4 commits into
mainfrom
bug123
Sep 29, 2025
Merged

Simplify handling of the early exit macros.#124
gafter merged 4 commits into
mainfrom
bug123

Conversation

@gafter

@gafter gafter commented Sep 3, 2025

Copy link
Copy Markdown
Member

This should address #123 as well, making the
strategy compatible with the early access version
of Julia 1.12.

Besides simplifying the handling of nested macros within @match, this fixes an incompatibility with the Julia 1.12 rewrite of the Julia macro implementation. The issue #123 has links to the Julia issues. We now use the "normal" recursive version of the macro expansion function, as the non-recursive version is what "caused" the error. The incompatibility might or might not be fixed in Julia before 1.12 is released, but with this change it doesn't matter. It works with all Julia versions equally well.

Testing against the Julia nightly version failed because the nightly breaks the ReTest package. I did test this by hand against the most recent 1.12 preview and it doesn't have the issue reported in #123.

Fixes #123

This should address #123 as well, making the
strategy compatible with the early access version
of Julia 1.12.
@gafter
gafter requested a review from nystrom September 3, 2025 22:37
@gafter

gafter commented Sep 3, 2025

Copy link
Copy Markdown
Member Author

@nystrom, can you please have a look at this?

Comment thread src/match_return.jl Outdated
@gafter

gafter commented Sep 13, 2025

Copy link
Copy Markdown
Member Author

@nickrobinson251 @nystrom Can one of you please review this?

If I don't hear from you in a week, I'm just going to merge and register a new patch revision.

- Replace ReTest with Julia's built-in Test package in test/runtests.jl
- Remove ReTest dependency from test/Project.toml
- Add Test package dependency to test/Project.toml
- All tests continue to pass (974 tests)
- Enables compatibility with Julia 1.12 and nightly builds

This addresses the issue where ReTest doesn't compile on Julia 1.12
development versions, preventing test execution on newer Julia versions.
@gafter
gafter merged commit 920eb26 into main Sep 29, 2025
9 checks passed
@gafter
gafter deleted the bug123 branch September 29, 2025 14:59
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.

Logging inside of a @match throws an AssertionError on Julia 1.12

2 participants