Skip to content

Tool output not being substituted sometimes. #1930

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

Closed
gspencergoog opened this issue Feb 8, 2019 · 9 comments
Closed

Tool output not being substituted sometimes. #1930

gspencergoog opened this issue Feb 8, 2019 · 9 comments
Assignees
Labels
customer-flutter Issues originating from important to Flutter P1 A high priority bug; for example, a single project is unusable or has many test failures type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@gspencergoog
Copy link
Collaborator

After some recent changes it appears that tool directives are not always being run, or at least the results of their run aren't being interpolated into the HTML.

An example is in Chip.onDeleted in the Flutter docs.

The snippet code there is being generated, so I think the tool is being run, but for some reason the output isn't being put back into the HTML.

@gspencergoog gspencergoog added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) customer-flutter Issues originating from important to Flutter labels Feb 8, 2019
@gspencergoog gspencergoog changed the title Tools not being run sometimes. Tool output not being substituted sometimes. Feb 8, 2019
@jcollins-g jcollins-g added P2 A bug or feature request we're likely to work on P1 A high priority bug; for example, a single project is unusable or has many test failures and removed P2 A bug or feature request we're likely to work on labels Feb 11, 2019
@jcollins-g
Copy link
Contributor

Marking as P1 esp since it's not clear to me how common this is yet.

@jcollins-g jcollins-g self-assigned this Feb 11, 2019
@gspencergoog
Copy link
Collaborator Author

It definitely doesn't happen all the time: most of the other examples I've looked at are correct, so maybe it's somethig odd with this one, but if so, it's not obvious: the dartdoc looks right to me.

@jcollins-g
Copy link
Contributor

This seems to be a problem with how we are deciding to skip precaching for elements that will never be documented. Sometimes we are apparently guessing wrong.

@jcollins-g
Copy link
Contributor

jcollins-g commented Feb 11, 2019

Narrowed this down further. In precacheLocalDocs we are missing a case where a documented canonical element inherits its documentation from an element that is not documented via any other means. ((not correct, see below))

@jcollins-g
Copy link
Contributor

I have a fix, working on tests for it now.

@jcollins-g
Copy link
Contributor

jcollins-g commented Feb 12, 2019

The fix corrects 247 instances where we are not correctly executing tools and/or not substituting them properly. P1 seems appropriate for this scale.

@jcollins-g
Copy link
Contributor

The problem has to do with Dartdoc's documentation inheritance. An @override member of a class without documentation will pick up documentation from the parent and/or interface classes. But the tooling code skipped any element whose documentationComment was null without making sure that the documentation inherited had tool strings substituted in.

@gspencergoog
Copy link
Collaborator Author

Ahh. Sorry, I wasn't aware I needed to check that.

@jcollins-g
Copy link
Contributor

@gspencergoog I think your code at least ran things once on everything. I think I introduced this when I tried to filter out duplicate or unnecessary runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-flutter Issues originating from important to Flutter P1 A high priority bug; for example, a single project is unusable or has many test failures type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

2 participants