SBT Pluggin usage

Hi,

I would like to understand, what does the sbt plugin provide as functionality exactly.

I have been able to load SBT project in Intellij. Depency are resolved. However after that, i don't know what to do. I can not run any sbt tasks from within intellij. Is there any support for that ?

finally, is there a documentation that explain all that this plugin exaclty provide ?


Many thanks,

Maatari

0
5 comments

Hi,

SBT tasks is not implemented yet. We have such plans. There is no any documentation yet, except blog post (http://blog.jetbrains.com/scala/2013/11/18/built-in-sbt-support-in-intellij-idea-13/), but again, we have in mind to add some information about SBT support as well.

Best regards,
Alexander Podkhlayuzin.

0
Avatar
Permanently deleted user

Understood.

so what is the typical workflow here. You import to resolve dependency and that's it?

when you update your sbt file what happens? When you want to compile, should you sbt compile or use the make of IntelliJ ?

i'm sorry if it sounds stupid but I just don't get the workflow... Could you help?

0
Avatar
Permanently deleted user

I've been using this feature daily with my work with a couple of Play 2.2 projects.

The way the workflow has been working for me - so far - is that you simply add the dependency you want to your project's build.sbt file and it will auto import/download all the .jars from the appropriate repository.  From there, you can access those classes in your own code.

You can also import a new project in IntelliJ via SBT (its listed as an option along with Maven).

It may do some additional things that are undocumented, but for me and what I do daily, it hardly gets in the way and just works.

As for compling that all changed with the most recent Scala plugins - so I'm not quite sure how it works.  For me it just seems to work - however, when running with my Play server running, I notice that it will continue to compile independently of the IDE (which it would - it needs to) - but often times it finds errors that the IDE doesn't.  I'm hoping that this is something that will be eventually addressed - but so far its not a real big issue for me.

Hope this helps.

0
Avatar
Permanently deleted user

Let me add something about the compiler - which I just discovered after writing the above post...

Seems like the 'make' task will do the right thing (execute compile) - whether or not its SBT seems to be up to how you set things up in your preferences. By default its internal IntelliJ Compiler (which seems quick) - but you can change that if you wish.

The good news is that it now seems to be discovering the errors that typically I had to rely on the play server to find for me!  So this certainly is an improvement and makes me quite happy. Just wish it would find these incrementally - but perhaps with time. :)

0
Avatar
Permanently deleted user

thx

0

Please sign in to leave a comment.