-
Notifications
You must be signed in to change notification settings - Fork 365
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] Lockfile 'base' with recipe revisions only workflow #1904
Comments
If I understood the issue correctly, then this flow is possible, but just not in one step, but in 2 steps. You need first to compute the complete lockfile, then do the $ conan lock create .. --lockfile=../conan-deps.lock --lockfile-out=../conan-deps-debug.lock -s build_type=Debug
$ conan install .. --lockfile-out=../conan-deps.lock While doing it in 1 step would be theoretically possible, it would be very difficult in practice to clearly differentiate what is a change due to the fact that the input lockfile is "base" only, and what comes from a result of building from sources. It seems conceptually easier to manage the following rules:
Conan 1.30 will add a bit more of docs about this point, but please let me know if this clarifies it a bit. |
The complete lock file is the "issue". I would love to have the partial or base lock file since it does not constrained to the host, compiler, options or build settings. I currently need to RREV for all deps within my tree to ensure we are not impacted by changes upstream listed in my Having a minimum This would enable reproducible installation of exact topology from a fixed set of top level dependencies regardless of the toolset. I think a good analog would be
That's perfect. It will prevent upstream changes impacting CI pipelines.
That's simple enough. It's easy to specify an input and output file as an upgrade path. |
I feel I am not be expressing the two different types of lockfiles. |
This is impossible in the general case. As the dependency graph can be conditional (and in practice, this happens relatively often), it is not possible that a single "base" lockfile can ensure locking of absolutely everything in all platforms. The "base" lockfile aims to this, and if there is no variability in the graph, it will achieve this behavior.
It is probably easier to lock in the js ecosystem, because the variability of the dependency graph is not that common, and they can assume other working hypothesis (as having multiple versions of the same package as dependencies in the same dependency graph)
Could you please clarify what you mean? Isn't the "base" + "full" lockfiles a good enough solution? You can treat the full lockfiles as temporaries, and not store or manage them, just compute and use them, and manage the "base" lockfile only. Please let me know, many thanks for the feedback! |
Thanks for adding more explanation, I think I am starting to understand your original reply. Let's see if I can explain this back.
Workflow: $ conan lock create .. --lockfile=../conan-deps.lock --lockfile-out=../conan-deps-debug.lock -s build_type=Debug
$ conan install .. --lockfile=../conan-deps-debug.lock |
Solution proposed in https://github.com/conan-io/conan/issues/7802
…anges (#23) * dump deps * fix type * fix type * fix target namespace * leveraging conan lockfile workflow. Solution proposed in https://github.com/conan-io/conan/issues/7802
Firstly I'd like to take the time to thank you for explaining this topic to me. ❤️ It's greatly appreciated! I have been successful in implementing what you have described, you can see the PR linked is now merged! I am going to watch how it reacts for a little bit before possibly changing the "best practices" at work since this helps cut some of the over head I'm getting complaints about. I would love to close this issue, but I think reviewing the documentation and contributing back any suggestions is a requirement on my part. Quickly searching the repo there's only 17 hits. I know there's a "How to" section and I would love to add one for this, it's not obvious (for those intermediate Conan users like myself) this workflow exists... Would that be welcomed from the Conan team? |
Thanks for telling, I am very happy that you were successful implementing it!
Of course! Please let us know with some more detail how do you think this could be explained better in the docs, or contribute something yourself, as you wish. I am fine with keeping it open, if at this point is more a documentation issue, let's move this issue there, and you can open new issues for the tool if code changes are necessary. Thanks for the feedback! |
Take the given
conanfile.py
snippet:conan lock create
Which results in the generate lockfile.
conan-deps.lock
Just image if
You could run
conan install .. -s build_type=Debug --lockfile=../conan-deps.lock
and you can get a reproducible dependency graph every time that is tracked by git.However currently,
This is an experimental feature but I was hoping for an explanation about the current limitation and if there's any road map for expanding this feature to help address the short coming regarding upstream changes breaking consumer. It looks to have a lot of potential
Thank you in advance for taking time to answer.
The text was updated successfully, but these errors were encountered: