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

Doc generator creates links to features in excluded namespaces #9816

Open
j8r opened this issue Oct 9, 2020 · 4 comments · Fixed by #9819, #14878 or #14910
Open

Doc generator creates links to features in excluded namespaces #9816

j8r opened this issue Oct 9, 2020 · 4 comments · Fixed by #9819, #14878 or #14910
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:tools:docs-generator

Comments

@j8r
Copy link
Contributor

j8r commented Oct 9, 2020

Crystal doc lists all Direct Known Subclasses, even :nodoc: hidden ones. Clinking on them leads to a dead link.

Example: https://crystal-lang.org/api/master/Struct.html#direct-known-subclasses with Crystal::DWARF::Abbrev, and other objects.

@Blacksmoke16
Copy link
Member

This seems to be related to :nodoc: not being supported when defined as part of a higher level namespace. I.e. its defined as part of Crystal::DWARF, but not the Abbrev type within that namespace.

@straight-shoota
Copy link
Member

#9819 fixed :nodoc: namespaces, but there are other reasons for not being included in the documentation (lib types are not documented). So I've reopened this to keep track of that.

IMO the best solution for this would be a complete refactoring to make the doc generator keep track of which namespaces are included and simply check against that list when generating links etc.

cf/#9931 (comment)

@straight-shoota straight-shoota changed the title Crystal doc reference :nodoc: objects in Known Subclasses Doc generator creates links to features in excluded namespaces Nov 21, 2020
@straight-shoota straight-shoota added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:tools:docs-generator labels Nov 21, 2020
@straight-shoota
Copy link
Member

The generator als lists class methods (probably instance methods as well?) inherited from an undocumented ancestor.
For example on https://crystal-lang.org/api/1.13.1/File.html: "Class methods inherited from module Crystal::System::File".

@straight-shoota
Copy link
Member

straight-shoota commented Oct 7, 2024

#14878 and #14878 were both intended to fix this but they were insufficient and got reverted. So we need to reopen this again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:tools:docs-generator
Projects
None yet
3 participants