-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Docsystem refactoring #13330
Merged
jakebolewski
merged 2 commits into
JuliaLang:master
from
MichaelHatherly:mh/docsys-fixes
Sep 28, 2015
Merged
Docsystem refactoring #13330
jakebolewski
merged 2 commits into
JuliaLang:master
from
MichaelHatherly:mh/docsys-fixes
Sep 28, 2015
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Combines the `doc(::Function)` and `doc(::DataType)` methods since they were nearly identical. Enables searching for docstrings attached to specific constructors in the same manner as is currently allowed for normal methods. Prior to this it resulted in a no method error. Fixes JuliaLang#12701 where splatted method docs were shadowing others. Although not the original cause of the issue, with the change to storing signatures as `Tuple{...}` (in JuliaLang#12835) this meant that `f(x...)` was stored as `Tuple{Vararg{Any}}` which is equal to `Tuple`. Since the default value of `sig` was `Tuple` not all matching docs were returned in the example provided in JuliaLang#12701.
Enable `apropos` search via help mode by passing a string or regex: help?> "foo" help?> r"foo" This shouldn't interfere with any docstring lookup since we don't encourage documenting specific strings or regex objects. Docs for `@r_str` can still be found by searching for either an empty regex `r""` or `@r_str` directly. Enable specifying method signatures using help?> f(::Float64, ::Int) as well as the current behaviour help?> f(x, y) where `x` and `y` are already defined. This is quite useful when you don't have an instance of the required type. Prior to this an error was thrown in `gen_call_with_extracted_types` when using the `::` syntax.
The backtrace problem is known about and is not related, I'm also waiting for a fix. |
Yeah, #13322 was merged which looks like it's meant to address the problem. |
Much needed, thanks! |
tkelman
pushed a commit
that referenced
this pull request
Sep 28, 2015
Combines the `doc(::Function)` and `doc(::DataType)` methods since they were nearly identical. Enables searching for docstrings attached to specific constructors in the same manner as is currently allowed for normal methods. Prior to this it resulted in a no method error. Fixes #12701 where splatted method docs were shadowing others. Although not the original cause of the issue, with the change to storing signatures as `Tuple{...}` (in #12835) this meant that `f(x...)` was stored as `Tuple{Vararg{Any}}` which is equal to `Tuple`. Since the default value of `sig` was `Tuple` not all matching docs were returned in the example provided in #12701. (cherry picked from commit 1b1e6c6) ref #13330
Thanks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Minor docsystem refactoring.
Combines the
doc(::Function)
anddoc(::DataType)
methods since they were nearly identical.Enables searching for docstrings attached to specific constructors in the same manner as is currently allowed for normal methods. Prior to this it resulted in a no method error.
Fixes #12701 where splatted method docs were shadowing others. Although not the original cause of the issue, with the change to storing signatures as
Tuple{...}
(in #12835) this meant thatf(x...)
was stored asTuple{Vararg{Any}}
which is equal toTuple
. Since the default value ofsig
wasTuple
not all matching docs were returned in the example provided in #12701.Simplify
@repl
implementation.Enable
apropos
search via help mode by passing a string or regex:This shouldn't interfere with any docstring lookup since we don't encourage documenting specific strings or regex objects. Docs for
@r_str
can still be found by either using an empty regexr""
or@r_str
directly.Enable specifying method signatures using
as well as the current behaviour
where
x
andy
are already defined. This is quite useful when you don't have an instance of the required type. Prior to this an error was thrown ingen_call_with_extracted_types
when using the::
syntax.Tests are failing with
julia/test$ make docs
does pass for me locally though.