Skip to content

Base: Replace many 1-arg @asserts with 2-arg#61230

Merged
topolarity merged 1 commit intoJuliaLang:masterfrom
topolarity:ct/base-1-arg-assert
Mar 4, 2026
Merged

Base: Replace many 1-arg @asserts with 2-arg#61230
topolarity merged 1 commit intoJuliaLang:masterfrom
topolarity:ct/base-1-arg-assert

Conversation

@topolarity
Copy link
Member

@topolarity topolarity commented Mar 4, 2026

These @asserts are not directly problematic for --trim (thanks to an overload / monkey patch it does), but they can cause false positives for dynamic dispatches in JET and similar tools so it's probably best to replace them with the 2-arg variant (which just needs to print a String, rather than an Expr containing arbitrary Julia objects)

These `@assert`s are not directly problematic for `--trim`, but they can
cause false positives for dynamic dispatches in JET and similar tools so
it's probably best to replace them with the 2-arg variant (which just
needs to print a String, rather than an `Expr` containing arbitrary Julia
objects).
@topolarity topolarity requested a review from LilithHafner as a code owner March 4, 2026 15:27
@topolarity topolarity added trimming Issues with trimming functionality or PR's relevant to its performance/functionality backport 1.12 Change should be backported to release-1.12 backport 1.13 Change should be backported to release-1.13 labels Mar 4, 2026
@topolarity topolarity merged commit d64c0da into JuliaLang:master Mar 4, 2026
10 of 11 checks passed
topolarity added a commit that referenced this pull request Mar 4, 2026
These `@assert`s are not directly problematic for `--trim` (thanks to an
overload / monkey patch it does), but they can cause false positives for
dynamic dispatches in JET and similar tools so it's probably best to
replace them with the 2-arg variant (which just needs to print a String,
rather than an `Expr` containing arbitrary Julia objects)
@topolarity topolarity mentioned this pull request Mar 4, 2026
36 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 1.12 Change should be backported to release-1.12 backport 1.13 Change should be backported to release-1.13 trimming Issues with trimming functionality or PR's relevant to its performance/functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant