-
-
Notifications
You must be signed in to change notification settings - Fork 317
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
Extend version task with scala/java version. (was: add --version option) #491
Comments
Would this be different from the |
It depends. I forgot about the version command, when opening this issue, but this issue also requests to include the used java and scala version, possibly also library versions which are hard-coupled with mill (e.g. os-lib). Having a command for version is a bit weird. All other apps I know use a command line option for it. Also, the version command lies currently in the task namespace, which IMHO should be in control of the mill user. An attribute, which it shares with all the other "built-in" commands like "all", "inspect", ... I'd like to move all those to command line options, or at least into a separate namespace, e.g. |
The current convention is that things which apply to "all tasks" are implemented as flags, and everything else is implemented as tasks. So e.g. Currently we have some weirdness in that tasks such as There's a bit of namespace pollution, but I don't think it's that big a deal. It's also nice because users have the ability to add their own top-level tasks/commands that are on-par with the builtins, in a straightforward way. |
Unfortunately, namespace pollution is an issue in mill. I usually have some top-level "build", "test", "publish" tasks to make common tasks easy, but even "build", which is not a default mill command, collides, when running |
It comes down to a value judgement then:
Let's go with renaming your |
The name collision with
|
The /** Build JARs. */
def build() = T.command {
core.jar()
} |
I regularly see users to want to use a Here are some reasons for the
|
yeah this sounds reasonable
…On Mon, 20 Jan 2020 at 4:47 PM, Tobias Roeser ***@***.***> wrote:
I regularly see users to want to use a mill --version. It's a very common
option, to not say "standard option". I think we should provide that
special option, even though we can implement it as a task. We can still
keep the version task to make that value accessible in a script.
Here are some reasons for the --version addition:
- mill --version would return instantly with a single printed value
- no need to start a mill server in the backgroud just to check that
values and act upon it's value
- no risk of a failure without seeing the version in case of some
issues in the build.sc
- no other spurious error/warning message in case there is no build.sc
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#491>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE5HBDCCHBRDHF7DJKTVHW3Q6VQLLANCNFSM4GHOATIQ>
.
|
This might be useful, e.g. in CI builds and is in general a best practice.
It should also include the used Java and Scala version.
The text was updated successfully, but these errors were encountered: