-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
In short, if I run lein figwheel
twice, without cleaning in between, then in the second session I get a compiler warning any time I try to access a variable—even though the variable is defined, and its value is correctly printed.
Here are the precise steps to reproduce, along with my version and OS information:
Temporary % neofetch
-/+:. raxod502@Radon-MBP-New.local
:++++. ----------------------------
/+++/. OS: OS X El Capitan 10.11.6 15G1212 x86_64
.:-::- .+/:-``.::- Model: MacBookPro11,3
.:/++++++/::::/++++++/:` Kernel: 15.6.0
.:///////////////////////:` Uptime: 23 hours, 36 minutes
////////////////////////` Packages: 365
-+++++++++++++++++++++++` Shell: zsh 5.2
/++++++++++++++++++++++/ DE: Aqua
/sssssssssssssssssssssss. WM: Quartz Compositor
:ssssssssssssssssssssssss- Terminal: iTerm2
osssssssssssssssssssssssso/` CPU: Intel i7-4980HQ (8) @ 2.80GHz
`syyyyyyyyyyyyyyyyyyyyyyyy+` GPU: Intel Iris Pro, NVIDIA GeForce GT 750M
`ossssssssssssssssssssss/ Memory: 3187MB / 16384MB
:ooooooooooooooooooo+.
`:+oo+/:-..-:/+o+/- ████████████████████████
Temporary % rm ~/.lein/profiles.clj
Temporary % lein --version
Leiningen 2.7.1 on Java 1.8.0_112 Java HotSpot(TM) 64-Bit Server VM
Temporary % lein new reagent funk
Generating fresh 'lein new' Reagent project.
Temporary % cd funk
funk % lein figwheel
Figwheel: Cutting some fruit, just a sec ...
Figwheel: Validating the configuration found in project.clj
Figwheel: Configuration Valid :)
Figwheel: Starting server at http://0.0.0.0:3449
Figwheel: Watching build - app
Figwheel: Cleaning build - app
Compiling "target/cljsbuild/public/js/app.js" from ["src/cljs" "src/cljc" "env/dev/cljs"]...
Successfully compiled "target/cljsbuild/public/js/app.js" in 9.21 seconds.
Figwheel: Starting CSS Watcher for paths ["resources/public/css"]
Figwheel: Starting nREPL server on port: 7002
Launching ClojureScript REPL for build: app
Figwheel Controls:
(stop-autobuild) ;; stops Figwheel autobuilder
(start-autobuild [id ...]) ;; starts autobuilder focused on optional ids
(switch-to-build id ...) ;; switches autobuilder to different build
(reset-autobuild) ;; stops, cleans, and starts autobuilder
(reload-config) ;; reloads build config and resets autobuild
(build-once [id ...]) ;; builds source one time
(clean-builds [id ..]) ;; deletes compiled cljs target files
(print-config [id ...]) ;; prints out build configurations
(fig-status) ;; displays current state of system
Switch REPL build focus:
:cljs/quit ;; allows you to switch REPL to another build
Docs: (doc function-name-here)
Exit: Control+C or :cljs/quit
Results: Stored in vars *1, *2, *3, *e holds last exception object
Prompt will show when Figwheel connects to your application
To quit, type: :cljs/quit
cljs.user=> funk.core/home-page
#object[funk$core$home_page "function funk$core$home_page(){
return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div","div",1057191632),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"h2","h2",-372662728),"Welcome to funk"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div","div",1057191632),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"a","a",-2123407586),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"href","href",-793805698),"/about"], null),"go to about page"], null)], null)], null);
}"]
cljs.user=> ^D
funk % lein figwheel
Figwheel: Cutting some fruit, just a sec ...
Figwheel: Validating the configuration found in project.clj
Figwheel: Configuration Valid :)
Figwheel: Starting server at http://0.0.0.0:3449
Figwheel: Watching build - app
Compiling "target/cljsbuild/public/js/app.js" from ["src/cljs" "src/cljc" "env/dev/cljs"]...
Successfully compiled "target/cljsbuild/public/js/app.js" in 1.323 seconds.
Figwheel: Starting CSS Watcher for paths ["resources/public/css"]
Figwheel: Starting nREPL server on port: 7002
Launching ClojureScript REPL for build: app
Figwheel Controls:
(stop-autobuild) ;; stops Figwheel autobuilder
(start-autobuild [id ...]) ;; starts autobuilder focused on optional ids
(switch-to-build id ...) ;; switches autobuilder to different build
(reset-autobuild) ;; stops, cleans, and starts autobuilder
(reload-config) ;; reloads build config and resets autobuild
(build-once [id ...]) ;; builds source one time
(clean-builds [id ..]) ;; deletes compiled cljs target files
(print-config [id ...]) ;; prints out build configurations
(fig-status) ;; displays current state of system
Switch REPL build focus:
:cljs/quit ;; allows you to switch REPL to another build
Docs: (doc function-name-here)
Exit: Control+C or :cljs/quit
Results: Stored in vars *1, *2, *3, *e holds last exception object
Prompt will show when Figwheel connects to your application
To quit, type: :cljs/quit
cljs.user=> funk.core/home-page
---- Compiler Warning on <cljs form> line:1 column:1 ----
Use of undeclared Var funk.core/home-page
1 funk.core/home-page
^---
---- Compiler Warning ----
#object[funk$core$home_page "function funk$core$home_page(){
return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div","div",1057191632),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"h2","h2",-372662728),"Welcome to funk"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div","div",1057191632),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"a","a",-2123407586),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"href","href",-793805698),"/about"], null),"go to about page"], null)], null)], null);
}"]
cljs.user=>
Additional info:
- The problem appears to not occur if I run
lein clean
before runninglein figwheel
the second time. - The warning has been reproduced using the same steps on Linux.
- The same thing happens if I wipe my
~/.m2
repository before performing the same steps as above. - The same thing happens whether I open
localhost:3449
before starting Figwheel or after. - The same thing happens in Safari, Firefox, and Chrome.
- The same thing happens whether I visit
localhost:3449
or0.0.0.0:3449
.
Metadata
Metadata
Assignees
Labels
No labels