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

Feature/lock upgrade #17577

Draft
wants to merge 5 commits into
base: develop2
Choose a base branch
from
Draft

Conversation

perseoGI
Copy link
Contributor

Changelog: Feature: New lock upgrade command to automatically upgrade desired dependencies resolving the graph
Docs: TODO

  • Refer to the issue that supports this Pull Request.
  • If the issue has missing info, explain the purpose/use case/pain/need that covers this Pull Request.
  • I've read the Contributing guide.
  • I've followed the PEP8 style guides for Python code.
  • I've opened another PR in the Conan docs repo to the develop branch, documenting this one.

Fix #16636

The objective of this subcommand is to provide an easy and direct CLI interface to upgrade a (single / multiple) reference(s) in a lockfile:

  • Without needing to previously remove them
  • And without needing to specify to which concrete version to upgrade -> let the graph resolution manages that

Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

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

Looking good

c.run(f"export libb --version=1.1")
c.run(f"export libb --version=1.2")
c.run(f"export libc --version=1.1")
c.run("lock upgrade . --update-requires=liba/* --update-requires=libb/[*] --update-build-requires=libc/[*]")
Copy link
Member

Choose a reason for hiding this comment

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

It would be great to check that an --update-xxx doesn't update if the provided version or version range is not in the lockfile, and as such is not removed/unlocked.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

conan/cli/commands/lock.py Outdated Show resolved Hide resolved
conan/cli/commands/lock.py Outdated Show resolved Hide resolved
@perseoGI perseoGI force-pushed the feature/lock_upgrade branch from eb29a17 to 36b7aa0 Compare January 16, 2025 17:03
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.

[question] How to update a reference in a lockfile?
2 participants