Skip to content
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

Refactor canonicalization more #3520

Merged
merged 3 commits into from
Oct 17, 2023

Conversation

srawlins
Copy link
Member

@srawlins srawlins commented Oct 11, 2023

A few tidyings:

  • Canonicalization.scoreCanonicalCandidates is now calculateCanonicalCandidate, and returns one Library. ScoredCandidate is then made private. Stop recalculating ElementModel.locationPieces many times to determine a canonical library.
  • Mixin hierarchies changed to support this, and I think are more correct: Canonicalization now implements Warnable; Warnable no longer implements Canonicalization; Warnable now implements Documentable and Locatable; Documentable is now a mixin; DocumentationComment now subtypes Canonicalization.
  • Many assert(x != null)s are removed as they are duplicate with another assert that immediately follows.

  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

@srawlins srawlins requested a review from keertip October 11, 2023 21:49
@srawlins srawlins merged commit 9954382 into dart-lang:main Oct 17, 2023
9 checks passed
@srawlins srawlins deleted the refactor-canonicalization-more branch October 17, 2023 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants