Skip to content

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

Merged
merged 2 commits into from
Nov 27, 2017
Merged

Represent Pubspec.dependencies as a map #1743

merged 2 commits into from
Nov 27, 2017

Conversation

nex3
Copy link
Member

@nex3 nex3 commented Nov 22, 2017

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.
@kevmoo
Copy link
Member

kevmoo commented Nov 22, 2017

There's a plan for a new solver? I'm so excited!

@nex3
Copy link
Member Author

nex3 commented Nov 22, 2017

There's not just a plan, there's a working prototype!

Copy link
Member

@munificent munificent left a comment

Choose a reason for hiding this comment

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

👍

devDependencies.forEach(addToMap);

Map<String, PackageRange> get immediateDependencies {
return {}..addAll(dependencies)..addAll(devDependencies)
// Make sure to add these last so they replace normal dependencies.
Copy link
Member

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"?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

_dependencyOverrides =
dependencyOverrides == null ? null : dependencyOverrides.toList(),
dependencyOverrides == null ? null : new Map.fromIterable(dependencyOverrides, key: (range) => range.name),
Copy link
Member

Choose a reason for hiding this comment

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

Dartfmt?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@nex3 nex3 merged commit 0dabc1a into feature.solver Nov 27, 2017
@nex3 nex3 deleted the dependency-map branch November 27, 2017 22:18
nex3 added a commit that referenced this pull request Dec 6, 2017
This cleans up some existing code, but more importantly it makes some
algorithms for the new version solver more efficient.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants