Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Prior to rez version 2.26, the function call to
bind_cli
withinsrc/rez/build.py
was passing the parser object as an argument which was then used to store the extra args viasetattr
defined withinparse_build_args.py
onto so that we can get to it in self.build.From version 2.26 onwards the passed arguments changed from
ArgumentParser
to an argument group object in order to display the extra arguments in a separate group for help messages.The above change created a regression because although the custom build arguments (defined in parse_build_args.py) are visible when calling rez-build --help as an additional group the corresponding environment variables are not created in the build environment because the
setattr
function is using the wrong object.This pull request fixes the problem by passing both the group and parser objects to correctly generate the help menu but also ensure the environment variables are set.
Fixes # (issue)
#590, #587
Type of change
Screenshots
Please see #587
How Has This Been Tested?
I have manually tested the changes myself multiple times with various arguments by proving
a series of
parse_build_args.py
files. Furthermore other members of the community havetried my changes are have reported them to be working.
Todos
@nerdvegas Please advice 🙏
Checklist: