-
Notifications
You must be signed in to change notification settings - Fork 990
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] Add a mode similar to "recipe_revision_mode"("full_mode"), that doesn't include PREV #16114
Comments
Hi @db4 Thanks for your question. The def full_mode(self):
self.name = self._ref.name
self.version = self._ref.version
self.user = self._ref.user
self.channel = self._ref.channel
self.package_id = self._package_id
self.recipe_revision = self._ref.revision
Maybe you don't mean |
@memsharded from conan import ConanFile
class PkgConan(ConanFile):
settings = "os", "arch", "build_type", "compiler"
name = "pkg"
package_type = "shared-library"
def requirements(self):
self.requires("zlib/1.2.13")
def package_id(self):
info = self.info.requires["zlib"]
info.recipe_revision_mode()
info.package_id = None I get
zlib's PREV is not included into the package id. That's what I would like to get by default. |
Package revisions PREV are not designed to be part of the More explicitly, having more than 1 PREV for a given
That means that if you have a given package-id for a given recipe-revision, (that results in a PREV), that binary should never be rebuilt again. In an ideal world, if it was rebuilt it would create exactly the same PREV, but C++ builds are not always deterministic and if re-built, it might result in a new PREV. This is by definition a waste of resources, and not recommended to do, this is why having more than one PREV should be considered a process error, or a escape latch for recovering from disaster situations (like there was a big mistake in the setup/provision of the CI machines, installing the wrong compiler or something, and a forced rebuild of everything without changing the model had to be done). This is why the PREV has been dropped from the package-id computation, and it is not planned to add it again. The recipe-revision+package-id model is already an "exact" and complete model for modelling package binaries and the |
I hope so, but then why do I see the difference between
and
above? Maybe I used an incorrect term - I need the dependency's |
The difference is that you want to be independent of the Then it is good, no prob, it is just a small UX issue. I think a new mode independent of the |
#16195 added a new |
What is your suggestion?
I already explained my case in #15941: I need to make Release build of some shared libraries to be compatible with Debug build of everything else. To do so I need some support from Conan: a package_id mode that doesn't include requirements' PREV into the package id. For an individual dependency, I can do the following:
but it's quite annoying to trace all dependencies manually. I would rather set
I assume that it's too late to fix (change)
recipe_revision_mode
behaviour, but maybe adding a new one is acceptable?Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: