This is useful for wrapper scripts that want to customize arcanist's behavior without affecting the global configuration.
This can be implemented with arcanist_configuration entry in .arcconfig, however it is currently limited to
per-project settings, and this feature makes writing wrapper scripts a little easier.
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Commits
- rARC5a02012706b5: Allow specifying runtime configuration with --set-config key=value
arc diff --set-config editor=vim (yeah yeah, crappy test case)
Diff Detail
- Repository
- rARC Arcanist
- Branch
- runtime_config
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 1071 Build 1071: [Placeholder Plan] Wait for 30 Seconds
Event Timeline
This generally looks good, but some inlines around dealing with edge cases.
scripts/arcanist.php | ||
---|---|---|
38–42 | You should parse this new flag here, with PhutilArgumentParser, instead of as part of workflows. In particular, some options may affect which workflows are available, like load. If we wait until we have a workflow to parse arguments, it will become impossible to run arc --config load=xxxx custom-workflow y z. | |
src/workflow/ArcanistBaseWorkflow.php | ||
618 | I think this will raise a (confusing) warning/fatal if there's no = in the argument. Instead, we should throw ArcanistUsageException. | |
619 | This should use ArcanistSettings->willWriteValue() to interpret the value (the name is a little confusing, but willWriteValue() is the one that takes a user-entered value and converts it into a machine-readable value). Otherwise, it's impossible to configure lists/maps, and values like "true", "false", "on" and "off" will not be interpreted correctly. |
One minor spelling issue, I'll just clean that up in the pull.
scripts/arcanist.php | ||
---|---|---|
51 | "invocation" |