<< Back to previous view

[CLJS-586] Incremental compilation support generates WARNINGS Created: 09/Sep/13  Updated: 11/Sep/13  Resolved: 11/Sep/13

Status: Closed
Project: ClojureScript
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: Julien Eluard Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None


 Description   

Incremental support introduced with r1877 generates lots of WARNINGS with some projects. It looks related to macro usage.

I have a simple project reproducing the issue here.

To reproduce:

  1. run lein cljsbuild once
  2. modify src/some_ns.cljs
  3. run lein cljsbuild once

If you modify src/incremental.cljs at step 2 WARNINGS are not generated.



 Comments   
Comment by David Nolen [ 10/Sep/13 8:36 AM ]

I'm curious why you suspect it's related to macro usage?

Comment by Julien Eluard [ 10/Sep/13 9:21 AM ]

I meant to say it looks like what is triggering this is the usage of require-macros. I'm afraid I don't have much more info than that.
It might help to know that I couldn't reproduce the issue with another use case I used for a macro related issue (after fixing the problematic alias).

Comment by Geraldo Lopes de Souza [ 10/Sep/13 9:27 AM ]

I had these warnings before r1877

Comment by Julien Eluard [ 10/Sep/13 9:42 AM ]

I just tried to reproduce with my simple project with 1859 and it does not generate any warning. Any specific version I should try?
Also could you test on your end with my project to see if you can reproduce with some other version?

Comment by Geraldo Lopes de Souza [ 10/Sep/13 12:04 PM ]

lein do cljsbuild clean, cljsbuild once

On r1847 on my playground project show same warnings. ex:

WARNING: Use of undeclared Var cljs.core/IVector at line 1109 file:/home/geraldo/.m2/repository/org/clojure/clojurescript/0.0-1847/clojurescript-0.0-1847.jar!/cljs/core.cljs

Then I change cljs to r1877 and type
lein do cljsbuild clean, cljsbuild once
I get the same warnings.

At this point I just type "cljsbuild once" without the clean step I get no warning.

After that I invoke cljsbuild auto, change the code to force compilation and no warning:

$ lein do cljsbuild auto
Compiling ClojureScript.
Browser-REPL ready @ http://localhost:51305/6408/repl/start
Compiling "target/classes/public/app.js" from ["src/cljs" "target/generated/cljs"]...
Successfully compiled "target/classes/public/app.js" in 4.784285243 seconds.

Comment by David Nolen [ 10/Sep/13 12:07 PM ]

Geraldo thank you for the extra information, so are you saying the warning behavior is identical between 1847 and 1877 or different?

Comment by Julien Eluard [ 10/Sep/13 1:57 PM ]

I tried with 1847 and don't get any warning with my project. Also 'lein do cljsbuild clean, cljsbuild once' is not enough to generate them with 1877.

This is probably the same issue but triggered slightly differently.

Comment by Geraldo Lopes de Souza [ 10/Sep/13 2:12 PM ]

David,

The behaviour for me is identical on both versions trigged by cljsbuild clean, cljsbuild once.

Comment by David Nolen [ 11/Sep/13 2:21 PM ]

I cannot reproduce what is described in the ticket using 1877 and this repository - http://github.com/swannodette/cljs-build-bug. Can someone else confirm that they can reproduce?

Comment by Julien Eluard [ 11/Sep/13 2:30 PM ]

I didn't test yet with this repo but I noticed you didn't update the required ns in core.cljs (still some-ns, should be cljs-build-bug.other).

Comment by David Nolen [ 11/Sep/13 2:40 PM ]

Julien thanks for the check, I can repro now.

Comment by David Nolen [ 11/Sep/13 2:41 PM ]

Looks to be an issue only with files in JARs, and it appears that cljs.core.clj has not been analyzed ...

Comment by David Nolen [ 11/Sep/13 3:15 PM ]

OK I cut a new release with what should be a fix - try 1878, you can get it by specifying the sonatype maven repositories in your project.clj.

Soon as I hear some confirmations I'll close this one.

Thanks all!

Comment by Julien Eluard [ 11/Sep/13 3:41 PM ]

Great! No more warnings for me with 1878.

Thanks!

Comment by David Nolen [ 11/Sep/13 4:04 PM ]

fixed http://github.com/clojure/clojurescript/commit/d3e346fc8db320874f50325fbaf6950b6550cc01

Generated at Fri Aug 01 01:01:22 CDT 2014 using JIRA 4.4#649-r158309.