-
Notifications
You must be signed in to change notification settings - Fork 981
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
[bug] required component package ... not in dependencies #17312
Comments
Hi @tbsuht thanks for your report. Without access to the full conanfile recipe/run log output it's hard to diagnose what the issue might be, and I can't reproduce with a similarly looking conanfile. The conditions for that error currently are:
So without further context it's hard to diagnose what might be happening. One potential improvement would be for the error message to clarify where the missing requirement is being declared |
Does this help? Otherwise I will have to try providing the conanfile.
|
The conanfile is using |
First thing I suspected was if
The code that is being triggered is: # Only direct host (not test) dependencies can define required components
# We use conanfile.dependencies to use the already replaced ones by "replace_requires"
# So consumers can keep their ``self.cpp_info.requires = ["pkg_name::comp"]``
direct_dependencies = [r.ref.name for r, d in conanfile.dependencies.items() if r.direct
and not r.build and not r.is_test and r.visible and not r.override]
for e in external:
if e not in direct_dependencies:
raise ConanException(
f"{conanfile}: required component package '{e}::' not in dependencies") But this should happen if Can you please add the following to the def generate(self):
...
for r, d in self.dependencies.items():
self.output.info(f"Requirement {r}")
self.output.info(f"Is test {r.is_test} is override {r.override}") Run again and share the output? |
@memsharded The error seems to be triggered before |
@memsharded Sorry, I didn't read your instructions correctly and executed it for the wrong project. That's the output for
|
Hm I could find that |
Describe the bug
Hi,
I've just upgraded from conan
2.3.0
to2.9.2
and one of our modules started not building anymore.[cmake] ERROR: power-mgmt/2.0.0: required component package 'magic_enum::' not in dependencies
the conanfile of this component looks something like this:
I don't see an obvious error here and from the error message I'm not sure what is the problem. Can you help out?
How to reproduce it
No response
The text was updated successfully, but these errors were encountered: