Skip to content
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

[boost] debug_level=0 should emit -d0 #4121

Merged
merged 1 commit into from
Feb 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions recipes/boost/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ def _build_bcp(self):
with tools.vcvars(self.settings) if self._is_msvc else tools.no_op():
with tools.chdir(folder):
command = "%s -j%s --abbreviate-paths toolset=%s" % (self._b2_exe, tools.cpu_count(), self._toolset)
if self.options.debug_level:
if "debug_level" in self.options:
command += " -d%d" % self.options.debug_level
Comment on lines +607 to 608
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

based on the docs I think this would be fine too https://boostorg.github.io/build/manual/develop/index.html#bbv2.overview.invocation.options

-d0
Suppress all informational messages.
-d N
Enable cumulative debugging levels from 1 to n. Values are: +

It's unclear if a space is required

Suggested change
if "debug_level" in self.options:
command += " -d%d" % self.options.debug_level
command += " -d%d" % self.options.get_safe("debug_level", 0)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @prince-chrismc.

For least surprise, should we default to the same value as b2 does itself, which I understand from that linked document to be level 1?

I'm pretty sure that the space is not required.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I picked the default for the recipe which was already accepted 🤷 we'll see what the CCI team and community say

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from my experience, space isn't required
using b2 default as recipe default matches the expectation for the most of users

self.output.warn(command)
self.run(command, run_environment=True)
Expand Down Expand Up @@ -897,7 +897,7 @@ def add_defines(library):
"--prefix=%s" % self.package_folder,
"-j%s" % tools.cpu_count(),
"--abbreviate-paths"])
if self.options.debug_level:
if "debug_level" in self.options:
flags.append("-d%d" % self.options.debug_level)
return flags

Expand Down