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

Expand on how sbt shell parses input #152

Closed
dwijnand opened this issue May 28, 2015 · 3 comments
Closed

Expand on how sbt shell parses input #152

dwijnand opened this issue May 28, 2015 · 3 comments

Comments

@dwijnand
Copy link
Member

After some trial and error I understood a part of how the sbt shell parses scoped keys, which I didn't understand from the docs and, therefore, I think should be expanded upon.

Given (this was using sbt 0.13.7)

lazy val root = project aggregate core
lazy val core = project

here I'm getting the wrong answer because I'm asking the question wrong:

> test::publishArtifact
[info] core/*:test::publishArtifact
[info]     true
[info] root/*:test::publishArtifact
[info]     true

when I should be asking

> test:publishArtifact
[info] core/test:publishArtifact
[info]     false
[info] root/test:publishArtifact
[info]     false

Note, I was only able to understand because I was using a multi-module setup, which showed core/*:test::publishArtifact, which isn't what I was after. In a single module setup this would have just shown true.

@jsuereth
Copy link
Member

This highlights @eed3si9n 's goal of unifying the Shell parsing with Scala syntax so there's less confusion.

test as the task vs. test the configuration is a large source of confusion, to me.

@dwijnand
Copy link
Member Author

Indeed. In fact if the sbt shell were a REPL it would be very, very useful.. I could stop needing to drop in and out of consoleProject to do things like resolvers.eval foreach println..

@dwijnand
Copy link
Member Author

This highlights @eed3si9n 's goal of unifying the Shell parsing with Scala syntax so there's less confusion.

Problem solved! (context: https://twitter.com/eed3si9n/status/913325233599336448)

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

2 participants