conan-io / conan-center-index

Recipes for the ConanCenter repository
https://conan.io/center
MIT License
921 stars 1.66k forks source link

Exposing the exceptions feature of tomlplusplus #24336

Closed xoorath closed 2 weeks ago

xoorath commented 2 weeks ago

Summary

Changes to recipe: Expose the exceptions feature of tomlplusplus as discussed with the author.

Resolves #24304

Motivation

Users of tomlplusplus may wish to disable exception support on the library without disabling it on their project as a whole.

Details

When the exceptions options is set to True or False that will define TOML_EXCEPTIONS to 1 or 0. When it is set to None (the default) no define is set.


CLAassistant commented 2 weeks ago

CLA assistant check
All committers have signed the CLA.

conan-center-bot commented 2 weeks ago

Conan v1 pipeline :x:

Failure in build 1 (2857168866d15ebcd885b1d3ca54c3cd187da8df):


Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.


Conan v2 pipeline :x:

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping @conan-io/barbarians on the PR and we will help you.

See details: Failure in build 1 (`2857168866d15ebcd885b1d3ca54c3cd187da8df`): * **tomlplusplus/3.3.0:** Didn't run or was cancelled before finishing * **tomlplusplus/3.1.0:** Didn't run or was cancelled before finishing * **tomlplusplus/3.4.0:** Didn't run or was cancelled before finishing * **tomlplusplus/1.3.3:** CI failed to create some packages ([All logs](https://c3i.jfrog.io/c3i/misc-v2/summary.html?json=https://c3i.jfrog.io/c3i/misc-v2/logs/pr/24336/1-linux-gcc/tomlplusplus/1.3.3//summary.json))
Logs for packageID da39a3ee5e6b4b0d3255bfef95601890afd80709: ``` [settings] arch=x86_64 build_type=Release compiler=gcc compiler.cppstd=17 compiler.libcxx=libstdc++11 compiler.version=11 os=Linux ``` ``` [...] tomlplusplus/1.3.3 (test package): Generating aggregated env files tomlplusplus/1.3.3 (test package): Generated aggregated env files: ['conanrun.sh', 'conanbuild.sh'] ======== Testing the package: Building ======== tomlplusplus/1.3.3 (test package): Calling build() tomlplusplus/1.3.3 (test package): Running CMake.configure() tomlplusplus/1.3.3 (test package): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/home/conan/workspace/prod-v2/bsr/cci-99c6d8ba/recipes/tomlplusplus/all/test_package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/home/conan/workspace/prod-v2/bsr/cci-99c6d8ba/recipes/tomlplusplus/all/test_package" -- Using Conan toolchain: /home/conan/workspace/prod-v2/bsr/cci-99c6d8ba/recipes/tomlplusplus/all/test_package/build/gcc-11-x86_64-17-release/generators/conan_toolchain.cmake -- Conan toolchain: C++ Standard 17 with extensions OFF -- The CXX compiler identification is GNU 11.4.0 -- Check for working CXX compiler: /usr/local/bin/c++ -- Check for working CXX compiler: /usr/local/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Conan: Target declared 'tomlplusplus::tomlplusplus' -- Configuring done -- Generating done -- Build files have been written to: /home/conan/workspace/prod-v2/bsr/cci-99c6d8ba/recipes/tomlplusplus/all/test_package/build/gcc-11-x86_64-17-release tomlplusplus/1.3.3 (test package): Running CMake.build() tomlplusplus/1.3.3 (test package): RUN: cmake --build "/home/conan/workspace/prod-v2/bsr/cci-99c6d8ba/recipes/tomlplusplus/all/test_package/build/gcc-11-x86_64-17-release" -- -j3 Scanning dependencies of target test_package Scanning dependencies of target test_package_multi [ 25%] Building CXX object CMakeFiles/test_package.dir/test_package.cpp.o [ 50%] Building CXX object CMakeFiles/test_package_multi.dir/test_package_multi.cpp.o /home/conan/workspace/prod-v2/bsr/cci-99c6d8ba/recipes/tomlplusplus/all/test_package/test_package.cpp: In function 'int main(int, char**)': /home/conan/workspace/prod-v2/bsr/cci-99c6d8ba/recipes/tomlplusplus/all/test_package/test_package.cpp:13:25: error: 'class toml::abi_parse_noex::parse_result' has no member named 'table' 13 | auto table = config.table(); | ^~~~~ /home/conan/workspace/prod-v2/bsr/cci-99c6d8ba/recipes/tomlplusplus/all/test_package/test_package_multi.cpp: In function 'int main(int, char**)': /home/conan/workspace/prod-v2/bsr/cci-99c6d8ba/recipes/tomlplusplus/all/test_package/test_package_multi.cpp:13:25: error: 'class toml::abi_parse_noex::parse_result' has no member named 'table' 13 | auto table = config.table(); | ^~~~~ CMakeFiles/test_package.dir/build.make:62: recipe for target 'CMakeFiles/test_package.dir/test_package.cpp.o' failed make[2]: *** [CMakeFiles/test_package.dir/test_package.cpp.o] Error 1 CMakeFiles/Makefile2:76: recipe for target 'CMakeFiles/test_package.dir/all' failed make[1]: *** [CMakeFiles/test_package.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... CMakeFiles/test_package_multi.dir/build.make:62: recipe for target 'CMakeFiles/test_package_multi.dir/test_package_multi.cpp.o' failed make[2]: *** [CMakeFiles/test_package_multi.dir/test_package_multi.cpp.o] Error 1 CMakeFiles/Makefile2:108: recipe for target 'CMakeFiles/test_package_multi.dir/all' failed make[1]: *** [CMakeFiles/test_package_multi.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2 ERROR: tomlplusplus/1.3.3 (test package): Error in build() method, line 32 cmake.build() ConanException: Error 2 while executing ```
* **tomlplusplus/3.2.0:** Didn't run or was cancelled before finishing * **tomlplusplus/3.0.1:** Didn't run or was cancelled before finishing * **tomlplusplus/2.5.0:** Didn't run or was cancelled before finishing --- **Note:** To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.
conan-center-bot commented 2 weeks ago

Conan v1 pipeline :x:

Failure in build 2 (d5fc56da2dff7feccd08b1716252f429845b7d3b):


Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.


Conan v2 pipeline :x:

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping @conan-io/barbarians on the PR and we will help you.

See details: Failure in build 2 (`d5fc56da2dff7feccd08b1716252f429845b7d3b`): * **tomlplusplus/3.4.0:** Didn't run or was cancelled before finishing * **tomlplusplus/3.2.0:** Didn't run or was cancelled before finishing * **tomlplusplus/3.1.0:** Didn't run or was cancelled before finishing * **tomlplusplus/3.3.0:** Didn't run or was cancelled before finishing * **tomlplusplus/3.0.1:** Didn't run or was cancelled before finishing * **tomlplusplus/1.3.3:** CI failed to create some packages ([All logs](https://c3i.jfrog.io/c3i/misc-v2/summary.html?json=https://c3i.jfrog.io/c3i/misc-v2/logs/pr/24336/2-linux-gcc/tomlplusplus/1.3.3//summary.json))
Logs for packageID da39a3ee5e6b4b0d3255bfef95601890afd80709: ``` [settings] arch=x86_64 build_type=Release compiler=gcc compiler.cppstd=17 compiler.libcxx=libstdc++11 compiler.version=11 os=Linux ``` ``` [...] tomlplusplus/1.3.3 (test package): Generating aggregated env files tomlplusplus/1.3.3 (test package): Generated aggregated env files: ['conanrun.sh', 'conanbuild.sh'] ======== Testing the package: Building ======== tomlplusplus/1.3.3 (test package): Calling build() tomlplusplus/1.3.3 (test package): Running CMake.configure() tomlplusplus/1.3.3 (test package): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/home/conan/workspace/prod-v2/bsr/cci-0e15f0dc/recipes/tomlplusplus/all/test_package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/home/conan/workspace/prod-v2/bsr/cci-0e15f0dc/recipes/tomlplusplus/all/test_package" -- Using Conan toolchain: /home/conan/workspace/prod-v2/bsr/cci-0e15f0dc/recipes/tomlplusplus/all/test_package/build/gcc-11-x86_64-17-release/generators/conan_toolchain.cmake -- Conan toolchain: C++ Standard 17 with extensions OFF -- The CXX compiler identification is GNU 11.4.0 -- Check for working CXX compiler: /usr/local/bin/c++ -- Check for working CXX compiler: /usr/local/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Conan: Target declared 'tomlplusplus::tomlplusplus' -- Configuring done -- Generating done -- Build files have been written to: /home/conan/workspace/prod-v2/bsr/cci-0e15f0dc/recipes/tomlplusplus/all/test_package/build/gcc-11-x86_64-17-release tomlplusplus/1.3.3 (test package): Running CMake.build() tomlplusplus/1.3.3 (test package): RUN: cmake --build "/home/conan/workspace/prod-v2/bsr/cci-0e15f0dc/recipes/tomlplusplus/all/test_package/build/gcc-11-x86_64-17-release" -- -j3 Scanning dependencies of target test_package Scanning dependencies of target test_package_multi [ 25%] Building CXX object CMakeFiles/test_package.dir/test_package.cpp.o [ 50%] Building CXX object CMakeFiles/test_package_multi.dir/test_package_multi.cpp.o /home/conan/workspace/prod-v2/bsr/cci-0e15f0dc/recipes/tomlplusplus/all/test_package/test_package.cpp: In function 'int main(int, char**)': /home/conan/workspace/prod-v2/bsr/cci-0e15f0dc/recipes/tomlplusplus/all/test_package/test_package.cpp:13:25: error: 'class toml::abi_parse_noex::parse_result' has no member named 'table' 13 | auto table = config.table(); | ^~~~~ /home/conan/workspace/prod-v2/bsr/cci-0e15f0dc/recipes/tomlplusplus/all/test_package/test_package_multi.cpp: In function 'int main(int, char**)': /home/conan/workspace/prod-v2/bsr/cci-0e15f0dc/recipes/tomlplusplus/all/test_package/test_package_multi.cpp:13:25: error: 'class toml::abi_parse_noex::parse_result' has no member named 'table' 13 | auto table = config.table(); | ^~~~~ CMakeFiles/test_package.dir/build.make:62: recipe for target 'CMakeFiles/test_package.dir/test_package.cpp.o' failed make[2]: *** [CMakeFiles/test_package.dir/test_package.cpp.o] Error 1 CMakeFiles/Makefile2:76: recipe for target 'CMakeFiles/test_package.dir/all' failed make[1]: *** [CMakeFiles/test_package.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... CMakeFiles/test_package_multi.dir/build.make:62: recipe for target 'CMakeFiles/test_package_multi.dir/test_package_multi.cpp.o' failed make[2]: *** [CMakeFiles/test_package_multi.dir/test_package_multi.cpp.o] Error 1 CMakeFiles/Makefile2:108: recipe for target 'CMakeFiles/test_package_multi.dir/all' failed make[1]: *** [CMakeFiles/test_package_multi.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2 ERROR: tomlplusplus/1.3.3 (test package): Error in build() method, line 32 cmake.build() ConanException: Error 2 while executing ```
* **tomlplusplus/2.5.0:** Didn't run or was cancelled before finishing --- **Note:** To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.
conan-center-bot commented 2 weeks ago

Conan v1 pipeline :x:

Failure in build 3 (474da2a7f4f3083ce0cef1b41ba7b3ec61ebd103):


Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

conan-center-bot commented 2 weeks ago

Conan v1 pipeline :heavy_check_mark:

All green in build 4 (e57375ed6ceafb8614bfa06a187ab6f28282595d):


Conan v2 pipeline :heavy_check_mark:

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

All green in build 4 (e57375ed6ceafb8614bfa06a187ab6f28282595d):

memsharded commented 2 weeks ago

Hi @elliotcmorris

Maybe you delete one comment? I was checking it from an email notification, but I couldn't find it here. I have double checked the changes in this PR, in theory it shouldn't be breaking, please let me know otherwise.

elliotcmorris commented 2 weeks ago

Hi @memsharded. You caught me :P

I did delete a comment, I was wavering a bit in my confidence on my diagnosis and wanted to do some extra investigation with a colleague, but am back to suspecting an issue.

It seems to us that this update has caused exceptions to be disabled regardless of provided argument. Will follow with a link to some test results shortly.

Not quite sure why this is, perhaps something to do with checking the option for identity (ie using .value in one case and not in the other?)

What we're doing for the moment is pinning to the previous recipe revision, which re-enables exceptions for us and fixes our tests.

(With our test setup we ended up trying conan 1.59 and 1.64, both with the same issue)

memsharded commented 2 weeks ago

I see what you mean, it is definitely possible that using if self.options.get_safe("exceptions") is not None: would be a better approach and could avoid those issues.

We'll do a PR to fix this asap. Thanks very much for checking this!

elliotcmorris commented 2 weeks ago

Thanks for looking into it!

Just for clarity, we checked all three inputs, None, True and False, and couldn't get exceptions to be enabled in any case.

AbrilRBS commented 2 weeks ago

I've submitted https://github.com/conan-io/conan-center-index/pull/24385 to fix this issue, sorry about the issues it caused, we'll work on automated checks for these situations not to arise in the future :)

(@elliotcmorris I see you had to pin the recipe revision directly in your recipe, and I had one question for some further insight: Is your non-use of a lockfile an explicit design decission? if so I'd appreciate any insight into why if you could, thanks!)

xoorath commented 1 week ago

Thanks all! I don't check github daily. I appreciate identifying and fixing the issue with checking None here!

I did a bunch of testing locally and did not experience that same problem - I don't know why, but this seems like a more reliable way to do it anyways.

elliotcmorris commented 1 week ago

@RubenRBS Not really explicit no. We don't run lockfiles generally due to a vague desire to keep on the bleeding edge of changes. We'd rather deal with issues like this every few months than let compatibility issues build.

As for why I didn't use a lockfile to do the mitigation in the short-term, that's honestly just because I knew how to do the pin and not how to make a lockfile.

Thank you so much for fixing this, we've unpinned ourself and are back to tracking the live version.