Essential SBT for Scala, excellent guide for newbies!

158 views
Skip to first unread message

William Narmontas

unread,
Dec 21, 2016, 7:39:37 AM12/21/16
to scala-user
Hello,

I wrote up this guide several weeks ago, it may be good when introducing a friend to Scala:


Regards,
William

PS Feedback very welcome!

Adriaan Moors

unread,
Dec 21, 2016, 12:11:30 PM12/21/16
to William Narmontas, scala-user
Very cool! Check out http://www.scala-sbt.org/0.13/docs/sbt-new-and-Templates.html to simplify the first few steps with the new templating support in 0.13.13!

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Валерий Байбосынов

unread,
Dec 22, 2016, 1:21:11 AM12/22/16
to scala-user
Nice tutorial William, the best thing that it is fully reproducible, I like it very much.This article tied so hard to Linux/Unix, but Windows guys can do it with tool you mentioned. May be Good idea to introduce native packager in this article.

Then I want to mention about ideas I don't understand:

1) You have title

Create a unit project

While I think I create empty sbt project that uses sbt 0.13.13, I guess "Create empty sbt project" will be better.

2)For me the biggest advantage of this article that it is easy to
reproduce, and I think it was your goal. You showing advantage of sbt '~run', while you didn't mention that user needs to open new tab to try 'sed' source file, some confused user may try to do it in the same terminal session, and it wouldn't work for him,

Example:


➜  new-project sbt '~run'                             
[info] Loading project definition from /home/vol/new-project/project
[info] Set current project to new-project (in build file:/home/vol/new-project/)
[info] Running SimpleApp
It definitely definitely works
[success] Total time: 0 s, completed Dec 22, 2016 8:54:43 AM
1. Waiting for source changes... (press enter to interrupt)
sed -i -e 's/works/definitely works/' \
      src/main/scala/SimpleApp.scala%

➜  new-project       src/main/scala/SimpleApp.scala


And we leave sbt, when we paste the sed code. (this who don't like to watch video)

You also may mention where to exit the sbt.

3) I think the snapshot about directory and file states will be great for text version.

The idea seems great, thank you for '~run' and '~test', I use sbt for a year but don't know about this feature. What I like most about this article, that sbt looks super simple when you go throw this steps.



среда, 21 декабря 2016 г., 15:39:37 UTC+3 пользователь William Narmontas написал:

William Narmontas

unread,
Dec 24, 2016, 8:21:17 AM12/24/16
to scala-user
Thank you Adriaan and Valery, I'll take your feedback into account for the next update :-)
Reply all
Reply to author
Forward
0 new messages