[bug] Unexpected None package_folder
- Dominant language
- C++
- Stars
- 125
- Forks
- 382
- Avg merge
- 22h 39m
- Merged PRs (30d)
- 21
Description
### Describe the bug
In finishing our Conan 2 conversion, I'm running into some unexpected cases where `package_folder` is unexpectedly resulting in being `None`.
1. In a meta-deps package we have, we iterate through all direct and transitive dependencies, gathering and generating CMake `install()` commands for aggregating license content information (most packages built as shared=True). In the meta-deps package `generate()` method we do something roughly like the following. However, for a subset of packages we've found that `package_folder` at this point is `None`, causing issues. We've since guarded it to print a warning and skip processing, but with warnings as errors we can't proceed with missing any transitive license information.
```
for require, dependency in self.dependencies.items():
cmake_install_helper(require.ref, dependency.package_folder)
```
a. The first class of issues we've found this with is where `package_type = "header-library"`, and simply commenting out the package_type offers a crude workaround.
b. The second package we've found is `double-conversion` as a transitive dependency of Qt, which is `package_type = "library"`. We're building it as a static package, with or without `package_type` commented out gives the same results.
2. In a Qt build with shared zlib and zstd, as a kludge (there's probably a cleaner solution), we are copying the zlib and zstd libraries as part of the `package()` method. In this case, as an example, `self.dependencies["zlib"].package_folder` is None.
I'm working on a standalone reproducer, but wanted to get the issue out to see if it's already known or obvious.
### How to reproduce it
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.