-
Notifications
You must be signed in to change notification settings - Fork 19
fix: backport im string parsing fix to release-v1 #169
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
Open
MilesCranmerBot
wants to merge
6
commits into
SymbolicML:release-v1
Choose a base branch
from
MilesCranmerBot:bot/backport-fix-im-string-parse-release-v1
base: release-v1
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
741031c
fix: treat im as imaginary unit in string parsing
MilesCranmerBot c5f6bba
fix: address review suggestions for im parse
MilesCranmerBot 63d7900
style: run JuliaFormatter
MilesCranmerBot e835279
style: remove unnecessary inline parse helpers
MilesCranmer 59815bb
fix: adapt im parsing backport for release-v1
MilesCranmerBot be27550
fix: repair parse test traversal for Node on release-v1
MilesCranmerBot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Looks like a new feature rather than a backport? Can you clarify @MilesCranmerBot
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.
Yep — it looks like a feature addition in release-v1, but it’s actually a straight backport of what already landed on
master.On
masterthe fix is introduced in commit741031c4(“fix: treat im as imaginary unit in string parsing”) and includes::im→ the Julia constantimwhen parsing (unless "im" is explicitly listed invariable_names, in which case it stays a variable), andparse_expression(::String)(also present onmaster).I included the
::Stringoverload here only to keeprelease-v1behavior/API aligned withmasterfor this parsing path; if you’d prefer the backport to be strictly minimal, I’m happy to drop that overload and have the test callMeta.parse(...)explicitly instead.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.
Yep — this PR is meant to be a straight backport of #168 (merged to
master).The only extras here are release-v1-specific adaptation:
release-v1didn’t have the convenience methodparse_expression(::String)thatmasteralready has. I added it as a tiny wrapper aroundMeta.parseso the same regression test can run. It doesn’t enable anything you couldn’t already do viaparse_expression(Meta.parse(str); ...).l/rinstead of thechildrenrepresentation onmaster).The actual behavior change being backported is just normalizing the
:imsymbol to Julia’s imaginary unit constant unless"im"is explicitly listed invariable_names(in which case it remains a variable).If you’d prefer to keep release-v1’s public API surface strictly frozen, I can drop the
parse_expression(::String)method and update the test to callMeta.parseexplicitly.