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

at-doc return type depends on whether REPL is loaded #55438

Closed
stevengj opened this issue Aug 9, 2024 · 3 comments
Closed

at-doc return type depends on whether REPL is loaded #55438

stevengj opened this issue Aug 9, 2024 · 3 comments
Labels
bug Indicates an unexpected problem or unintended behavior docsystem The documentation building system regression Regression in behavior compared to a previous version

Comments

@stevengj
Copy link
Member

stevengj commented Aug 9, 2024

Normally, the @doc macro returns a Markdown.MD object:

% julia -e "println(typeof(@doc Real))"
Markdown.MD

However, in nightly (1.12.0-DEV.1030) the return type is Base.Docs.DocStr unless the REPL module is imported:

% ./julia -e "println(typeof(@doc Real))"
Base.Docs.DocStr
% ./julia -e "import REPL; println(typeof(@doc Real))"
Markdown.MD

This seems like a bug — I noticed it because of a test failure JuliaIO/StructIO.jl#30 in the StructIO.jl package (since package tests do not load the REPL module by default, a test for a documentation string was failing).

@stevengj stevengj added bug Indicates an unexpected problem or unintended behavior docsystem The documentation building system regression Regression in behavior compared to a previous version labels Aug 9, 2024
@yuyichao
Copy link
Contributor

yuyichao commented Aug 9, 2024

Also ref JuliaPy/PyCall.jl#1059

@thofma
Copy link
Contributor

thofma commented Aug 9, 2024

Dup of #54664

@stevengj
Copy link
Member Author

stevengj commented Aug 9, 2024

Closing as duplicate.

@stevengj stevengj closed this as completed Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior docsystem The documentation building system regression Regression in behavior compared to a previous version
Projects
None yet
Development

No branches or pull requests

3 participants