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=>
In short, if I run
lein figwheeltwice, 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:
Additional info:
lein cleanbefore runninglein figwheelthe second time.~/.m2repository before performing the same steps as above.localhost:3449before starting Figwheel or after.localhost:3449or0.0.0.0:3449.