scalatra/scalatra.g8

Cannot run project initiated with defaults

Closed this issue · 6 comments

With all defaults:

organization [com.example]: 
name [My Scalatra Web App]: 
version [0.1.0-SNAPSHOT]: 
servlet_name [MyScalatraServlet]: 
package [com.example.app]: 
scala_version [2.13.8]: 
sbt_version [1.7.1]: 
scalatra_version [3.0.0-M2]: 
twirl_version [1.5.1]: 
xsbt_web_plugin_version [4.2.1]: 
jetty_version [9.4.35.v20201120]: 

I get an error when running sbt test:

[error] java.lang.RuntimeException: found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[error] 
[error]         * org.scala-lang.modules:scala-xml_2.13:2.1.0 (early-semver) is selected over 1.2.0
[error]             +- org.scalatra:scalatra_2.13:3.0.0-M2                (depends on 2.1.0)
[error]             +- com.typesafe.play:twirl-api_2.13:1.5.1             (depends on 1.2.0)

Please try Twirl version 1.6.0-M6

bebyx commented

@magnolia-k I tried it and sbt outputs a dependency error, too.

[error] java.lang.RuntimeException: found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[error] 
[error] 	* org.scala-lang.modules:scala-xml_2.13:2.1.0 (early-semver) is selected over 1.3.0
[error] 	    +- org.scalatra:scalatra_2.13:3.0.0-M2                (depends on 2.1.0)
[error] 	    +- com.typesafe.play:twirl-api_2.13:1.6.0-M6          (depends on 1.3.0)

@bebyx

I mistakenly thought the following commits were included in 1.6-M6.
They will be reflected in the next release.

playframework/twirl@658dfaa

Shouldn't the default versions in the template contain versions of libraries that are compatible? Or are the latest stable releases fetched, without some compatibility matrix?

Sorry, Scalatra 3 is still milestones and nothing is fixed yet. The template will be fixed once Scalatra 3.0.0 is officially released. Or we may create an independent template for Scalatra 3 if we cannot make it compatible with one for older versions of Scalatra.

So, we may have to fix the default version of Scalatra in the current giter8 template as the latest version of Scalatra 2.