- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Labels
docsThis change adds or pertains to documentationThis change adds or pertains to documentationregressionRegression in behavior compared to a previous versionRegression in behavior compared to a previous version
Milestone
Description
As the title says this seems to be the case because in a PR on SumTypes.jl (https://github.com/MasonProtter/SumTypes.jl/pull/63/files) the doctest failing is only on nightly, while all the other works well, as you can see at https://github.com/MasonProtter/SumTypes.jl/actions/runs/7595253256/job/20687608559 the test fails with
Basics : Test Failed at /home/runner/work/SumTypes.jl/SumTypes.jl/test/runtests.jl:40
Expression: string(#= /home/runner/work/SumTypes.jl/SumTypes.jl/test/runtests.jl:40 =# @doc(Foo)) == "This is a Foo.\n"
Evaluated: "nothing" == "This is a Foo.\n"
while for all other Julia versions it returns "This is a Foo.\n"
. Same is happening also on the CI of ProtoStructs.jl e.g. here https://github.com/BeastyBlacksmith/ProtoStructs.jl/actions/runs/7500520539/job/20419369109
Unfortunately I wasn't able to find a MWE when I searched for it
Metadata
Metadata
Assignees
Labels
docsThis change adds or pertains to documentationThis change adds or pertains to documentationregressionRegression in behavior compared to a previous versionRegression in behavior compared to a previous version
Activity
vtjnash commentedon Jan 20, 2024
This is a REPL-only feature. Packages should normally be using
@ref
links, not copying the text from elsewhere. E.g.:KristofferC commentedon Jan 20, 2024
This doesn't make sense to me... Why would the docsystem work differently if the REPL is loaded? Seems something should be moved back to Base.
jmert commentedon Jan 23, 2024
See also #52141.
@doc
changes behaviour during testing #53349Load the REPL module in the tests so we can use @docs
JamesWrigley commentedon Mar 6, 2024
This also hit the Clang.jl tests. Here's a MWE:
And the output on v1.11 alpha
Vs 1.10.2 (without
Base.hasdoc()
):It looks like the macro is returning a
nothing
value instead of anExpr
?Load the REPL module in the tests so we can use @docs
Load the REPL module in the tests so we can use @docs
KristofferC commentedon Mar 6, 2024
One issue with this is that
@doc
gives you are markdown object, which is defined in another stdlib.Load the REPL module in the tests so we can use @docs
24 remaining items
JamesWrigley commentedon Sep 2, 2024
(bump)
JamesWrigley commentedon Sep 9, 2024
@KristofferC, @JeffBezanson, apologies for the direct ping but I think this isn't fully fixed yet. Could it be reopened?
JeffBezanson commentedon Sep 17, 2024
I have a fix.
The docsystem design really has problems. For example in this case
@time
can take either one or two arguments, so those are its valid "signatures" according to the docsystem. And@doc @time
is asking about zero arguments, so there are no matches. BUT that's the syntax for asking for help for any arguments, so there's a rule that you have to return all of the matches if there aren't any. I mean it kind of makes sense in terms of "helpfulness", but the way it's implemented we can't distinguish between asking for all the docs for something, and asking for something that doesn't exist likesin
with 7 arguments.lgoettgens commentedon Sep 17, 2024
Does your fix, by any chance, also fix #52986 (comment) and thus #54664 as well?
fix #52986, regression in `@doc` of macro without REPL loaded
JeffBezanson commentedon Sep 17, 2024
No it does not. We can think about what to do about that separately.
@doc
of macro without REPL loaded #55795KristofferC commentedon Sep 19, 2024
I think we discussed
@doc
always returning aString
which the REPL then parses into Markdown to display.fix JuliaLang#52986, regression in `@doc` of macro without REPL loaded (
fix #52986, regression in `@doc` of macro without REPL loaded (#55795)
Backports release 1.11 (#55855)
Updating our dev branches (#66)