@juhoteperi would you give me some advice re: my message just above?
@frederic Both options are fine. Keeping the currents paths is okay, but I guess changing them also is fine as I think it should only cause minimal breakage, foreign-libs get automatically used from new paths and probably users get compile time errors if the css path has changed.
Oh, ok. Thank you.
I think I’ll change them then. It doesn’t seem to have a lot of traction on clojars, might as well get it right with limited breakage
@juhoteperi I found out that building cljsjs packages (boot package install target) on windows boxes can result in invalid deps.cljs files
Here’s an example :
{:foreign-libs [{:file "cljsjs/quill/development/quill.inc.js", :provides ["cljsjs.quill"], :file-min "cljsjs/quill/production/quill.min.inc.js"}], :externs ["cljsjs\\quill\\common\\quill.ext.js"]}
(note the backslashes in the :externs)
would you be interested in a pull-request to either document the problem or fix it?
I believe the problem could be fixed by a simple string substitution in cljsjs.boot-cljsjs.packaging/deps-cljs
but that might be a kludge
Hmm. why do :file and :file-min work correctly but not :externs
they all use boot.core/tmp-path
The only difference I can see is that quill.ext.js comes directly from the resources directory on a windows file system, while quill.inc.js and quill.min.inc.js are sift :moved from a downloaded, uncompressed .tar.gz archive
My guess would be that boot handles those inconsistently
However, both are valid windows paths (although they’re rarely used, forward slashes are valid path separators even on windows)
So, I would argue that, although it would be nicer if boot were more consistent, what they are doing is not technically incorrect
Which makes me think that cljsjs should normalize the paths
Hey, I'm seeing something kinda weird... I'm using this as my (manually-built) deps.cljs
:
{:foreign-libs [{:provides ["cljsjs.react-three-renderer"]
:requires ["cljsjs.react" "cljsjs.react-dom" "cljsjs.three"]
:file "cljsjs/react-three-renderer/development/react-three-renderer.inc.js"
:file-min "cljsjs/react-three-renderer/production/react-three-renderer.min.inc.js"}]
:externs ["cljsjs/react-three-renderer/common/react-three-renderer.ext.js"]}
...but then in my compiled sources for an app using this library I see this:
% grep -r react_dom *
resources/public/js/compiled/out/cljs_deps.js:goog.addDependency("../cljsjs/react-three-renderer/development/react-three-renderer.inc.js", ['cljsjs.react_three_renderer'], ['cljsjs.react', 'cljsjs.react_dom', 'cljsjs.three']);
...and the JS throws an error Undefined nameToPath for cljsjs.react_dom
, apparently having mangled the name to use underscores instead of dashes
Yes
Underscores are changed to dashes
But you should use "cljsjs.react.dom"
in :requires
anyway
Like here: https://github.com/cljsjs/packages/blob/master/react-mdl/resources/deps.cljs#L5
Aha. I'll check that, thanks @juhoteperi
Though that's pretty much the same thing that I already mentioned in #clojurescript