-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
static-show: improve accuracy of some printings #52799
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
Merged
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
Member
vtjnash
commented
Jan 8, 2024
- Show strings with escaping, rather than trying to output the text unmodified.
- Show symbols with the same formatting as Strings
- Avoid accidentally defining a broken Core.show method for NamedTuple
- Show strings with escaping, rather than trying to output the text unmodified. - Show symbols with the same formatting as Strings - Avoid accidentally defining a broken Core.show method for NamedTuple
406ffa4
to
33e8cfe
Compare
kpamnany
pushed a commit
to RelationalAI/julia
that referenced
this pull request
May 23, 2025
- Show strings with escaping, rather than trying to output the text unmodified. - Show symbols with the same formatting as Strings - Avoid accidentally defining a broken Core.show method for NamedTuple
3 tasks
kpamnany
pushed a commit
to RelationalAI/julia
that referenced
this pull request
May 23, 2025
- Show strings with escaping, rather than trying to output the text unmodified. - Show symbols with the same formatting as Strings - Avoid accidentally defining a broken Core.show method for NamedTuple
kpamnany
pushed a commit
to RelationalAI/julia
that referenced
this pull request
May 23, 2025
- Show strings with escaping, rather than trying to output the text unmodified. - Show symbols with the same formatting as Strings - Avoid accidentally defining a broken Core.show method for NamedTuple
kpamnany
pushed a commit
to RelationalAI/julia
that referenced
this pull request
May 23, 2025
- Show strings with escaping, rather than trying to output the text unmodified. - Show symbols with the same formatting as Strings - Avoid accidentally defining a broken Core.show method for NamedTuple
kpamnany
pushed a commit
to RelationalAI/julia
that referenced
this pull request
May 27, 2025
- Show strings with escaping, rather than trying to output the text unmodified. - Show symbols with the same formatting as Strings - Avoid accidentally defining a broken Core.show method for NamedTuple
kpamnany
pushed a commit
to RelationalAI/julia
that referenced
this pull request
May 27, 2025
- Show strings with escaping, rather than trying to output the text unmodified. - Show symbols with the same formatting as Strings - Avoid accidentally defining a broken Core.show method for NamedTuple
kpamnany
pushed a commit
to RelationalAI/julia
that referenced
this pull request
May 29, 2025
- Show strings with escaping, rather than trying to output the text unmodified. - Show symbols with the same formatting as Strings - Avoid accidentally defining a broken Core.show method for NamedTuple
kpamnany
pushed a commit
to RelationalAI/julia
that referenced
this pull request
May 29, 2025
- Show strings with escaping, rather than trying to output the text unmodified. - Show symbols with the same formatting as Strings - Avoid accidentally defining a broken Core.show method for NamedTuple
kpamnany
pushed a commit
to RelationalAI/julia
that referenced
this pull request
May 30, 2025
- Show strings with escaping, rather than trying to output the text unmodified. - Show symbols with the same formatting as Strings - Avoid accidentally defining a broken Core.show method for NamedTuple
KristofferC
pushed a commit
that referenced
this pull request
Jun 5, 2025
- Show strings with escaping, rather than trying to output the text unmodified. - Show symbols with the same formatting as Strings - Avoid accidentally defining a broken Core.show method for NamedTuple (cherry picked from commit bd3eab6)
KristofferC
pushed a commit
that referenced
this pull request
Jun 5, 2025
- Show strings with escaping, rather than trying to output the text unmodified. - Show symbols with the same formatting as Strings - Avoid accidentally defining a broken Core.show method for NamedTuple (cherry picked from commit bd3eab6)
KristofferC
pushed a commit
that referenced
this pull request
Jun 5, 2025
- Show strings with escaping, rather than trying to output the text unmodified. - Show symbols with the same formatting as Strings - Avoid accidentally defining a broken Core.show method for NamedTuple (cherry picked from commit bd3eab6)
KristofferC
pushed a commit
that referenced
this pull request
Jun 5, 2025
- Show strings with escaping, rather than trying to output the text unmodified. - Show symbols with the same formatting as Strings - Avoid accidentally defining a broken Core.show method for NamedTuple (cherry picked from commit bd3eab6)
kpamnany
added a commit
to RelationalAI/julia
that referenced
this pull request
Jun 5, 2025
* static-show: improve accuracy of some printings (JuliaLang#52799) - Show strings with escaping, rather than trying to output the text unmodified. - Show symbols with the same formatting as Strings - Avoid accidentally defining a broken Core.show method for NamedTuple * Make more types jl_static_show unambiguously (JuliaLang#58512) Makes more types survive `jl_static_show` unambiguously: - Symbols - Symbols printed in the `:var"foo"` form use raw string escaping, fixing `:var"a\b"`, `:var"a\\"`, `:var"$a"`, etc. - Symbols that require parens use parens (`:(=)`, ...) - Signed integers: Except for `Int`, signed integers print like `Int8(1)`. - Floats: floats are printed in a naive but reversible (TODO: double check) way. `Inf(16|32|)` and `NaN(16|32|)` are printed, and `Float16`/`Float32` print the type (`Float32(1.5)`). `Float64`s are printed with a trailing `.0` if it is necessary to disambiguate from `Int`. Fixes JuliaLang#52677, JuliaLang#58484 (comment), JuliaLang#58484 (comment), and the specific case mentioned in JuliaLang#58484. Improves the situation for round-trip (inexhaustive list): - Non-canonical NaNs - BFloat16 - User-defined primitive types. This one is tricky, because they can have a size different from any type we have literals for. * Use `julia__gnu_h2f_ieee` instead of `julia_half_to_float` `julia_half_to_float` came in with an LLVM version upgrade after v1.10. --------- Co-authored-by: Jameson Nash <[email protected]> Co-authored-by: Sam Schweigel <[email protected]>
KristofferC
pushed a commit
that referenced
this pull request
Jun 5, 2025
- Show strings with escaping, rather than trying to output the text unmodified. - Show symbols with the same formatting as Strings - Avoid accidentally defining a broken Core.show method for NamedTuple (cherry picked from commit bd3eab6)
71 tasks
KristofferC
pushed a commit
that referenced
this pull request
Jul 3, 2025
- Show strings with escaping, rather than trying to output the text unmodified. - Show symbols with the same formatting as Strings - Avoid accidentally defining a broken Core.show method for NamedTuple (cherry picked from commit bd3eab6)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.