Skip to content
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

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

Open
lgoettgens opened this issue Jun 4, 2024 · 1 comment
Open

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

lgoettgens opened this issue Jun 4, 2024 · 1 comment

Comments

@lgoettgens
Copy link
Contributor

#54499 approached to fix #52986 (to no longer return nothing without REPL).
But as @ztangent and @KristofferC discussed in #52986 (comment), the returned object is still different, making tests like probcomp/Gen.jl#523 and Nemocas/AbstractAlgebra.jl#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
Copy link
Contributor Author

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

jmert added a commit to jmert/BitFlags.jl that referenced this issue Jun 19, 2024
The change in JuliaLang/julia#54499 fixed the ability to access/copy
doc strings without needing to take an explicit dependency on the
REPL package, but the returned object does not trivially reduce back
to a string, as described in issue JuliaLang/julia#54664.

Instead of waiting for that issue to get resolved at the Julia level
to fix our tests, just add a helper shim to the tests to access the
desired information. The goal is to just ensure that the macro
`@__doc__` expression is correctly used to permit documenting the
generated type definitions, so we don't really care about the specific
form as long as Julia uses it correctly within the docs system.
jmert added a commit to jmert/BitFlags.jl that referenced this issue Jun 19, 2024
The change in JuliaLang/julia#54499 fixed the ability to access/copy
doc strings without needing to take an explicit dependency on the
REPL package, but the returned object does not trivially reduce back
to a string, as described in issue JuliaLang/julia#54664.

Instead of waiting for that issue to get resolved at the Julia level
to fix our tests, just add a helper shim to the tests to access the
desired information. The goal is to just ensure that the macro
`@__doc__` expression is correctly used to permit documenting the
generated type definitions, so we don't really care about the specific
form as long as Julia uses it correctly within the docs system.
jmert added a commit to jmert/BitFlags.jl that referenced this issue Jun 19, 2024
The change in JuliaLang/julia#54499 fixed the ability to access/copy
doc strings without needing to take an explicit dependency on the
REPL package, but the returned object does not trivially reduce back
to a string, as described in issue JuliaLang/julia#54664.

Instead of waiting for that issue to get resolved at the Julia level
to fix our tests, just add a helper shim to the tests to access the
desired information. The goal is to just ensure that the macro
`@__doc__` expression is correctly used to permit documenting the
generated type definitions, so we don't really care about the specific
form as long as Julia uses it correctly within the docs system.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant