-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Fix docstring search by signatures revisited #54324
Open
projekter
wants to merge
4
commits into
JuliaLang:master
Choose a base branch
from
projekter:m3/docs-signature
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes seem reasonable/good/bugfixes, but I'm worried how breaking they might be to docsystem building across the ecosystem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to figure this out? From some JuliaCon talks for example I get the impression that it is possible to test many or all packages with a modified Julia version and see what happens. If the documentation of a package would require changes, then this would result in an error during precompilation or when building the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is nanosoldier, but that only runs testsuites which often do not include building docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Base, most changes occur in docstrings (as opposed to separate documentation files), and a missing change gives an error during precompilation. So with nanosoldier we might still get an idea of how big the problem really is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also have thought that this issue should be detected by Nanosoldier.
The only way to circumvent this possible incompatibility is if we decide to formally allow this syntax for functions. (But then, it should be documented somewhere.)
Then, it should also formally be defined show this syntax is interpreted. If we just say that in the documentation,
fun{X}(args)
is exactly equivalent tofun(args) where {X}
, then it is clear that everything inX
is a type variable (with possible subtyping). Apart from the case in whichfun
is the name of a type/constructor, as then it could also be a concrete type (or some other bitstype). I previously thought that it is not easily possible for the macro-called function determining which is the case, but as I now think of it, I'm no longer so sure. For outer constructors, for sure when the macro is called, the type must already exist. And in order for the Julia compiler to acceptfun{X}
withoutX
being in thewhere
clause,X
must also be well defined (in the context of the calling module, which is available to the macro). I don't know how it is when the docstring is attached to an inner constructor, though.Then, in the specification of what
fun{X}(args)
means whenfun
is a constructor, should we allow mixing actual generic types (coming first?) with parametric types from the arguments (pretty clumsy IMHO)? Or just disallow this shorthand notation?