playframework / twirl

Twirl is Play's default template engine
Apache License 2.0
549 stars 108 forks source link

+scripted tests fails on missing dependencies #406

Closed ignasi35 closed 3 years ago

ignasi35 commented 3 years ago

Running sbt +scripted on a fresh clone of the commit https://github.com/ignasi35/twirl/blob/c3fb89394504c40470ea68d9390023eedff93fd9/build.sbt#L185-L191 fails to locate all necessary dependencies:


[info] [error]  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[info] [error]  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[info] [error]  at java.lang.Thread.run(Thread.java:748)
[info] [error] (update) sbt.librarymanagement.ResolveException: unresolved dependency: com.typesafe.play#twirl-api_sjs0.6_2.12;1.5.1: not found
[info] [error] Total time: 4 s, completed Mar 18, 2021 3:24:29 AM
[error] x twirl / scalajs-compile
[error]  Cause of test exception: {line 1}  Command failed: run failed
[debug] Copy resource mappings:
[debug]
[debug] Framework implementation 'org.scalacheck.ScalaCheckFramework' not present.
[debug] Framework implementation 'org.specs2.runner.Specs2Framework' not present.

I suspect the problem is the filter there is which limits what artifacts are published before the scripted.


The workaround is to run +publishLocal before +scripted. But that also fails.

When all artifacts have been cross-published, + scripted still fails on:


[error] Expected ';'
[error] No such setting/task
[error] ++  2.13.4 all apiJVM/scripted apiJS/scripted compiler/scripted parser/scripted
[error]                                                                                ^
sbt:twirl>

Probably the crossScalaVersion settings should not include 2.13 in some of the pmodules.

mkurz commented 3 years ago

@ignasi35 The fix for the dependency is here: #407 / #408

About the +scripted "problem": This is not a problem when running the release task, because it will not call +scripted. What it does call is https://github.com/playframework/twirl/blob/fc42a24563ea582e4b01abf43e8b66798766e5d1/build.sbt#L95 which is https://github.com/playframework/twirl/blob/fc42a24563ea582e4b01abf43e8b66798766e5d1/build.sbt#L198-L200 Which only correctly calls the scripted test in the plugin project.

I guess you ran +scripted locally manually, but that is not the way how it is done when calling release. Therefore this is not a problem.