-
Notifications
You must be signed in to change notification settings - Fork 980
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] In build-order.json, build_args is wrong when options have whitespaces #16593
Comments
Hi @jeremy-coulon thanks a lot for taking the time to report the issue. If I change
But this probably won't work within the boost recipe, as those quotes are now being passed all the way down to the compiler, which will probably complain about them when you try to create the package. A proper solution here would be to have boost/b2 listen to the confs that conan provides for this exact reason, such as A question thus remains as to how Conan could help users in this case - we could try to quote them when necessary, we'll check and get back to you on that :) |
I'm porposing #16594 which will quote the arguments in the build_args field to avoid issues like this. This might be just in time for the 2.5.0 release, will check with the team. Again, thanks for taking the time to report your issue, we appreciate it! |
Thanks for the pull request. As for your suggestion to add quotes directly in my conanfile.txt, note that I already tried this workaround. |
This is because the quotes would be part of the options in one case and not in another, which messes up things. I think we need to rethink how we either parse or output the information to users, so this might take a bit, will keep you posted :) |
I just took a shot at writing some parallelization automation around
Thanks! |
#16594 closed this, proposing double quotes to the arguments. Thanks for your feedback! |
Describe the bug
conan version: 2.4.1
conan profile:
Description:
I am trying to build
boost/1.82.0
package in CI with some custom options and in particular:boost/*:extra_b2_flags="define=BOOST_LOG_USE_STD_REGEX define=BOOST_LOG_WITHOUT_DEBUG_OUTPUT define=BOOST_LOG_WITHOUT_DEFAULT_FACTORIES define=BOOST_LOG_WITHOUT_EVENT_LOG define=BOOST_LOG_WITHOUT_IPC define=BOOST_LOG_WITHOUT_SETTINGS_PARSERS define=BOOST_LOG_WITHOUT_SYSLOG define=BOOST_LOG_WITHOUT_WCHAR_T define=BOOST_USE_WINAPI_VERSION=0x0A00"
This option contains whitespaces.
When using
conan graph build-order --format json
, the resulting json has abuild_args
field that looks like:--requires=boost/1.82.0 --build=boost/1.82.0 -o boost/*:extra_b2_flags=define=BOOST_LOG_USE_STD_REGEX define=BOOST_LOG_WITHOUT_DEBUG_OUTPUT define=BOOST_LOG_WITHOUT_DEFAULT_FACTORIES define=BOOST_LOG_WITHOUT_EVENT_LOG define=BOOST_LOG_WITHOUT_IPC define=BOOST_LOG_WITHOUT_SETTINGS_PARSERS define=BOOST_LOG_WITHOUT_SYSLOG define=BOOST_LOG_WITHOUT_WCHAR_T define=BOOST_USE_WINAPI_VERSION=0x0A00
This is not valid arguments for
conan install
becauseextra_b2_flags
option should be enclosed in quotes.How to reproduce it
With the following conanfile.txt:
Run the following:
$ conan graph build-order --order-by=configuration --build=boost/1.82.0 -pr:a default --format json .
Inspect the resulting json and look at
build_args
field which is invalid.The text was updated successfully, but these errors were encountered: