Fork me on GitHub
#cljs-dev
<
2017-02-13
>
anmonteiro03:02:37

I think I uncovered a weird self-host bug

anmonteiro04:02:43

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

anmonteiro04:02:06

so we don't really know how to call cljs.core/cst$sym$cljs$core__u00053__u0004c__u00041__u00053__u00048__println

anmonteiro04:02:59

this is a result of compiling macro namespaces in ClojureScript, which doesn't happen in regular JVM ClojureScript

bronsa11:02:30

anybody tried using devcards using the last cljs release? I'm getting compilation failures using advanced comp

bronsa11:02:04

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}

bronsa11:02:30

unfortunately I'm not getting any line number so I can't track down what expression is causing the failure

niwinz12:02:31

I have the same issue

niwinz12:02:10

(I have reported previously, and supposed that the RegExp reggression fix will fix that)

dnolen13:02:23

@bronsa delete any temporary build stuff, that’s how other people were able to resolve it

dnolen13:02:16

something like that was reported in 1.9.456 not the latest one (and nobody could find anything, fresh build removed the problem)

bronsa13:02:09

@dnolen I'll double check later but I'm reasonably sure it happened on a clean build

bronsa13:02:31

we had that regexp issue and last build fixed that but broke on devcards

dnolen13:02:15

Ok nobody else reported it, more info appreciated

bronsa13:02:34

yeah I'll try to get a minimal repro later today

dnolen13:02:43

(I wasn't talking about RegExp) just your problem

dnolen17:02:06

@bronsa not going to look at that

dnolen17:02:18

there needs to be a repro sans devcards or anything else

bronsa17:02:46

yeah I'm trying to track it down, that was just to let you know that it's not a caching issue

niwinz19:02:54

I think that I found a possible regression related to :foreign-libs

niwinz19:02:25

there is the description and minimal repo (using only clojurescript compiler): https://github.com/niwinz/cljs-playground/tree/foreign-libs-regression

dnolen19:02:20

@niwinz I think it’s because you put assets on the classpath, why do you need to do that?

niwinz19:02:28

hmm, Iet me check it without assets on classpath

niwinz19:02:18

I put it on classpath because I have deps.cljs there

niwinz19:02:25

Moving deps.cljs under src and removing assets from classpath, the compiler raises an exception

niwinz19:02:55

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)

niwinz19:02:29

I suppose that the :file should be a relative path on the location of the deps.cljs, I'm wrong?

niwinz19:02:30

The documentation is not very clear on respect on that, and I just have that working for a long time until the latest release

dnolen19:02:24

yes :file needs to be a relative path or classpath

dnolen19:02:08

relying on it being both - never guaranteed to work

niwinz19:02:00

Hmm, so with my first repo code removing "assets" from the compiler inputs, is now works as expected

niwinz19:02:08

many thanks

juhoteperi20:02:52

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.

juhoteperi20:02:33

except the ijs map is not available in load-libs

juhoteperi20:02:52

I'll create a ticket and a patch

juhoteperi20:02:35

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

juhoteperi20:02:41

But the patch fixes this

juhoteperi20:02:00

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