-
Notifications
You must be signed in to change notification settings - Fork 118
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
Documentation for functions in enum
s are linked but not generated
#3584
Comments
srawlins
added
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
P1
A high priority bug; for example, a single project is unusable or has many test failures
labels
Feb 28, 2024
Sorry for the extreme delay (dartdoc has fallen through the gaps in our triage process). I think there is a sizeable blind spot here with enhanced enums. I noticed that dartdoc's Enum doesn't inherit from Class, but it really probably should. |
srawlins
added a commit
to srawlins/dartdoc
that referenced
this issue
Mar 1, 2024
Fixes dart-lang#3584 The GeneratorFrontEnd code was really long, and I think that made it easy to omit things. I've refactored it to reuse more code. Also, the repeated code had bugs: * For extensions and extension types, we likely _over_-documented, because we didn't omit things that we're canonical. * For enums, we omitted static methods and static fields (dart-lang#3584). Also in this change: * Change some `clazz` and `eNum` parameter names to `class_` and `enum_`. More standard, and standard inside the analyzer. * Migrate methods_test.dart to use test_reflective_loader. * Add method tests for methods on classes, enums, mixins, extensions, and extension types. * In the shared testing code, add some code that prints out the in-memory files when a file cannot be read. Here's a snippet of what that looks like: ```none /temp/method_test/doc/ ├─ index.html ├─ __404error.html ├─ search.html ├─ lib/ │ ├─ lib-library.html │ ├─ lib-library-sidebar.html │ ├─ E-class.html │ ├─ E-enum-sidebar.html │ └─ E/ │ │ ├─ values-constant.html ```
1 task
srawlins
added a commit
to srawlins/dartdoc
that referenced
this issue
Mar 1, 2024
Fixes dart-lang#3584 The GeneratorFrontEnd code was really long, and I think that made it easy to omit things. I've refactored it to reuse more code. Also, the repeated code had bugs: * For extensions and extension types, we likely _over_-documented, because we didn't omit things that we're canonical. * For enums, we omitted static methods and static fields (dart-lang#3584). Also in this change: * Change some `clazz` and `eNum` parameter names to `class_` and `enum_`. More standard, and standard inside the analyzer. * Migrate methods_test.dart to use test_reflective_loader. * Add method tests for methods on classes, enums, mixins, extensions, and extension types. * In the shared testing code, add some code that prints out the in-memory files when a file cannot be read. Here's a snippet of what that looks like: ```none /temp/method_test/doc/ ├─ index.html ├─ __404error.html ├─ search.html ├─ lib/ │ ├─ lib-library.html │ ├─ lib-library-sidebar.html │ ├─ E-class.html │ ├─ E-enum-sidebar.html │ └─ E/ │ │ ├─ values-constant.html ```
srawlins
added a commit
to srawlins/dartdoc
that referenced
this issue
Mar 6, 2024
Fixes dart-lang#3584 The GeneratorFrontEnd code was really long, and I think that made it easy to omit things. I've refactored it to reuse more code. Also, the repeated code had bugs: * For extensions and extension types, we likely _over_-documented, because we didn't omit things that we're canonical. * For enums, we omitted static methods and static fields (dart-lang#3584). Also in this change: * Change some `clazz` and `eNum` parameter names to `class_` and `enum_`. More standard, and standard inside the analyzer. * Migrate methods_test.dart to use test_reflective_loader. * Add method tests for methods on classes, enums, mixins, extensions, and extension types. * In the shared testing code, add some code that prints out the in-memory files when a file cannot be read. Here's a snippet of what that looks like: ```none /temp/method_test/doc/ ├─ index.html ├─ __404error.html ├─ search.html ├─ lib/ │ ├─ lib-library.html │ ├─ lib-library-sidebar.html │ ├─ E-class.html │ ├─ E-enum-sidebar.html │ └─ E/ │ │ ├─ values-constant.html ```
srawlins
added a commit
that referenced
this issue
Mar 7, 2024
* Generate docs for enum static methods. Fixes #3584 The GeneratorFrontEnd code was really long, and I think that made it easy to omit things. I've refactored it to reuse more code. Also, the repeated code had bugs: * For extensions and extension types, we likely _over_-documented, because we didn't omit things that we're canonical. * For enums, we omitted static methods and static fields (#3584). Also in this change: * Change some `clazz` and `eNum` parameter names to `class_` and `enum_`. More standard, and standard inside the analyzer. * Migrate methods_test.dart to use test_reflective_loader. * Add method tests for methods on classes, enums, mixins, extensions, and extension types. * In the shared testing code, add some code that prints out the in-memory files when a file cannot be read. Here's a snippet of what that looks like: ```none /temp/method_test/doc/ ├─ index.html ├─ __404error.html ├─ search.html ├─ lib/ │ ├─ lib-library.html │ ├─ lib-library-sidebar.html │ ├─ E-class.html │ ├─ E-enum-sidebar.html │ └─ E/ │ │ ├─ values-constant.html ``` * Back out inheritance change
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you define an
enum
with a function in it, then the documentation page for thatenum
will have a link to a documentation page about that function (and even the doc comment for the function), however the page for the function will be missing.In addition, since the target of the link is missing,
--validate-links
will trigger a warning. This was annoying to debug because of #3331. I had to run this repo in debug mode and addprint
statements to figure out what was missing since I didn't know what the warning was.To reproduce, create an
enum
with astatic
function in it, for example:The generated documentation will include
MyEnum
and a link tomyFunction
, as expected, however the link (circled) will be dead because the doc page formyFunction
is not generated.The text was updated successfully, but these errors were encountered: