-
-
Notifications
You must be signed in to change notification settings - Fork 384
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
Support a target separator (+
) in the argument parser
#1521
Conversation
+
) in the argument parser
@lefou looks great. I like the idea of keeping the separate tokens separate; originally I had thought about putting each set of command + arguments into a single string/token like SBT does, but that opens up a big can of worms: nested escaping, tokenization, etc. Your idea is better What do you think of using Just a thought, either way what you propose is far better than what we currently havr |
Glad you like it.
TLDR: I'd like to not use Having a rather long Linux background, I'm used to this one single true meaning of I have thought rather long about a good separator, and from my experience @lihaoyi It would be great if you could double check, that the |
Good point about |
How thorough is the masking? e.g. if i want to pass a literal |
Good point. I'll add a test for that. |
Only a standalone |
This adds support to specify arbitrary targets and target arguments in one mill run. __Motivation:__ Current mill only supports the selection of one or multiple targets followed by an argument list which is applied to all targets. Providing different arguments is currently not supported. __Solution:__ We introduce a new separator `+` which separates the target arguments from the next target. To pass the `+` as argument to a target, masking with `\+` is supported. Example: ```bash mill __.compile + core.testCached + itest.test fastTest slowTests + __.publishLocal ``` This command will: * run `compile` for all modules * run `testCached` for module `core` * run `itest.test` command with arguments ` fastTest` and `slowTests` * run `publishLocal` for all modules The limitation, that a command can only run once is still present and not changed by this PR. See pull request: com-lihaoyi#1521
This adds support to specify arbitrary targets and target arguments in one mill run. __Motivation:__ Current mill only supports the selection of one or multiple targets followed by an argument list which is applied to all targets. Providing different arguments is currently not supported. __Solution:__ We introduce a new separator `+` which separates the target arguments from the next target. To pass the `+` as argument to a target, masking with `\+` is supported. Example: ```bash mill __.compile + core.testCached + itest.test fastTest slowTests + __.publishLocal ``` This command will: * run `compile` for all modules * run `testCached` for module `core` * run `itest.test` command with arguments ` fastTest` and `slowTests` * run `publishLocal` for all modules The limitation, that a command can only run once is still present and not changed by this PR. See pull request: com-lihaoyi#1521
#1566) This adds support to specify arbitrary targets and target arguments in one mill run. __Motivation:__ Current mill only supports the selection of one or multiple targets followed by an argument list which is applied to all targets. Providing different arguments is currently not supported. __Solution:__ We introduce a new separator `+` which separates the target arguments from the next target. To pass the `+` as argument to a target, masking with `\+` is supported. Example: ```bash mill __.compile + core.testCached + itest.test fastTest slowTests + __.publishLocal ``` This command will: * run `compile` for all modules * run `testCached` for module `core` * run `itest.test` command with arguments ` fastTest` and `slowTests` * run `publishLocal` for all modules The limitation, that a command can only run once is still present and not changed by this PR. See pull request: #1521 Pull request: #1566
Fixes com-lihaoyi#1648 This issue was introduced in com-lihaoyi#1648 which is a backport of com-lihaoyi#1521 It was probably introduced while resolving merge conflicts and is not present in the main branch.
This PR adds support to specify arbitrary targets and target arguments in one mill run.
Motivation: Current mill only supports the selection of one or multiple targets followed by an argument list which is applied to all targets. Providing different arguments is currently not supported.
Solution: We introduce a new separator
+
which separates the target arguments from the next target. To pass the+
as argument to a target, masking with\+
is supported.Example:
This command will:
compile
for all modulestestCached
for modulecore
itest.test
command with argumentsfastTest
andslowTests
publishLocal
for all modulesThe limitation, that a command can only run once is still present and not changed by this PR.
I could imagine, that we later also provide a
++
separator, to specify targets that need to run after each other. This would also allow running the same command multiple times (with different args).This also makes the
all
andpar
commands obsolete.Review by @lihaoyi