-
Notifications
You must be signed in to change notification settings - Fork 232
Represent Pubspec.dependencies as a map #1743
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
Conversation
This cleans up some existing code, but more importantly it makes some algorithms for the new version solver more efficient.
There's a plan for a new solver? I'm so excited! |
There's not just a plan, there's a working prototype! |
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.
👍
lib/src/package.dart
Outdated
devDependencies.forEach(addToMap); | ||
|
||
Map<String, PackageRange> get immediateDependencies { | ||
return {}..addAll(dependencies)..addAll(devDependencies) | ||
// Make sure to add these last so they replace normal dependencies. |
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.
Putting the comment in the middle of the cascade is kind of weird. How about moving it up and changing "these" -> "overrides"?
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.
lib/src/pubspec.dart
Outdated
_dependencyOverrides = | ||
dependencyOverrides == null ? null : dependencyOverrides.toList(), | ||
dependencyOverrides == null ? null : new Map.fromIterable(dependencyOverrides, key: (range) => range.name), |
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.
Dartfmt?
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.
This cleans up some existing code, but more importantly it makes some algorithms for the new version solver more efficient.
This cleans up some existing code, but more importantly it makes some
algorithms for the new version solver more efficient.