-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
misc fixes to flatten
#197
Conversation
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## master #197 +/- ##
==========================================
+ Coverage 73.76% 79.62% +5.85%
==========================================
Files 9 10 +1
Lines 404 422 +18
==========================================
+ Hits 298 336 +38
+ Misses 106 86 -20
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Thank you for working on this!
Thanks for the quick review, Cédric! My comment for the error message is a personal preference, but of course I will change it if you confirm that you as a maintainer prefer the shorter style. I think I have given a complete argument for why simplifying the treatment of the try block would not work. Let me know if I am missing something or if you want me to approach it differently. There are newly added tests that run on all julia versions and more tests for >=1.8 which are the only versions with support for |
I don't have a strong personal preference, but conciseness is a pretty big theme of this package and I'm inclined to follow it, if you don't mind. In any case, I would at least take out the |
I will try to do a couple more changes, currently I reintroduced an issue with ResumableFunctions. Moving this to a draft. |
I think now all comments are addressed. The difficulty was that arg[2] had to be a symbol or false, unlike the arg[3] or arg[4] which have to be a block or false. This is what makes it difficult to just use a Now it is as simple as I can think to make it. Added clarification comments in code and tests. Added more tests. Fixed the error messages. Please excuse the confused back and forth, I do not have much experience working with Julia macros. |
Made the changes such that unnatural block-less try expressions are not forced to have a block inserted around them anymore and simplified the code as you suggested. Added tests for the block-less try expressions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯 It's a really nice PR, thank you for bearing with me on the iterations!
Co-authored-by: Cédric St-Jean <[email protected]>
Should we consider this a breaking change? I think no, I think it's a bugfix, but still, could you please summarize the expressions whose outcome has changed? If you run the test suite on 1.9 without this PR, what fails? Last I checked MacroTools is used in thousands of packages, so personally it's always a bit unnerving to tag a new release. I think we should sleep on this PR for a week or so in case we think of something wrong. Don't hesitate to ping on this PR in case I forget about it. Typhoon's about to hit where I live... |
I think it should be tagged as a bug fix. For the following two bugs.
I suggest tagging as bug fix and only if there is a complaint we can yank the release from the registry and tag as breaking. I do not expect complaints though. I agree about waiting a week. Be safe in the storm! |
The last commit documents what issue existed both in 1.9 and 1.10 and what is the issue that existed only in 1.10. All tests in CI pass. All my local tests on 1.9 and nightly pass for MacroTools, ResumableFunctions, and ConcurrentSim (the original library in which I detected these issues). The PR was reviewed and approved. Should be good for merge and release as non-breaking bug fix after a week of due-diligence wait time. |
@cstjean , I hope the storm was not too bad! Bumping this in case it can be merged now. |
Fixes JuliaLang/julia#50710
Fixes #196
Fixes #194
Closes #195