-
Notifications
You must be signed in to change notification settings - Fork 210
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
Add minimal AnalysisDriverModel
implementation
#3814
Add minimal AnalysisDriverModel
implementation
#3814
Conversation
Package publishing
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation. |
PR HealthChangelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs. |
75be8cf
to
3bc0a58
Compare
tests `BuildAssetUriResolver`. Add minimal implementation to `AnalysisDriverModel` to make the tests pass. Add TODOs where there is functionality not covered by tests that is therefore not added.
3bc0a58
to
0797e9e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgmt, test diff was a bit weird but it looked like no substantive changes, if there was something you wanted me to look at let met know
final nextId = nextIds.removeFirst(); | ||
|
||
// Skip if already seen. | ||
if (!result.add(nextId)) continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we avoid putting these in the queue in the first place instead? There could be a lot of duplicates otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
if (!result.add(nextId)) continue; | ||
|
||
// Skip if not readable. | ||
if (!await reader.canRead(nextId)) continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth leaving a comment that this does add the dependency on nextId
just from checking for its existence
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
final nextId = nextIds.removeFirst(); | ||
|
||
// Skip if already seen. | ||
if (!result.add(nextId)) continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
if (!result.add(nextId)) continue; | ||
|
||
// Skip if not readable. | ||
if (!await reader.canRead(nextId)) continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
For #3811, review and merge #3813 first.
Make
resolver_test.dart
testAnalysisDriverModel
exactly like it testsBuildAssetUriResolver
.Add minimal implementation to
AnalysisDriverModel
to make the tests pass.Add TODOs where there is functionality not covered by tests that is therefore not added.
This implementation does work for real builds, a local edit to point
BuildAssetUriResolver.shared
toAnalysisDriverModel
is enough to make the benchmarks run. Because there is no caching in the new implementation at all, it's slower :) which gives us a good starting point to add caching.