Skip to content

sbt "test" command fails with a "Duplicate mappings" error #14

Open

Description

@emiaj

Below the console output:

[play-purescript-example] $ test
[trace] Stack trace suppressed: run last web-assets-test:assets for the full output.
error Duplicate mappings:
[error] /home/jaime/developer/projects/sbt-purescript/play-example/target/web/public/test/public/main.js
[error] from
[error] /home/jaime/developer/projects/sbt-purescript/play-example/target/web/purescript/main/js/main.js
[error] /home/jaime/developer/projects/sbt-purescript/play-example/target/web/purescript/test/js/main.js
[error] Total time: 0 s, completed Nov 19, 2014 1:51:16 PM
[play-purescript-example] $ last web-assets-test:assets
java.lang.RuntimeException: Duplicate mappings:
/home/jaime/developer/projects/sbt-purescript/play-example/target/web/public/test/public/main.js
from
/home/jaime/developer/projects/sbt-purescript/play-example/target/web/purescript/main/js/main.js
/home/jaime/developer/projects/sbt-purescript/play-example/target/web/purescript/test/js/main.js
at scala.sys.package$.error(package.scala:27)
at sbt.Sync$.noDuplicateTargets(Sync.scala:67)
at sbt.Sync$$anonfun$apply$1.apply(Sync.scala:26)
at sbt.Sync$$anonfun$apply$1.apply(Sync.scala:23)
at com.typesafe.sbt.web.SbtWeb$.syncMappings(SbtWeb.scala:369)
at com.typesafe.sbt.web.SbtWeb$$anonfun$projectSettings$31.apply(SbtWeb.scala:187)
at com.typesafe.sbt.web.SbtWeb$$anonfun$projectSettings$31.apply(SbtWeb.scala:187)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
at sbt.std.Transform$$anon$4.work(System.scala:64)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
at sbt.Execute.work(Execute.scala:244)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
error Duplicate mappings:
[error] /home/jaime/developer/projects/sbt-purescript/play-example/target/web/public/test/public/main.js
[error] from
[error] /home/jaime/developer/projects/sbt-purescript/play-example/target/web/purescript/main/js/main.js
[error] /home/jaime/developer/projects/sbt-purescript/play-example/target/web/purescript/test/js/main.js
[play-purescript-example] $

Activity

  1. emiaj commented on Nov 20, 2014

    @emiaj
    Author

    Sorry, I just tested this and it still needs more work, main.js is being generated at "/target/web/public/main" instead of "/target/web/purescript/main/js"

  2. emiaj commented on Nov 20, 2014

    @emiaj
    Author

    After reading the wiki, I noticed the following sentence:

    "Observe the glorious result in target/web/public/main/js"
    

    I wonder why the plugin also writes out the same main.js file into the "/target/web/purescript/main/js" directory.

    That would explain why sbt complains about duplicate mappings for "main.js".

    Looking forward to hear your thoughts on this.

    And sorry for the messy commentaries on this PR, I am fairly new to sbt and its infrastructure.

  3. eamelink commented on Nov 28, 2014

    @eamelink
    Owner

    Hi, thanks for reporting this! The email notifications ended up in my junk box, just found out about it, sorry!

    I'll look at this soon :)

  4. francisdb commented on Nov 8, 2016

    @francisdb

    @emiaj the same bug exists at choucrifahed/sbt-elm#3, does your pull request fully fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions