question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Scala.js 1.0 fails to read transitive jsDependency

See original GitHub issue

I’ve got a PR for scalajs-react to cross-compile to SJS 1.0. The SJS 0.6.32 tests pass fine but for SJS 1.0 I’m getting this error:

https://travis-ci.org/github/japgolly/scalajs-react/jobs/682482544#L543-L567

[error] java.nio.file.FileSystemLoopException: /META-INF/resources/webjars/prop-types/15.7.2
[error] 	at java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:294)
[error] 	at java.nio.file.FileTreeWalker.next(FileTreeWalker.java:372)
[error] 	at java.nio.file.Files.walkFileTree(Files.java:2706)
[error] 	at org.scalajs.linker.PathIRContainer$.org$scalajs$linker$PathIRContainer$$walkIR(PathIRContainer.scala:95)
[error] 	at org.scalajs.linker.PathIRContainer$JarIRContainer.$anonfun$sjsirFiles$2(PathIRContainer.scala:67)
[error] 	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
[error] 	at scala.concurrent.impl.ExecutionContextImpl$DefaultThreadFactory$$anon$1$$anon$2.block(ExecutionContextImpl.scala:75)
[error] 	at java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3313)
[error] 	at scala.concurrent.impl.ExecutionContextImpl$DefaultThreadFactory$$anon$1.blockOn(ExecutionContextImpl.scala:87)
[error] 	at scala.concurrent.package$.blocking(package.scala:146)
[error] 	at org.scalajs.linker.PathIRContainer$JarIRContainer.$anonfun$sjsirFiles$1(PathIRContainer.scala:59)
[error] 	at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:659)
[error] 	at scala.util.Success.$anonfun$map$1(Try.scala:255)
[error] 	at scala.util.Success.map(Try.scala:213)
[error] 	at scala.concurrent.Future.$anonfun$map$1(Future.scala:292)
[error] 	at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:33)
[error] 	at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:33)
[error] 	at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
[error] 	at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402)
[error] 	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
[error] 	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
[error] 	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
[error] 	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
[error] (test / Test / scalaJSIR) java.nio.file.FileSystemLoopException: /META-INF/resources/webjars/prop-types/15.7.2

I don’t directly specify prop-types in my build, it’s a transitive dependency of one of the react jsDependencies.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sjrdcommented, May 4, 2020

In 0.6.x we used ZipInputStream to open jar files. In 1.x we use java.nio.file APIs. From what you say it seems walkFileTree had a bug in JDK 8 that was fixed in 11.

Regardless, I think this jar is borderline. One shouldn’t put nameless directories in a jar.

0reactions
japgollycommented, May 4, 2020

Did some more digging. Of SJS {0.6, 1.0} x JDK {8, 11} this only occurs with SJS 1.0 & JDK 8. Why does it occur with SJS 0.6 & JDK 8?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Announcing Scala.js 1.0.0
Change its version number to "1.0.0". If you use jsDependencies (or rely on the jsDependencies of your transitive dependencies):.
Read more >
Preventing Version Conflicts with versionScheme
A library that you pulled could depend on other libraries, and the transitive dependencies could cause version conflicts.
Read more >
Transitive dependency causes wrong evictions #2291 - GitHub
In the example below my build.sbt depends on the angular webjar 1.4.7. My other dependency depends on angular webjar version [1.3.0).
Read more >
scala - SBT won't resolve transitive dependency against any ...
The specific dependency is org.apache.maven.wagon#wagon-provider-api;1.0-beta-2!wagon-provider-api.jar though I'm not sure which direct dependency is including ...
Read more >
sbt Reference Manual — Library Management
This will use the right jar for the dependency built with the version of Scala that you are currently using. If you get...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found