Closed dpalinic closed 7 years ago
That is very strange. Can you share the relevant part of your build file? I'll try to reproduce this locally regardless. Thank you for the report!
Hi @holograph ,
Thanks for the response. Please checkout following github project which is build with Lagom Framework in Scala: https://github.com/dpalinic/lagom-jwt-authentication
build.sbt
bump accord version from 0.6.1 to 0.7:
Replace val accord = "com.wix" %% "accord-core" % "0.6.1"
with val accord = "com.wix" %% "accord-core" % "0.7"
ValidationUtil.scala
replace line 19 key = Descriptions.render(violation.description)
with key = Descriptions.render(violation.path)
to solve migration issue.sbt compile
Error:
[error] ^
[error] /home/dpalinic/Workspace/projects/personal/lagom-jwt-authentication/identity-api/src/main/scala/io/digitalcat/publictransportation/services/identity/api/request/UserLogin.scala:14: exception during macro expansion:
[error] java.io.FileNotFoundException: /Users/tomerga/dev/accord/core/.jvm/target/scala-2.11/scoverage-data/scoverage.measurements.62 (No such file or directory)
[error] at java.io.FileOutputStream.open0(Native Method)
[error] at java.io.FileOutputStream.open(FileOutputStream.java:270)
[error] at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
[error] at java.io.FileWriter.<init>(FileWriter.java:107)
[error] at scoverage.Invoker$$anonfun$1.apply(Invoker.scala:42)
[error] at scoverage.Invoker$$anonfun$1.apply(Invoker.scala:42)
[error] at scala.collection.concurrent.TrieMap.getOrElseUpdate(TrieMap.scala:901)
[error] at scoverage.Invoker$.invoked(Invoker.scala:42)
[error] at com.wix.accord.transform.ExpressionDescriber$class.$init$(ExpressionDescriber.scala:46)
[error] at com.wix.accord.transform.ValidationTransform.<init>(ValidationTransform.scala:25)
[error] at com.wix.accord.transform.ValidationTransform$.apply(ValidationTransform.scala:240)
[error] implicit val userLoginValidation = validator[UserLogin] { u =>
I can reproduce this every time.
Thanks, Damir
Very strange, I cannot reproduce this issue at all:
> clean
[success] Total time: 1 s, completed Jul 25, 2017 10:43:38 AM
> compile
[info] Updating {file:/Users/tomerga/research/lagom-jwt-authentication/}common...
[info] Updating {file:/Users/tomerga/research/lagom-jwt-authentication/}public-transportation-services...
[info] Resolving jline#jline;2.12.1 ...
[info] Done updating.
[info] Resolving jline#jline;2.12.1 ...
[info] Done updating.
[info] Updating {file:/Users/tomerga/research/lagom-jwt-authentication/}identity-api...
[info] Resolving org.scala-lang.modules#scala-xml_2.11;1.0.5 ...
[info] Compiling 9 Scala sources to /Users/tomerga/research/lagom-jwt-authentication/common/target/scala-2.11/classes...
[info] Resolving jline#jline;2.12.1 ...
[info] Done updating.
[info] Updating {file:/Users/tomerga/research/lagom-jwt-authentication/}identity-impl...
[info] Resolving com.typesafe#config;1.3.0 ...
[info] Compiling 8 Scala sources to /Users/tomerga/research/lagom-jwt-authentication/identity-api/target/scala-2.11/classes...
[info] Resolving com.lightbend.lagom#build-link;1.3.4 ...
[info] Done updating.
[info] Compiling 10 Scala sources to /Users/tomerga/research/lagom-jwt-authentication/identity-impl/target/scala-2.11/classes...
[success] Total time: 10 s, completed Jul 25, 2017 10:43:50 AM
I'm not actually sure what is going on here, but I do have a theory: do you happen to have scoverage as a global sbt plugin?
Actually ignore that, I'm an idiot and forgot to remove the "offending" directory. Looking into it some more.
Well, this turns out to be an egregious error on my part: scoverage
was enabled for publishing. I think this is highly problematic default behavior (see my comment on scoverage/sbt-scoverage#84), but is never-the-less the culprit.
I'll be releasing 0.7.1 to solve this within the next few hours; thank you for the report @dpalinic!
Summary: I upgraded wix accord from 0.6.1 to 0.7 and started receiving bunch of strange errors during the compile time:
java.io.FileNotFoundException: /Users/tomerga/dev/accord/core/.jvm/target/scala-2.11/scoverage-data/scoverage.measurements.55 (No such file or directory)
Please note I'm not user tomerga mentioned in log line.
Log:
UserCreation class: