Skip to content

Refactor some code in PackageGraph #3570

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 1 commit into from
Nov 6, 2023

Conversation

srawlins
Copy link
Member

@srawlins srawlins commented Nov 4, 2023

Two things:

  • The findOrCreateLibraryFor method is essentially a long way of writing "putIfAbsent". Remove and replace calls with allLibraries.putIfAbsent.
  • Make the specialClasses field final.
  • Refactor _precacheLocalDocs to not use sync*; notoriously slow. Simple migration. The result is always iterated completely.

  • 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 kallentu November 6, 2023 14:34
@srawlins srawlins merged commit ad99412 into dart-lang:main Nov 6, 2023
@srawlins srawlins deleted the tidy-package-graph-sync-star branch November 6, 2023 18:20
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