ClojureScript

Incremental compilation support generates WARNINGS

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • 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.

Activity

Hide
David Nolen added a comment -

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

Show
David Nolen added a comment - I'm curious why you suspect it's related to macro usage?
Hide
Julien Eluard added a comment -

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).

Show
Julien Eluard added a comment - 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).
Hide
Geraldo Lopes de Souza added a comment -

I had these warnings before r1877

Show
Geraldo Lopes de Souza added a comment - I had these warnings before r1877
Hide
Julien Eluard added a comment -

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?

Show
Julien Eluard added a comment - 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?
Hide
Geraldo Lopes de Souza added a comment -

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.

Show
Geraldo Lopes de Souza added a comment - 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.
Hide
David Nolen added a comment -

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

Show
David Nolen added a comment - Geraldo thank you for the extra information, so are you saying the warning behavior is identical between 1847 and 1877 or different?
Hide
Julien Eluard added a comment -

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.

Show
Julien Eluard added a comment - 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.
Hide
Geraldo Lopes de Souza added a comment -

David,

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

Show
Geraldo Lopes de Souza added a comment - David, The behaviour for me is identical on both versions trigged by cljsbuild clean, cljsbuild once.
Hide
David Nolen added a comment -

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?

Show
David Nolen added a comment - 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?
Hide
Julien Eluard added a comment -

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).

Show
Julien Eluard added a comment - 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).
Hide
David Nolen added a comment -

Julien thanks for the check, I can repro now.

Show
David Nolen added a comment - Julien thanks for the check, I can repro now.
Hide
David Nolen added a comment - - edited

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

Show
David Nolen added a comment - - edited Looks to be an issue only with files in JARs, and it appears that cljs.core.clj has not been analyzed ...
Hide
David Nolen added a comment -

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!

Show
David Nolen added a comment - 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!
Hide
Julien Eluard added a comment -

Great! No more warnings for me with 1878.

Thanks!

Show
Julien Eluard added a comment - Great! No more warnings for me with 1878. Thanks!

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: