This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-13
Channels
- # bangalore-clj (1)
- # beginners (29)
- # boot (13)
- # braveandtrue (5)
- # clara (5)
- # cljs-dev (42)
- # cljsrn (7)
- # clojure (55)
- # clojure-france (46)
- # clojure-nl (11)
- # clojure-portugal (1)
- # clojure-russia (268)
- # clojure-spec (26)
- # clojure-uk (32)
- # clojurescript (173)
- # clr (2)
- # core-async (46)
- # cursive (22)
- # datomic (33)
- # devcards (1)
- # emacs (5)
- # events (8)
- # figwheel (2)
- # flambo (4)
- # instaparse (8)
- # jobs (11)
- # klipse (46)
- # lein-figwheel (3)
- # london-clojurians (2)
- # nrepl (1)
- # off-topic (29)
- # om (4)
- # om-next (8)
- # pedestal (3)
- # rdf (4)
- # re-frame (51)
- # reagent (104)
- # remote-jobs (1)
- # rum (4)
- # schema (2)
- # specter (19)
- # untangled (16)
- # vim (52)
I think I uncovered a weird self-host bug
if we compile macro namespaces with :optimize-constants true
, it causes runtime errors in the non-macro namespaces, because the optimized constants weren't really constants
so we don't really know how to call cljs.core/cst$sym$cljs$core__u00053__u0004c__u00041__u00053__u00048__println
this is a result of compiling macro namespaces in ClojureScript, which doesn't happen in regular JVM ClojureScript
anybody tried using devcards using the last cljs release? I'm getting compilation failures using advanced comp
the error message looks related to the js/RegExp regression
11:27:01 Caused by: clojure.lang.ExceptionInfo: Use of undeclared Var devcards.core/js {:prefix devcards.core, :suffix js, :macro-present? false}
unfortunately I'm not getting any line number so I can't track down what expression is causing the failure
(I have reported previously, and supposed that the RegExp reggression fix will fix that)
@bronsa delete any temporary build stuff, that’s how other people were able to resolve it
something like that was reported in 1.9.456 not the latest one (and nobody could find anything, fresh build removed the problem)
@dnolen https://github.com/Bronsa/CLJS-1.9.473-regression here's how to repro the issue using devcards
yeah I'm trying to track it down, that was just to let you know that it's not a caching issue
there is the description and minimal repo (using only clojurescript compiler): https://github.com/niwinz/cljs-playground/tree/foreign-libs-regression
@niwinz I think it’s because you put assets
on the classpath, why do you need to do that?
Moving deps.cljs
under src
and removing assets
from classpath, the compiler raises an exception
Exception in thread "main" java.lang.AssertionError: Assert failed: (or (file? x) (url? x)), compiling:(/home/niwi/tmp/cljs-playground/build.clj:14:1)
at clojure.lang.Compiler.load(Compiler.java:7391)
at clojure.lang.Compiler.loadFile(Compiler.java:7317)
I suppose that the :file
should be a relative path on the location of the deps.cljs
, I'm wrong?
The documentation is not very clear on respect on that, and I just have that working for a long time until the latest release
Hmm, so with my first repo code removing "assets" from the compiler inputs, is now works as expected
When writing JS files to output-dir, the classpath path is preferred. I'm not sure where the load_file call is generated but it might prefer filesystem path.
I think this should use closure/rel-output-path
logic: https://github.com/clojure/clojurescript/blob/8c9cde94cb05b3d5446c2e6182b55d6f29893031/src/main/clojure/cljs/compiler.cljc#L1053
except the ijs map is not available in load-libs
@niwinz https://github.com/Deraen/clojurescript/commit/0cb4e7cb02177488f6bc25453a39aa2d2370ec3a
I'll create a ticket and a patch
While the @niwinz example the foreign dep files where on both classpath and input paths, this doesn't really work currently at all when the files are only in classpath either
But the patch fixes this
There is only two places where relative-name
is called and now both prefer -relative-path
so hopefully there isn't other cases where this breaks