Skip to content

solver: suggest workspace resolution fixes#4838

Open
aikins01 wants to merge 2 commits into
dart-lang:masterfrom
aikins01:solver/workspace-suggestions
Open

solver: suggest workspace resolution fixes#4838
aikins01 wants to merge 2 commits into
dart-lang:masterfrom
aikins01:solver/workspace-suggestions

Conversation

@aikins01

@aikins01 aikins01 commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Enables version solving suggestions for workspace dependency conflicts.

This locates the owning workspace pubspec for direct hosted constraints, emits directory-aware pub add and major-upgrade commands, preserves hosted sources for workspace member suggestions, and suppresses invalid path/git root descriptors.

Fixes #4227.
Related to #4127.

Enable solve suggestions for workspace dependency conflicts by locating the owning workspace pubspec and generating directory-aware pub add commands.

Preserve hosted source descriptions for workspace member suggestions, suppress invalid non-hosted root descriptors, and keep the major-versions fallback directory-aware.
@sigurdm

sigurdm commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

As I understand this PR, it will still only attempt to relax constraints for each dependency in a single workspace member at a time.

I think we need to test for relaxing the constraint across the workspace in one go. Not sure how to best express that as a command. Can we use the new dart pub upgrade package:version ?

@aikins01

Copy link
Copy Markdown
Contributor Author

Thanks, added a workspace-wide case that suggests dart pub upgrade --major-versions <package> when the same dependency has to be relaxed across workspace members. I also tightened the suggested pub add command for workspace member subdirectories so the path descriptor is executable from the cwd.

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.

Enable solve suggestions for workspaces

2 participants