Fork me on GitHub
#leiningen
<
2018-03-30
>
kurt-o-sys09:03:19

I have something really weird going on with lein: when I run lein figwheel, compile seems to work fine, it loads up to

Prompt will show when Figwheel connects to your application
[Rebel readline] Type :repl/help for online help info
but when I run localhost:3449' in the browser, it doesn't connect and it load an old version of the app - changes in cljs files are not loaded. I have been lein clean`, rm -r target and restarting pc already a few times.

kurt-o-sys09:03:00

figwheel seems to compile old sources, not new ones. I have no idea why or where lein takes these sources from

kurt-o-sys09:03:01

How can I find out what's wrong (why lein is taking old sources over and over again)

practicalli-johnny09:03:46

@kurt-o-sys I have resolved that kind of situation by clearing the browser cache, although I am unsure of the underlying cause (unless it's just too many browser tabs)

kurt-o-sys09:03:30

did that also, will tray again 😛

kurt-o-sys09:03:14

when lein isn't running, I get an error in the browser (as expected). well, I'll try again 😛

lwhorton15:03:01

hey guys, does lein offer a way to execute code inside the project.clj? i’m really just trying to use it to read env variables defined in an upstream process

mikerod17:03:09

@lwhorton you can use the ~ inside of the defproject

👍 4
mikerod17:03:25

and you can also evaluate things at the top of the project.clj before the defproject

mikerod17:03:46

I’ve also seen people use read-eval literals in defproject It works and I do not know that I see a major difference between that and ~. However, there is a comment I’ve found in Leiningen core functions under defproject that says the next major version, 3, of lein will drop support for ~ in favor of using Clojure’s read-eval syntax instead

mikerod17:03:27

e.g.

(defproject mine/proj #=(find-my-version) 
 )

mikerod17:03:20

The ~ (unquote) style can be seen in the sample project https://github.com/technomancy/leiningen/blob/stable/sample.project.clj#L12 It is used in several places in this