JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
44.95k stars 5.42k forks source link

Type of `@doc x` changes when REPL is loaded #54664

Open lgoettgens opened 4 weeks ago

lgoettgens commented 4 weeks ago

https://github.com/JuliaLang/julia/pull/54499 approached to fix https://github.com/JuliaLang/julia/issues/52986 (to no longer return nothing without REPL). But as @ztangent and @KristofferC discussed in https://github.com/JuliaLang/julia/issues/52986#issuecomment-2134170341, the returned object is still different, making tests like https://github.com/probcomp/Gen.jl/issues/523 and https://github.com/Nemocas/AbstractAlgebra.jl/pull/1716 fail.

IMO, an okay solution would be to add some repr (or similar) method for Base.Doc.DocStr, so that at least string(@doc x) is consistent between 1.10 and 1.11+.

lgoettgens commented 2 weeks ago

Bump. I still see it as quite a drastic change between 1.10 and 1.11 @KristofferC @JeffBezanson