Conversation
|
In Julia 1.10, interpolation is calling the expected julia> pkgid = Base.PkgId(Base.UUID("295af30f-e4ad-537b-8983-00126c2a3abe"), "Revise")
Revise [295af30f-e4ad-537b-8983-00126c2a3abe]
julia> "$pkgid"
"Revise [295af30f-e4ad-537b-8983-00126c2a3abe]" |
|
Indeed. This PR breaks that. I'm not sure how to achieve both a usable repr and the nice interpolation version |
|
The missing qualification of julia> Base.UUID("295af30f-e4ad-537b-8983-00126c2a3abe")
UUID("295af30f-e4ad-537b-8983-00126c2a3abe")which should probably be defined as: show(io::IO, u::UUID) = print(io, UUID, "(\"", u, "\")")so that it uses the |
Interpolation calls Normally the 3-arg |
|
What I think would make sense and be helpful would be |
|
That's not the way string interpolation works with any other type of object AFAIK… I don't think it would be a good idea to make If you want the 3-arg |
Fixes the problem identified in #52795 (comment) thanks to @IanButterworth — currently, a `UUID` displays as: ```jl julia> Base.UUID("30b93cbd-6b28-44ea-8d3f-42a2b647d023") UUID("30b93cbd-6b28-44ea-8d3f-42a2b647d023") ``` even if the `UUID` symbol has not been imported. It should display as a qualified name `Base.UUID` unless `UUID` is imported (e.g. by doing `using UUIDs`). That is, after this PR you will get ```jl julia> Base.UUID("30b93cbd-6b28-44ea-8d3f-42a2b647d023") Base.UUID("30b93cbd-6b28-44ea-8d3f-42a2b647d023") ``` This is a tiny patch that just uses the standard type-printing machinery to decide how to display the `UUID` type name.
0cf80f5 to
0da3209
Compare
0da3209 to
2beec8e
Compare
|
Only ":windows: build i686-w64-mingw32" failed in 4s. |
|
I was just reading through the loading.jl file in detail, and it seems like this failed to update most of the places that I think would be expected, such as |
|
Just fix them up I guess. This is still an improvement to make the |
Fixes #52793
Although
UUIDshould beBase.UUIDotherwise this is only usable in Base.Also interpolation seems to be using the wrong show method?