Skip to content

Use analyzer line number library #2034

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

Merged
merged 14 commits into from
Oct 11, 2019
Merged

Use analyzer line number library #2034

merged 14 commits into from
Oct 11, 2019

Conversation

jcollins-g
Copy link
Contributor

@jcollins-g jcollins-g commented Oct 4, 2019

Fixes #1938, replacing #1939.

This removes the line number cache from dartdoc and also fixes a number of minor problems in addition to #1938:

  • All edge cases where we didn't report a location at all are fixed
    • Make synthetic constructors refer to their classes
    • Do something reasonable for the location of an enum's toString()
  • Make fields and top level variables defer to defined accessors for warnings, rather than the other way around, to make locations for those warnings accurate and distinct
  • No longer claim in warnings that documentation is inherited when it isn't

Dartdoc overall is very slightly faster as well (~1%), we were spending a measurable amount time counting lines that the analyzer had already figured out.

@googlebot googlebot added the cla: yes Google CLA check succeeded. label Oct 4, 2019
@coveralls
Copy link

coveralls commented Oct 4, 2019

Coverage Status

Coverage decreased (-0.3%) to 93.866% when pulling 6d6d973 on fix-line-number-cache into 451c718 on master.

@jcollins-g jcollins-g requested review from pq and stereotype441 October 7, 2019 20:43
Copy link
Member

@pq pq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Paul may have more substantial things to say but from my vantage LGTM!

@jcollins-g jcollins-g merged commit 3375875 into master Oct 11, 2019
@jcollins-g jcollins-g deleted the fix-line-number-cache branch October 11, 2019 21:26
Cliabhach added a commit to Cliabhach/dartdoc that referenced this pull request Apr 19, 2022
Fixes compat with timezone 0.8.0

We try to place error messages for synthetic elements at
either its setter or at its getter. Before now, that
setter/getter had to be both public and synthetic; now,
we'll just print a warning if that check fails. Note that
we still error out if we can't find any setter or getter.

Related to dart-lang#2034
Cliabhach added a commit to Cliabhach/dartdoc that referenced this pull request May 17, 2022
Fixes compat with timezone 0.8.0

We try to place error messages for synthetic elements at
either its setter or at its getter. Before now, that
setter/getter had to be both public and synthetic; now,
we'll just print a warning if that check fails. Note that
we still error out if we can't find any setter or getter.

Related to dart-lang#2034
Cliabhach added a commit to Cliabhach/dartdoc that referenced this pull request Jun 11, 2022
Fixes compat with timezone 0.8.0

We try to place error messages for synthetic elements at
either its setter or at its getter. Before now, that
setter/getter had to be both public and synthetic; now,
we'll just print a warning if that check fails. Note that
we still error out if we can't find any setter or getter.

Related to dart-lang#2034
Cliabhach added a commit to Cliabhach/dartdoc that referenced this pull request Jan 10, 2023
Fixes compat with timezone 0.8.0

We try to place error messages for synthetic elements at
either its setter or at its getter. Before now, that
setter/getter had to be both public and synthetic; now,
we'll just print a warning if that check fails. Note that
we still error out if we can't find any setter or getter.

Related to dart-lang#2034
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Google CLA check succeeded.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dartdoc throws exception attempting to find offset inside empty file
4 participants