figwheel-main

figwheel-main http://figwheel.org
2020-05-30T00:45:55.047Z

Thought I’d figured it out, but no luck, just giving me a list of npm modules to install and installing them doesn’t appear to create a valid build…

2020-05-30T00:47:55.047200Z

^{:final-output-to "resources/public/js/compiled/app.js"
  :open-url            false
  :watch-dirs          ["test" "src"]
  :css-dirs            ["resources/public/css"]}
{:main example.core
 :target :bundle
 :bundle-cmd {:default ["npx" "webpack" "--mode=production" :output-to "-o" :final-output-to]}
 :output-dir           "resources/public/js/compiled/"
 :asset-path           "/js/compiled/"
 :source-map-timestamp true
 :closure-defines {goog.DEBUG false}}
Couldn’t get further than here, perhaps someone will be more successful than me 😃

bhauman 2020-05-30T02:37:18.048Z

@folcon with the bundle target the bundler cant process the output-to if its not in output-dir

bhauman 2020-05-30T02:38:09.048300Z

figwheel does add that message to save you

bhauman 2020-05-30T02:39:55.048500Z

closure-defines needs `

:closure-defines {cljs.core/*global* "window"}}
`

bhauman 2020-05-30T02:40:13.048700Z

for advanced @folcon

bhauman 2020-05-30T02:41:08.049200Z

@folcon the docs are not complete up to date yet, I’m still working on it

jntn 2020-05-30T05:50:24.052500Z

Hey! Great to hear from you! I actually tried this example repo from you https://github.com/PEZ/fresh-figwheel-main. I choose jack-in and selected :fig and :build, but then calva just stays in “trying to connect” mode.

pez 2020-05-30T05:57:44.052900Z

Oh, I know what is going wrong. Let me add a thing to the README about it. brb

pez 2020-05-30T06:24:30.053100Z

There, README updated. You'll see what tripped you up, I hope. I'm sorry about the inconvenience!

jntn 2020-05-30T06:42:26.055900Z

I would love to understand more of the source code, maybe you can point me in the direction where this is handled? And I don’t quite understand what role nrepl and piggieback plays.

2020-05-30T09:29:38.058800Z

Thank you for all you’ve done on it so far, it’s tons better =)…

Jan K 2020-05-30T13:23:27.069Z

Has someone tried figwheel-main 0.2.6 with vim-fireplace? I can connect with Piggieback but when trying to evaluate I'm getting Not supported: class figwheel.repl.FigwheelReplEnv$fn__16105.

Jan K 2020-05-30T13:23:32.069200Z

I'm also seeing this previously fixed problem reappear: https://github.com/bhauman/figwheel-main/issues/145

bhauman 2020-05-30T14:01:03.070Z

hmmm, I don’t think there was a regression here

bhauman 2020-05-30T14:01:23.070400Z

oh but the latest clojurescript stopped passing output-to to the repl

Jan K 2020-05-30T14:11:18.073100Z

I tried both the older clojurescript 1.10.597 and 1.10.773 with figwheel-main 0.2.6, in both cases the issue #145 seems to be present

bhauman 2020-05-30T14:12:07.074Z

OK yeah I’m looking at it, I don’t see the :output-dir in there hmmm

bhauman 2020-05-30T14:19:12.074400Z

Yes this change got reverted!

bhauman 2020-05-30T14:19:35.074700Z

I don’t know how, but …

bhauman 2020-05-30T14:23:32.075300Z

OK I reverted it on purpose because it was causing the repl to hang on error somehow

bhauman 2020-05-30T14:43:33.076Z

@jkr.sw found the problem should have a fix out shortly

Jan K 2020-05-30T14:44:04.076200Z

Excellent, thank you

bhauman 2020-05-30T15:08:47.076600Z

@jkr.sw just deployed changes to 0.2.7-SNAPSHOT

bhauman 2020-05-30T15:10:01.078Z

0.2.7-SNAPSHOT also has :bundle-freq which can either be :once , :always or :smart which checks for changes to output-to or npm_deps.js

bhauman 2020-05-30T15:11:28.079300Z

:bundle-once is deprecated as :bundle-freq is just a better name

bhauman 2020-05-30T15:13:47.080500Z

I’d love to deploy 0.2.7 tomorrow as its the end of month 1 of the Clojurists Together Quarter

Jan K 2020-05-30T15:22:58.081800Z

Just tried 0.2.7-SNAPSHOT, both the problems I had before are fixed 👍

Jan K 2020-05-30T15:26:58.083900Z

Evaluations are showing #object[cider.piggieback.UnknownTaggedLiteral ...] when returning eg. atom or a function, normally there should be eg.`#object[clojure.lang.Atom ...]`, but I guess that might not be a problem in figwheel-main

Jan K 2020-05-30T15:32:20.085400Z

Never mind, found that documented in Piggieback: https://github.com/nrepl/piggieback/blob/master/README.md#pretty-printing

bhauman 2020-05-30T23:42:34.086600Z

@jkr.sw thanks for reporting back!

2020-05-30T23:44:59.087500Z

Hey, @bhauman =)… I’ve updated the prior thread with the last attempts, and I’m around for a bit if you want me to test stuff.

bhauman 2020-05-30T23:46:50.088Z

@folcon here’s what I would try

bhauman 2020-05-30T23:48:19.088700Z

first you don’t need an asset-path because its all bundled in one file