Skip to content

Commit

Permalink
(conan-io#25517) Fix: incorrect headers in prebuilt package
Browse files Browse the repository at this point in the history
Due to how `package_id` is implemented, when `_is_header_only()` returns True, the package_id will be the same for both values of `with_rapidyaml`. In addition to that, it seems conan-center contains prebuild version of the package_id that was created with `with_rapidyaml=False`. In effect, it contains broken headers for builds with `with_rapidyaml=True`

This fix makes sure we always patch header related to rapidyaml (it is harmless if this functionality is disabled).

NOTE TO CONAN-CENTER MAINTAINERS: To properly complete the fix, the current prebuild packages in conan-center must be replaced with fresh versions build with updated conanfile.py.
  • Loading branch information
jrosiek authored Oct 11, 2024
1 parent baa81e3 commit 1e357d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion recipes/bitserializer/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def generate(self):
deps.generate()

def _patch_sources(self):
if Version(self.version) >= "0.50" and self.options.with_rapidyaml:
if Version(self.version) >= "0.50":
# Remove 'ryml' subdirectory from #include
replace_in_file(
self, os.path.join(self.source_folder, "include", "bitserializer", "rapidyaml_archive.h"),
Expand Down

0 comments on commit 1e357d7

Please sign in to comment.