emezeske / lein-cljsbuild

Leiningen plugin to make ClojureScript development easy.
Other
1.1k stars 151 forks source link

Duplicate input error #495

Open reeFridge opened 5 years ago

reeFridge commented 5 years ago

Problem description

We have two files with identical names input.js but in separate namespaces and dirs but build script does not distinguish them and puts by the same path in the target/cljsbuild-compiler-0 dir.

Log

Compiling ClojureScript...
Compiling ["/<path-to-project>/lighthouse/target/cljsbuild-main.js"] from ["src"]...
Nov 14, 2018 1:15:42 PM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: ERROR - Duplicate input: /<path-to-project>/lighthouse/target/cljsbuild-compiler-0/input.js

Nov 14, 2018 1:15:42 PM com.google.javascript.jscomp.LoggerErrorManager printSummary
WARNING: 1 error(s), 0 warning(s)
ERROR: JSC_DUPLICATE_INPUT. Duplicate input: /<path-to-project>/lighthouse/target/cljsbuild-compiler-0/input.js at (unknown source) line (unknown line) : (unknown column)
Compiling ["/<path-to-project>/lighthouse/target/cljsbuild-main.js"] failed.
java.lang.Exception: Closure compilation failed

More info (project structure, sources and way to reproduce) can be found in bug-repo

Supposed place for modification:

https://github.com/emezeske/lein-cljsbuild/blob/7abb969766248d6cabc50598cd69267acf6b141c/support/src/cljsbuild/compiler.clj#L145

reeFridge commented 5 years ago

I also try to use boot and do the same thing in it and encounter the same problem. Probably the real cause of this issue could be not in the build tool?