Ensure global command line arguments end up in args like before#40929
Merged
alalazo merged 1 commit intospack:developfrom Nov 7, 2023
Merged
Ensure global command line arguments end up in args like before#40929alalazo merged 1 commit intospack:developfrom
alalazo merged 1 commit intospack:developfrom
Conversation
alalazo
approved these changes
Nov 7, 2023
Member
|
Sorry, I didn't notice that this forwarding was a thing. Sadly, this change breaks multi-word aliases: Do we want to keep the forwarding long-term? I find that quite weird, to be honest. Anyway, I will try to figure out a way to fix multi-word aliases again. |
Member
Author
|
It sure is weird, but it was relied on at least in one place. Forwarding the wrong thing is worse than forwarding the right thing is worse than not forwarding at all ;p |
haampie
added a commit
that referenced
this pull request
Nov 7, 2023
haampie
added a commit
that referenced
this pull request
Nov 8, 2023
michaelkuhn
added a commit
to michaelkuhn/spack
that referenced
this pull request
Nov 17, 2023
PR spack#40929 reverted the argument parsing to make `spack --verbose install` work again. It looks like `--verbose` is the only instance where this kind of argument inheritance is used since all other commands override arguments with the same name instead. For instance, `spack --bootstrap clean` does not invoke `spack clean --bootstrap`. Therefore, fix multi-line aliases again by parsing the resolved arguments and instead explicitly pass down `args.verbose` to commands.
gabrielctn
pushed a commit
to gabrielctn/spack
that referenced
this pull request
Nov 24, 2023
haampie
pushed a commit
that referenced
this pull request
Nov 24, 2023
PR #40929 reverted the argument parsing to make `spack --verbose install` work again. It looks like `--verbose` is the only instance where this kind of argument inheritance is used since all other commands override arguments with the same name instead. For instance, `spack --bootstrap clean` does not invoke `spack clean --bootstrap`. Therefore, fix multi-line aliases again by parsing the resolved arguments and instead explicitly pass down `args.verbose` to commands.
haampie
pushed a commit
that referenced
this pull request
Nov 24, 2023
PR #40929 reverted the argument parsing to make `spack --verbose install` work again. It looks like `--verbose` is the only instance where this kind of argument inheritance is used since all other commands override arguments with the same name instead. For instance, `spack --bootstrap clean` does not invoke `spack clean --bootstrap`. Therefore, fix multi-line aliases again by parsing the resolved arguments and instead explicitly pass down `args.verbose` to commands.
This was referenced Nov 29, 2023
mtaillefumier
pushed a commit
to mtaillefumier/spack
that referenced
this pull request
Dec 14, 2023
mtaillefumier
pushed a commit
to mtaillefumier/spack
that referenced
this pull request
Dec 14, 2023
PR spack#40929 reverted the argument parsing to make `spack --verbose install` work again. It looks like `--verbose` is the only instance where this kind of argument inheritance is used since all other commands override arguments with the same name instead. For instance, `spack --bootstrap clean` does not invoke `spack clean --bootstrap`. Therefore, fix multi-line aliases again by parsing the resolved arguments and instead explicitly pass down `args.verbose` to commands.
alalazo
pushed a commit
that referenced
this pull request
Jan 10, 2024
PR #40929 reverted the argument parsing to make `spack --verbose install` work again. It looks like `--verbose` is the only instance where this kind of argument inheritance is used since all other commands override arguments with the same name instead. For instance, `spack --bootstrap clean` does not invoke `spack clean --bootstrap`. Therefore, fix multi-line aliases again by parsing the resolved arguments and instead explicitly pass down `args.verbose` to commands.
RikkiButler20
pushed a commit
to RikkiButler20/spack
that referenced
this pull request
Jan 31, 2024
PR spack#40929 reverted the argument parsing to make `spack --verbose install` work again. It looks like `--verbose` is the only instance where this kind of argument inheritance is used since all other commands override arguments with the same name instead. For instance, `spack --bootstrap clean` does not invoke `spack clean --bootstrap`. Therefore, fix multi-line aliases again by parsing the resolved arguments and instead explicitly pass down `args.verbose` to commands.
vjranagit
pushed a commit
to vjranagit/spack
that referenced
this pull request
Jan 18, 2026
vjranagit
pushed a commit
to vjranagit/spack
that referenced
this pull request
Jan 18, 2026
PR spack#40929 reverted the argument parsing to make `spack --verbose install` work again. It looks like `--verbose` is the only instance where this kind of argument inheritance is used since all other commands override arguments with the same name instead. For instance, `spack --bootstrap clean` does not invoke `spack clean --bootstrap`. Therefore, fix multi-line aliases again by parsing the resolved arguments and instead explicitly pass down `args.verbose` to commands.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes a bug introduced in #17229.
Previously if you ran
spack --verbose commandtheargs.verboseoption wasset accordingly in the sub-command, but with the recent changes all global
options are set to defaults in sub commands (
args.verbose == False).This was used in
spack installto ensure thatspack --verbose installimplied
spack install --verbosetoo s.t. you wouldn't have to runspack--verbose install --verbose-- this is relied on in Gitlab CI, whichcurrently shows no build logs.
I haven't checked if there are other cases where
args.<global option>is usedin a sub command.
Maybe the global argument shouldn't be forwarded to sub commands at all, but
that's how it used to be, so let's continue to do that, cause there's no time
to fix it "properly" and the current state is definitely a regression.