conan-io / docs

conan.io reStructuredText documentation
http://docs.conan.io
MIT License
104 stars 352 forks source link

"conan lock create" does not append to lock file #3262

Open klausholstjacobsen opened 1 year ago

klausholstjacobsen commented 1 year ago

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 commented 1 year ago

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!

memsharded commented 1 year ago

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