This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-14
Channels
- # arachne (5)
- # architecture (2)
- # bangalore-clj (7)
- # beginners (96)
- # boot (34)
- # braveandtrue (1)
- # cider (12)
- # cljs-dev (38)
- # cljsrn (59)
- # clojure (326)
- # clojure-dev (35)
- # clojure-greece (1)
- # clojure-italy (6)
- # clojure-russia (47)
- # clojure-spec (16)
- # clojure-uk (25)
- # clojurescript (136)
- # core-async (18)
- # cursive (18)
- # datascript (2)
- # datomic (28)
- # dirac (6)
- # emacs (4)
- # garden (3)
- # hoplon (28)
- # instaparse (1)
- # jobs (4)
- # juxt (1)
- # lein-figwheel (10)
- # liberator (1)
- # mount (3)
- # off-topic (39)
- # om (16)
- # om-next (1)
- # onyx (15)
- # pedestal (9)
- # proton (1)
- # random (1)
- # re-frame (48)
- # reagent (8)
- # ring-swagger (4)
- # rum (3)
- # specter (5)
- # sql (3)
- # unrepl (273)
- # untangled (27)
- # vim (4)
- # yada (7)
Anyone ran into this kind of thing while experimenting with the new modules stuff?
@martinklepsch did it not work?
Cyclic deps should work in module_deps.js
. Not sure how Closure handles it
sorry should have provided more info. I can correctly calculate the inputs (mostly took cues from your om/react experiment) but once I load the page I get an error that something that’s in position.js
isn’t defined:
Uncaught ReferenceError: module$$Users$martin$projects$weekly_log$node_modules$mobiledoc_kit$dist$commonjs$mobiledoc_kit$utils$cursor$position is not defined at range.js:33
@martinklepsch so here's a guess. That may not have anything to do with cyclic dependencies, but with a Closure bug related to hoisting https://github.com/google/closure-compiler/issues/2265
I could be wrong though
The best way to rule it out is compiling Closure Compiler from master
@martinklepsch also you may wanna try CLJS master too, as you can just specify :npm-deps {:mobile-doc "version"}
and require it directly from a CLJS namespace
That way you avoid all those hacks I did when this wasn't available
I’m on CLJS master but will try Closure master too
re :npm-deps
how does that know which file is “the file to load” for a given name? E.g. What I’m doing manually in the following snippet
Default is index.js
and package.json
can declare different name as entry file
Ah right, forgot about that 🙂 I know nothing about NPM lol
Btw, I tend to agree with the people suggesting that this shouldn’t be a ClojureScript compiler concern. Simple primitives > easy configuration.
One will come out of the other eventually.
@martinklepsch package.json
declares a main
entry
we use that to figure out what is the entrypoint for a module
Is there anything special needed for locally building closure-compiler? I ran their mvn thing, added [com.google.javascript/closure-compiler “1.0-SNAPSHOT”]
and have a jar in my m2 but get "Failed to read artifact descriptor for com.google.javascript:closure-compiler:jar:1.0-SNAPSHOT”
Just saw — it’s looking for a closure-compiler-parent jar ?!
@martinklepsch oh you’re just better off copying the thing in your target folder to your local project directory
and adding that to the classpath
so I build the jar and add it to the classpath manually? did you look into why we can’t just consume via maven?
I never tried
I knew it would be hard cuz I had tried it like a year ago and couldn’t get it to work
this time I was just looking at the fastest way to get up and running
I hope they don’t mind this issue https://github.com/google/closure-compiler/issues/2372
I hope they welcome it 🙂
it would definitely make things easier for us
@dnolen just went ahead and ported every spec fix in Clojure 1.9.0-alpha15 to ClojureScript
- http://dev.clojure.org/jira/browse/CLJS-1978 - http://dev.clojure.org/jira/browse/CLJS-1979 - http://dev.clojure.org/jira/browse/CLJS-1980
I think there will be a conflict between 1978 and 1980
in any case the new macro mres
will be duplicated if there are no conflicts
so probably need a better solution there
just so you’re aware
@anmonteiro Figured out how to build/install closure-compiler locally but the latest hoisting fixes apparently were not related to what I was seeing. https://github.com/google/closure-compiler/issues/2373