You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We stop parsing the command line after finding all bootstrap options here (meaning we stop at any command-line goals), and bargs is what we then pass to the ArgSplitter. There's nothing wrong with this, but it means we don't know what the command-line goals are in the OptionsBootstrapper, which makes it difficult to implement #7205 unless we parse the arguments again, without stopping before the command-line goals.
One way to implement this would be to figure out some way to use ArgSplitter to split arguments only once, without knowing the scope infos in advance (this is a current limitation of ArgSplitter), then consume the result of that splitting (possibly some form of nested dict) in OptionsBootstrapper to extract bootstrap options, and then later use it again when extracting the ._full_options. This solution would likely fix #5282 as well.
The text was updated successfully, but these errors were encountered:
In #7205, we want to avoid using the daemon client depending on the command-line goals -- see this change in
pants_runner.py
from the branch linked in that diff. This doesn't currently work because the command-line goals aren't available to theOptionsBootstrapper
. Specifically:OptionsBootstrapper.create()
will call.parse_bootstrap_options()
.parse_bootstrap_options()
then callsOptions.create()
Options.create()
will then invokeArgSplitter#split_args()
.The reason this doesn't get command-line goals for bootstrap options is this part in
OptionsBootstrapper.create()
:pants/src/python/pants/option/options_bootstrapper.py
Lines 127 to 130 in 434533a
We stop parsing the command line after finding all bootstrap options here (meaning we stop at any command-line goals), and
bargs
is what we then pass to theArgSplitter
. There's nothing wrong with this, but it means we don't know what the command-line goals are in theOptionsBootstrapper
, which makes it difficult to implement #7205 unless we parse the arguments again, without stopping before the command-line goals.One way to implement this would be to figure out some way to use
ArgSplitter
to split arguments only once, without knowing the scope infos in advance (this is a current limitation ofArgSplitter
), then consume the result of that splitting (possibly some form of nested dict) inOptionsBootstrapper
to extract bootstrap options, and then later use it again when extracting the._full_options
. This solution would likely fix #5282 as well.The text was updated successfully, but these errors were encountered: