Fork me on GitHub
#tools-deps
<
2018-09-06
>
gas21:09:12

how do I clear the cache trying to do clj -A:new figwheel-main hello-world.app --reagent but getting yesterdays cached version of fighweel.main template?

bhauman22:09:05

@gas 0.1.9 is out so you can just update to that

gas22:09:40

yeah I see that however also saw you updated template so tryed to run clj -Anew but keep getting old template settings?

seancorfield23:09:48

@gas does clj -Sforce work to clear the cache (that clj keeps)?

seancorfield23:09:05

(or you can just delete the .cpcache folder where you are running clj and that should force it to recreate any classpaths)

seancorfield23:09:15

I think Alex mentioned a bug around snapshot handling...

gas23:09:30

trying -Sforce @mo where is cpcache udner home?

seancorfield23:09:15

The .cpcache folder exists wherever you run clj

seancorfield23:09:28

(it creates that in every folder that you run it in)

gas23:09:17

ok -Sforce didnt work.

seancorfield23:09:40

Per Alex's comment?

seancorfield23:09:51

(snapshots only get checked for once a day)

gas23:09:51

yeah but not sure how bhaumann figwheel-main template works as it doesnt seem to have a version. presume its goes off git?

gas23:09:32

dont seem to have .cpcache where I am running clj? on a mac not in home wither. hmm found it in .clojure/.cpcache

gas23:09:46

delete ~/.clojure/.cpcache ??

bhauman23:09:56

templates are a bit different

bhauman23:09:26

I’m releasing a new template very soon

seancorfield23:09:28

clj-new requests RELEASE or SNAPSHOT versions as part of the dependency lookup as I recall... Let me go look at the code. It's been a while since I wrote it.

bhauman23:09:48

oh that would be cool

gas23:09:45

@bhauman ok - I have copied your template and works great - FYI only issue in template at moment you need react as deps for reagent config for it to work with regent 0.8.1

seancorfield23:09:05

OK, so here's what happens in clj-new...

seancorfield23:09:31

...it looks for <template>/clj-template then <template>/boot-template then <template>/lein-template, in that order.

bhauman23:09:40

@gas weird, I tested every config, I’m surprised

bhauman23:09:02

@seancorfield so no snapshot versions?

seancorfield23:09:07

For the clj-template, if the template name looks like a git URL or a filesystem local path, it will only use that.

bhauman23:09:31

oh well thats good

seancorfield23:09:06

Otherwise it will either request a RELEASE version or a SNAPSHOT version -- but I'm checking whether the flag to expose snapshot is in place...

bhauman23:09:32

@gas it shouldn’t need react at at all

seancorfield23:09:33

...right now, that flag isn't exposed in clj-new (only in boot-new ... and lein new)

bhauman23:09:15

very good to know

seancorfield23:09:00

BTW, a "git template" looks like <url to repo>@<SHA> and the last part of the URL is considered to be the template name.

seancorfield23:09:13

So you can pull specific versions of templates down from GitHub using that.

gas23:09:30

@bhauman ok I commented out react and it works this time! Only diff is i had the #framework part in my core.cljs but dont see any react stuff in that code

seancorfield23:09:41

Ah, it won't work with https://github.com/bhauman/figwheel-main-template because it ends it -template rather than just the template name (`figwheel-main`).

bhauman23:09:38

@seancorfield the snapshot part won’t work?

seancorfield23:09:13

The git dependency won't work.

seancorfield23:09:01

clj -A:new hello-world.app

seancorfield23:09:28

That would work if that was indeed the name of the repo -- but you have -template on it.

bhauman23:09:27

there’s already a figwheel-main repo 🙂

seancorfield23:09:31

I could provide an option to override the actual template name (like I do with local paths: /path/to/some/code::my-template

bhauman23:09:49

I think the git url covers this case pretty well

seancorfield23:09:15

Well, the problem is that the template name doesn't match the repo path.

seancorfield23:09:06

If I added that option, you could do

clj -A:new  hello-world.app

seancorfield23:09:41

I should make it consistent on both git and local deps really...

seancorfield23:09:09

And figure out a way to enable snapshot lookup...

seancorfield23:09:37

I'll work on those tomorrow afternoon or over the weekend.