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] libraries with components broken in editable mode #16163
Comments
I think this might be the same as discussed in #16162 (comment): it is necessary to model the local development "editable" layout in the |
FeedbackYeah you're right. It took me some time but I found the problem. What happened wrongfor some reason, conan is changing one specific line differently in my generated file:
Personal opinionI think this is a bit counterintuitive, but can be fixed in local conanfiles.py Question: not sure if the behaviour should be like thisif i have following code in
Mixed list does not work either. Ordering is not changing the behaviour. It is fixable in a custom Code to testcomponentTest.zip conan build .
conan export-pkg . for editable mode: (in corresponding directory)
for the consumer/application cmake --preset default . info:
|
Thanks for the detailed feedback and the reproducible code. I think the issue in this case from what I see in your It is necessary to define it in the Please have a look to https://docs.conan.io/2/tutorial/developing_packages/package_layout.html, like: def layout(self):
## define project folder structure
self.folders.source = "."
self.folders.build = os.path.join("build", str(self.settings.build_type))
self.folders.generators = os.path.join(self.folders.build, "generators")
## cpp.package information is for consumers to find the package contents in the Conan cache
self.cpp.package.libs = ["say"]
self.cpp.package.includedirs = ["include"] # includedirs is already set to 'include' by
# default, but declared for completion
self.cpp.package.libdirs = ["lib"] # libdirs is already set to 'lib' by
# default, but declared for completion
## cpp.source and cpp.build information is specifically designed for editable packages:
# this information is relative to the source folder that is '.'
self.cpp.source.includedirs = ["include"] # maps to ./include It would be like that, but also defining |
Describe the bug
System details
WSL with ubuntu.22.04 under Windows 11
g++-12 (through apt)
cmake 3.29.2 (through snap)
Conan 2.2.3
The Problem
Similar to #16162 but for projects using components (game engine example) in editable mode.
Situation
I use components, since some parts of the lib are compatible for some products (low level embedded without real os vs higher level embedded with linux)
For developing editable mode is suggested.
Error
This happens only in editable mode.
How to reproduce it
modify conanfile.py with something like that
and your cmakefile needs somethink like
more details
even through components dont work properly, without them it works!
This will work out without problems.
It is the combination of editable with components in libraries.
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: