-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Base
: macro b_str
: restrict argument to String
#57863
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
Merged
KristofferC
merged 1 commit into
JuliaLang:master
from
nsajko:Base_restrict_macro_b_str_argument_to_String
Mar 25, 2025
Merged
Base
: macro b_str
: restrict argument to String
#57863
KristofferC
merged 1 commit into
JuliaLang:master
from
nsajko:Base_restrict_macro_b_str_argument_to_String
Mar 25, 2025
+1
−1
Conversation
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
Should make the sysimage less vulnerable to invalidation. As far as I understand this change can't break any code, because: * the macro definition requires `AbstractString` * the way Julia macros work, the argument is either a literal or an `Expr` * `String` is the only `AbstractString` with literals
Prevents the invalidation: {
"method_instance": {
"method": "var\"@b_str\"(__source__::LineNumberNode, __module__::Module, s) @ Base strings/io.jl:588",
"method_instance": "MethodInstance for var\"@b_str\"(::LineNumberNode, ::Module, ::Any)"
},
"children": [
]
} Also fixing the following invalidation would cause a chain reaction where even more invalidation gets fixed (for a future PR to JuliaSyntax): {
"method_instance": {
"method": "var\"@u8_str\"(__source__::LineNumberNode, __module__::Module, str) @ Base.JuliaSyntax /cache/build/builder-amdci5-7/julialang/julia-master/base/JuliaSyntax/src/utils.jl:54",
"method_instance": "MethodInstance for Base.JuliaSyntax.var\"@u8_str\"(::LineNumberNode, ::Module, ::Any)"
},
"children": [
]
} |
KristofferC
pushed a commit
that referenced
this pull request
Mar 26, 2025
Should make the sysimage less vulnerable to invalidation. As far as I understand this change can't break any code, because: * the macro definition requires `AbstractString` * the way Julia macros work, the argument is either a literal or an `Expr` * `String` is the only `AbstractString` with literals (cherry picked from commit 87f4d3a)
KristofferC
pushed a commit
that referenced
this pull request
Mar 31, 2025
Should make the sysimage less vulnerable to invalidation. As far as I understand this change can't break any code, because: * the macro definition requires `AbstractString` * the way Julia macros work, the argument is either a literal or an `Expr` * `String` is the only `AbstractString` with literals (cherry picked from commit 87f4d3a)
KristofferC
pushed a commit
that referenced
this pull request
Mar 31, 2025
Should make the sysimage less vulnerable to invalidation. As far as I understand this change can't break any code, because: * the macro definition requires `AbstractString` * the way Julia macros work, the argument is either a literal or an `Expr` * `String` is the only `AbstractString` with literals (cherry picked from commit 87f4d3a)
KristofferC
pushed a commit
that referenced
this pull request
Mar 31, 2025
Should make the sysimage less vulnerable to invalidation. As far as I understand this change can't break any code, because: * the macro definition requires `AbstractString` * the way Julia macros work, the argument is either a literal or an `Expr` * `String` is the only `AbstractString` with literals (cherry picked from commit 87f4d3a)
KristofferC
pushed a commit
that referenced
this pull request
Jun 5, 2025
Should make the sysimage less vulnerable to invalidation. As far as I understand this change can't break any code, because: * the macro definition requires `AbstractString` * the way Julia macros work, the argument is either a literal or an `Expr` * `String` is the only `AbstractString` with literals (cherry picked from commit 87f4d3a)
KristofferC
pushed a commit
that referenced
this pull request
Jul 3, 2025
Should make the sysimage less vulnerable to invalidation. As far as I understand this change can't break any code, because: * the macro definition requires `AbstractString` * the way Julia macros work, the argument is either a literal or an `Expr` * `String` is the only `AbstractString` with literals (cherry picked from commit 87f4d3a)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Should make the sysimage less vulnerable to invalidation.
As far as I understand this change can't break any code, because:
AbstractString
Expr
String
is the onlyAbstractString
with literals