-
Notifications
You must be signed in to change notification settings - Fork 125
Minimize number of tool execution runs #1898
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
Conversation
if (_libraryDocs == null) { | ||
_libraryDocs = _setCanonicalFor(super.documentation); | ||
// TODO(jcollins-g): warn if a macro/tool _does_ generate an unexpected | ||
// canonicalFor? |
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.
Yeah, that's a good idea.
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.
It didn't seem super urgent so I didn't bother here, but in the long run...
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 may well be missing nuances but on the surface this looks like exactly what we want. Thanks!
* canonicalFor must be declared literally in the library * Add tests for minimizing tool execution * dartfmt * Workaround problem with mixins on 2.1.0 stable * Review comments
Make
@canonicalFor
no longer able to be detected from macros or tools, but in so doing restrict tool executions to only documentation that will be used (dartdoc-canonical ModelElement instances, or ModelElements that have no canonicalization).As an aside, this seems to improve dartdoc's overall performance on flutter by about 15%.