You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Documentation on Revisions has the following paragraph:
Best practices
Having more than 1 package revision for any given recipe revision + package_id is a smell or a potential bad practice. It means that something was rebuilt when it was not necessary, wasting computing and storage resources. There are ways to avoid doing it, like conan create . --build=missing:hello* will only build that package binary if it doesn’t exist already (or running conan graph info can also return information of what needs to be built.)
But because the build folder is different every time, Debug builds will always have different package revision even if nothing changes.
For example, if I create a new recipe with conan new:
conan new -d name=test_repro -d version=1.0 cmake_lib
and the build it twice with build_type=Release, package revision will be identical
The truth is that C++ are not deterministic in the general case, there are many other factors that can change the resulting binary beyond some source paths. So it could also easily affect Release builds as well. And they could be different package revisions even if the folder would be the same.
The real solution is not rebuilding again from source or recreating a package that already exists. This can be easily achieved with conan create ... --build=missing.
In Conan 2, having more than 1 package revision for the same recipe-revision + package_id is considered a model or process error, and it should be avoided altogether in the first place (basically with the help of --build=missing)
What is your question?
Documentation on Revisions has the following paragraph:
But because the build folder is different every time, Debug builds will always have different package revision even if nothing changes.
For example, if I create a new recipe with
conan new
:and the build it twice with
build_type=Release
, package revision will be identicalBut if I build with
build_type=Debug
twice in a row, I'll get two different revisions:My assumption that it's because build folder is different every time and path to sources gets embedded into binary as debug info.
So the question is - how to have reproducible builds with debug info? And why is build folder different every time?
The only way I see currently is to manually do
but maybe there is better solution?
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: