Open lasote opened 2 years ago
Yes, an extra file produced on a side would help with the use-case in the tribe comment.
Having profile_out
in same commands as lockfile-out
is less typing and maybe somewhat convenient (at least conan create
/ conan install --build
).
But otherwise a separate command is also fine. Then the workflow to create a package on CI would be profile create
-> lockfile create
-> create
, each taking output from the previous "stage".
I do think the similar feedback as pointed out for lockfile should be taken into account here. Summarised:
--profile-out
without the need of extra commandIf all conan commands would automatically produce an output profile (and consume it, too) in the cwd
, it would effectively function like a cache.
It would promote "out of source builds" (e.g. don't conan install
in your source folder, one build / install folder per profile) which is good practice anyways.
And the best thing about it, that it would allow to create generators with a CMake like "Zero Check" functionality (e.g. to rerun Conan in case that conanfile.py
was changed). With the current functionality it is impossible to create such a generator, because there is no way to capture the original arguments to the conan invocation.
And the best thing about it, that it would allow to create generators with a CMake like "Zero Check" functionality
Good use-case I didn't think about. I think conaninfo.txt
was pretty close to it.
I would just replace "cwd" with "install folder". It usually defaults to cwd so there shouldb't be much difference if you omit it, but will be less confusing when it's specified.
It would promote "out of source builds" (e.g. don't conan install in your source folder, one build / install folder per profile) which is good practice anyways.
Fortunately, with layout()
now most builds are automatically "out-of-source" (at least they are moved to a build
folder, not polluting the project root).
Good use-case I didn't think about. I think conaninfo.txt was pretty close to it.
conaninfo.txt
will not longer be locally generated in 2.0.
From this thread: https://github.com/conan-io/tribe/pull/34#discussion_r862742661
The idea is to provide a way to "freeze" the applied profiles (host + build) by combining all the inputs provided, so with just one file you could reproduce a build. Some ideas:
With a different command:
conan profile compose --profile:h=foo -s:h arch=x86 -c myconf=1 --profile_out:h=profile_host_windows_x86.txt
Directly with arguments:
conan lock create . --profile:h=foo -s:h arch=x86 -c myconf=1 --profile_out:h=profile_host_windows_x86.txt