Skip to content

Add scoped lookup to Libraries #2671

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 5 commits into from
Jun 9, 2021

Conversation

jcollins-g
Copy link
Contributor

This adds a scope implementation for Library which allows us to use the analyzer scope for imported and defined objects, reducing the custom implementation to allowing export lookups. Since we prioritize analyzer resolution, edge cases will now favor imports over exports where it can make a difference.

Also did some small cosmetic changes to make warning links show up more consistently in IntelliJ terminal output.

Comparison of sdk docs using dart --enable-asserts dartdoc.dart --sdk-docs --warnings reference-lookup-found-with-new,reference-lookup-missing-with-new,reference-lookup-not-found-with-new --show-stats:

this PR:

total references: 29582
resolved references:  22262 (75.25522277060375%)
resolved references with new lookup:  28738 (97.14691366371441%)
resolved references with old lookup:  22262 (75.25522277060375%)
resolved references with equivalent links:  28996 (98.0190656480292%)

Head:

total references: 29582
resolved references:  22262 (75.25522277060375%)
resolved references with new lookup:  26672 (90.16293692110067%)
resolved references with old lookup:  22262 (75.25522277060375%)
resolved references with equivalent links:  26945 (91.08579541613143%)

@google-cla google-cla bot added the cla: yes Google CLA check succeeded. label Jun 9, 2021
@srawlins
Copy link
Member

srawlins commented Jun 9, 2021

total references: 29582
This PR: resolved references with new lookup: 28738 (97.14691366371441%)
Head: resolved references with new lookup: 26672 (90.16293692110067%)

That's wild! Huge boost.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 57.566% when pulling bd8d3c5 on jcollins-g:lookup-test-iter into 02a467b on dart-lang:master.

@jcollins-g jcollins-g requested a review from srawlins June 9, 2021 00:36
String get location => packageGraph.resourceProvider.pathContext
.toUri(documentationFile.path)
.toString();
String get location => '(${documentationFile.path})';
Copy link
Member

Choose a reason for hiding this comment

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

👍

@jcollins-g jcollins-g merged commit a916e60 into dart-lang:master Jun 9, 2021
@jcollins-g jcollins-g deleted the lookup-test-iter branch June 9, 2021 15:57
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.

3 participants