Domanda

I have been using sbt and sbt-idea for a while and for the most part it works perfectly - unfortunately there is one key use case where it doesn't.

The use case is when you are working on a project based on the output of gen-idea. Everything works perfect (as expected). Then you change the project setting to enable fsc (Fast Scala Compiler) in the project settings - still good.

You need slf4s as a dependency so you add it to the project's build.sbt. It is not picked up by Intellij yet (expected), so you go back to your sbt console, reload, gen-idea. This causes Intellij to alert you to reload the project. You do as it recommends and now slf4s is recognized by Intellij. Great, but now the project no longer has fsc enabled because gen-idea re-wrote your project files.

For this instance its easy enough to re-enable fsc, but in general this doesn't scale if I need to re-configure my project every time I run gen-idea.

Is there a way to tell sbt-idea to modify the current project files instead of creating new ones each time or base the new ones on the old ones?

È stato utile?

Soluzione

My answer is not about modifying the project, which the question asks, but about FSC support.

Enabling FSC by default should work in the current trunk version based on this issue from Nov 2011.

But it seems that the current published version 0.11.0 is too old to include this patch.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top