User feedback - it's actually too easy to set up sbt :)

172 views
Skip to first unread message

Asko Kauppi

unread,
Nov 11, 2012, 10:01:34 AM11/11/12
to simple-b...@googlegroups.com
My primary trouble using sbt is an interesting one: it's way *too easy* to build a project with it.

What happens is that if I've moved in the command line window to some subdirectory, i.e. 'src/Blah', and issue 'sbt' there, it creates a new project under that path. I know one of the main targets of the project has been easy initialization, but this is actually hurting us users. If there was i.e. 'sbt -create' or something like that, such inadvertently created 'target' folders would not need to be removed. It's not a big annoyance, and that probably tells how pleased I am with the tool otherwise. :)

But I do repeatedly run into this bomb.

- Asko 

Paul Phillips

unread,
Nov 11, 2012, 1:34:04 PM11/11/12
to simple-b...@googlegroups.com


On Sun, Nov 11, 2012 at 7:01 AM, Asko Kauppi <aka...@gmail.com> wrote:
But I do repeatedly run into this bomb.


% sbt
Starting sbt: invoke with -help for other options
/tmp doesn't appear to be an sbt project.
If you want to start sbt anyway, run:
  /Users/paulp/bin/sbt -sbt-create

Robin Green

unread,
Nov 12, 2012, 3:37:56 AM11/12/12
to simple-b...@googlegroups.com
I don't get this behaviour - and I'm using sbt 0.11.3 installed via the Typesafe .deb repository, which has a modified version of Paul's script.

Asko Kauppi

unread,
Nov 12, 2012, 3:42:13 AM11/12/12
to simple-b...@googlegroups.com
As additional info, I'm using 'sbt' from OS X HomeBrew with:

$ sbt --version
sbt launcher version 0.12.1

Paul Phillips

unread,
Nov 12, 2012, 3:59:45 AM11/12/12
to simple-b...@googlegroups.com


On Mon, Nov 12, 2012 at 1:37 AM, Robin Green <gre...@gmail.com> wrote:
I don't get this behaviour - and I'm using sbt 0.11.3 installed via the Typesafe .deb repository, which has a modified version of Paul's script.

Emphasis on "modified" I suppose. It's been in mine a long time.

commit ce1f6fb7c7
Author: Paul Phillips <pa...@improving.org>
Date:   1 year, 3 months ago

Josh Suereth

unread,
Nov 12, 2012, 5:18:25 AM11/12/12
to simple-b...@googlegroups.com

We removed that feature for misbehaving.   I'll do some archeology to figure out what was improper.

Note:   there has been talk of requiring a set of files for sbt projects to have, which can make features like this part of the standard.  While this is all talk, this discussion is the perfect time to bring it up.

Would you like sbt to require certain files to exist?   My opinion is that project/build.properties should be required and define which sbt version the build uses.   All the scripts ( as of 0.12.x) should be able to work with multiple versions thanks to launcher fixes.

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To post to this group, send email to simple-b...@googlegroups.com.
To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.

Johannes Rudolph

unread,
Nov 15, 2012, 3:30:35 PM11/15/12
to simple-b...@googlegroups.com
On Monday, November 12, 2012 11:18:32 AM UTC+1, Fluffy wrote:

Would you like sbt to require certain files to exist?   My opinion is that project/build.properties should be required and define which sbt version the build uses.   All the scripts ( as of 0.12.x) should be able to work with multiple versions thanks to launcher fixes.

+1 for detecting a valid project by project/build.properties. May of course be superseded by a new mechanism in upcoming versions,

Asko Kauppi

unread,
Nov 15, 2012, 11:41:35 PM11/15/12
to simple-b...@googlegroups.com

You do mean 'build.sbt', right. In the 0.12 sbt version.

-asko

Johannes Rudolph

unread,
Nov 16, 2012, 5:13:03 AM11/16/12
to simple-b...@googlegroups.com
On Fri, Nov 16, 2012 at 5:41 AM, Asko Kauppi <aka...@gmail.com> wrote:
> You do mean 'build.sbt', right. In the 0.12 sbt version.

No. You don't need a build.sbt.


--
Johannes

-----------------------------------------------
Johannes Rudolph
http://virtual-void.net

OlegYch

unread,
Nov 17, 2012, 8:30:00 AM11/17/12
to simple-b...@googlegroups.com
I find it quite useful to be able to start sbt in any directory with zero configuration.
If the main problem is cleaning up after it, how about placing target somewhere in tmp by default (or via option)? 

Aleh

Asko Kauppi

unread,
Nov 17, 2012, 1:57:01 PM11/17/12
to simple-b...@googlegroups.com

The problem I'm experiencing is to change to a subdir, not notice the prompt is there, and typing 'sbt run' or whatever. It takes a while to realize I wasn't in the right place; by that time 'target' is already created. Coming from C++ and Makefile, this simply is weird, and in my opinion unnecessary.

I won't rub this in more. I can live with it. But I do think it's confusing for many.

asko

Chris Dow

unread,
Nov 18, 2012, 3:40:58 AM11/18/12
to simple-b...@googlegroups.com
It would be nice if projects always had a build.properties file with the sbt version.  Then when I check out someone else's project I don't have to guess which version I should be using.  However, as mentioned elsewhere, I like being able start a project without any configuration.

I think if sbt starts requiring build.properties then when it is not present sbt should either ask the user if they want to proceed without the file or (even better) ask the user if it can create the file with the current sbt version.

Robin Green

unread,
Nov 19, 2012, 4:47:46 AM11/19/12
to simple-b...@googlegroups.com
+1

Paul Phillips

unread,
Nov 19, 2012, 11:25:42 AM11/19/12
to simple-b...@googlegroups.com
On Sat, Nov 17, 2012 at 10:57 AM, Asko Kauppi <aka...@gmail.com> wrote:
The problem I'm experiencing is to change to a subdir, not notice the prompt is there, and typing 'sbt run' or whatever. It takes a while to realize I wasn't in the right place; by that time 'target' is already created. Coming from C++ and Makefile, this simply is weird, and in my opinion unnecessary.

I'll take a slightly stronger stance and say it's unquestionably the wrong thing. Find me another tool which when invoked with *no arguments* will create subdirectories in the current directory, regardless of what it is, and then start filling them with build products. It is a gross violation of standard command line tool practice.

(If you can find one I'll only say "there's another broken tool", but I think - I hope - they will be in short supply.)

Reply all
Reply to author
Forward
0 new messages