docs icon indicating copy to clipboard operation
docs copied to clipboard

"conan lock create" does not append to lock file

Open klausholstjacobsen opened this issue 2 years ago • 2 comments

Environment details

OS: WSL Ubuntu 20.04 Conan: 2.0.0

Steps to reproduce

Running: conan lock create --profile:build: xxx --rpfile:host yyy conanfile.py --lockfile-out new.lock

According to https://docs.conan.io/2/reference/commands/lock/create.html:

image

I would expect my lock file to be extended every time I run lock create with different configs with that file as output.

What have I misunderstood? How do I get it to extend the file?

Rgds Klaus

Logs

No response

klausholstjacobsen avatar Jun 19 '23 05:06 klausholstjacobsen

I discovered that only when using --lockfile my.lock together with --lockfile-out my.lock it will append to the lockfile! May I suggest to add this to the documentation!

klausholstjacobsen avatar Jun 19 '23 06:06 klausholstjacobsen

Yes, worth clarifying. The lockfile is only loaded automatically by default if it is called conan.lock, but for custom names, it is necessary to feed it with --lockfile=my.lock

memsharded avatar Jun 19 '23 10:06 memsharded