Skip to content
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

Rename early command in sbt 1.0 #2734

Closed
eed3si9n opened this issue Sep 6, 2016 · 4 comments
Closed

Rename early command in sbt 1.0 #2734

eed3si9n opened this issue Sep 6, 2016 · 4 comments
Assignees

Comments

@eed3si9n
Copy link
Member

eed3si9n commented Sep 6, 2016

problem

sbt uses -- in a way inconsistent with Unix convention. (e93c445):

> help --
--<command>

        Schedules an early command, which will be run before other commands on the command line.
        The order is preserved between all early commands, so `sbt --a --b` executes `a` and `b` in order.

expectation

I'm not sure what the purpose of the early command is. Can we remove this in sbt 1.0?

notes

/cc @jsuereth, @dwijnand

Ref #1041

@dwijnand
Copy link
Member

dwijnand commented Sep 6, 2016

I agree we should move towards the Unix convention, as demonstrated by the fall out of #1041.

One way I know this is used is for log levels in sbt-extras: dwijnand/sbt-extras@90170b2

@eed3si9n
Copy link
Member Author

eed3si9n commented Sep 7, 2016

The early commands gets executed pretty early, like before the session gets initialized, so combining with error, and making --error as if it's an option makes a lot of sense.
But given that the options used by shell script uses single hyphen like -no-colors, the use of double hyphens -- is too subtle. Maybe it's better to explicitly add support for log level options if that's the primary use case.

@eed3si9n eed3si9n changed the title Remove early command in sbt 1.0 Rename early command in sbt 1.0 Sep 15, 2016
eed3si9n added a commit to eed3si9n/sbt that referenced this issue Sep 15, 2016
Fixes sbt#2734, Ref sbt#1041
e93c445 added a feature called early
command, which uses `--` as a prefix to denote some commands that runs
ahead of session loading. While the feature might be useful especially
for logging, `--` is too useful just for this purpose.
@eed3si9n eed3si9n self-assigned this Sep 15, 2016
eed3si9n added a commit to eed3si9n/sbt that referenced this issue Sep 15, 2016
Fixes sbt#2734, Ref sbt#1041
e93c445 added a feature called early
command, which uses `--` as a prefix to denote some commands that runs
ahead of session loading. While the feature might be useful especially
for logging, `--` is too useful just for this purpose.
@DavidPerezIngeniero
Copy link

What is a typical use case of the early command?

@eed3si9n
Copy link
Member Author

eed3si9n commented Sep 23, 2016

@DavidPerezIngeniero The only one we've identified is reducing the log level on startup as --warn. This will now be -warn with single hyphen in 0.13.13 onward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants