Skip to content
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

fix(manager/pub): prioritise SDK version constraint from pubspec.yaml over pubspec.lock #27415

Merged
merged 1 commit into from Feb 21, 2024

Conversation

zeshuaro
Copy link
Contributor

@zeshuaro zeshuaro commented Feb 19, 2024

Changes

For the pub manager artifacts update, prioritise to use the SDK version from pubspec.yaml over pubspec.lock as the tool version constraint to update the artifacts.

Context

If you define a specific SDK version, e.g. flutter: 3.16.9 in pubspec.yaml, the resulted pubspec.lock would still generate a ranged version flutter: ">=3.16.9".

Right now, Renovate uses the version from the lock file to determine the tool/SDK version constraint, which might not be accurate to what's defined in pubspec.yaml. And causing the wrong version to be used to update the artifacts. For example, the current latest Flutter version is 3.19.0 which would conflict to what's defined in pubspec.yaml and may fail to update artifacts.

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@zeshuaro zeshuaro changed the title fix(manager/pub): prioritise sdk version constraint from pubspec.yaml over pubspec.lock fix(manager/pub): prioritise SDK version constraint from pubspec.yaml over pubspec.lock Feb 21, 2024
Copy link
Collaborator

@HonkingGoose HonkingGoose left a comment

Choose a reason for hiding this comment

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

I'm happy with the PR title now. I'll let the maintainers review the code.

@viceice viceice added this pull request to the merge queue Feb 21, 2024
Merged via the queue into renovatebot:main with commit 76fc037 Feb 21, 2024
35 checks passed
@zeshuaro zeshuaro deleted the fix/pub-manager-artifactors branch February 21, 2024 21:24
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 37.204.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants