ClojureScript

External JavaScript files are not compiled by CLJS

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Declined
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    Linux, java version "1.7.0_07"

Description

External JS files are not compiled by ClojureScript as they used to be.

The project available at https://github.com/pallix/cljs-bug illustrated this.

:libs ["src-js/libs"] is specified in project.clj but the files it contained will not be compiled when calling "lein cljsbuild once".

The scripts/test_bug.sh file can be runned and will return a non-zero value when the test fails.

Activity

Hide
David Nolen added a comment -

As far as I know the :libs option does not take directories, it must be paths to specific JavaScript files.

Show
David Nolen added a comment - As far as I know the :libs option does not take directories, it must be paths to specific JavaScript files.
Hide
Chas Emerick added a comment -

I think this has trickled up from https://github.com/emezeske/lein-cljsbuild/issues/203. David is right that filesystem entries in :libs need to be paths to files, but they can also be classpath prefixes (which is why the workaround discussed in CLJS-526 works).

Pierre, if you add "src-js/libs" to your project.clj's :source-paths vector, I think that might fix the problem.

There's probably a good argument to be made that the different types of :libs entries should be separated out into different options…

Show
Chas Emerick added a comment - I think this has trickled up from https://github.com/emezeske/lein-cljsbuild/issues/203. David is right that filesystem entries in :libs need to be paths to files, but they can also be classpath prefixes (which is why the workaround discussed in CLJS-526 works). Pierre, if you add "src-js/libs" to your project.clj's :source-paths vector, I think that might fix the problem. There's probably a good argument to be made that the different types of :libs entries should be separated out into different options…
David Nolen made changes -
Field Original Value New Value
Resolution Declined [ 2 ]
Status Open [ 1 ] Resolved [ 5 ]
David Nolen made changes -
Status Resolved [ 5 ] Closed [ 6 ]

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: