figwheel-main

figwheel-main http://figwheel.org
2020-07-16T12:37:47.073400Z

That’s interesting! Would be nice to have it working but for me in krell it’s been quite hit-or-miss whether things are reloaded or not.

2020-07-16T12:43:52.075500Z

@bhauman Almost up and running! So happy to have figwheel’s nice compile warnings again! Made me think of one thing that’s been bugging me though. It seems that compile warnings are only shown once for each problem. Is there any way to get them to bug me on each recompile?

bhauman 2020-07-16T13:20:43.077200Z

@daniel975 here’s the deal with that, if the file that the warning came from gets recompiled you get another warning. But the cljs compiler avoids recompiling files we don’t need to so things go much faster. Hence the trade off.

1
bhauman 2020-07-20T18:45:34.105900Z

An interesting thought

2020-07-16T13:38:24.078300Z

That makes sense. I see a way to fix it of course but that might be more work than it’s worth.

Mitch 2020-07-16T14:41:34.078400Z

Figured this out. My custom index.html did not pull in the right js file.

2020-07-16T18:10:20.079100Z

So trying the new react native support I’m getting [Error: Figwheel Bridge Unable to fetch optionsUrl: <http://localhost:9500/cljs-out/ios/cljsc_opts.json>] That path exists in target/public/ so I’m guessing the figwheel root is incorrectly configured. Before I dive into trying to find out what folder figwheel is actually serving from and how to change it; is there an obvious config mistake I’m doing?

bhauman 2020-07-16T18:36:58.079600Z

@daniel975 target needs to be on the classpath

bhauman 2020-07-16T18:38:39.081Z

You may have to reload the app, as it may be a race condition

2020-07-16T18:46:38.082800Z

I do have :paths ["src" "target"] in my deps.edn and I tried the path in the browser; it’s not resolving.

2020-07-16T19:58:47.083800Z

@bhauman Ok, classpath was a good hint. I needed not only target but "target/public" on the classpath.

2020-07-16T20:48:34.083900Z

Actually, I think this is quite a gotcha. Have you considered keeping a list of all files that had warnings in the last compile and touching those before doing an incremental compile?

bhauman 2020-07-16T21:44:23.088300Z

@daniel975 that’s a bug in the documentation

bhauman 2020-07-16T21:44:32.088600Z

take the -r off of the command

bhauman 2020-07-16T21:44:58.089200Z

Also target/public shouldn’t be the path

bhauman 2020-07-16T21:45:04.089400Z

so that’s strange

bhauman 2020-07-16T21:46:57.089900Z

OH that’s what you did thanks for the PR!

2020-07-16T21:58:41.092Z

I only took the -r off for the production command though. In dev target/public is what did the trick. This is what my target looks like so it does add in a public directory.

bhauman 2020-07-16T22:46:32.092900Z

yeah but the figwheel server serves from the classpath/public

bhauman 2020-07-16T22:46:44.093200Z

@daniel975 ^

bhauman 2020-07-16T22:46:54.093500Z

so something is amis

bhauman 2020-07-16T22:48:44.094700Z

it looks like the server is now serving from the classpath period which is a problem

2020-07-18T16:21:03.099700Z

Something is definitely amiss. I’m now getting the same error even with “target/public” in my path. Removing it doesn’t help but removing and then adding it back makes everything work again.

bhauman 2020-07-20T18:46:51.106100Z

@daniel975 yeah there is something wrong with your setup.

2020-07-29T15:23:37.190900Z

Sorry for the delay, my son was born 10 days ago. 😊 In the end it seems completely removing target from the classpath and allowing figwheel to add it dynamically works reliably.

bhauman 2020-07-29T21:14:53.198100Z

Congrats!!!

1😁
bhauman 2020-07-29T21:15:07.198300Z

@daniel975 ^

bhauman 2020-07-16T22:54:17.095700Z

are you using ring-stack-options?