figwheel-main

figwheel-main http://figwheel.org
ingesol 2019-10-30T08:41:45.034200Z

Thanks! I wanted to see if there was a different route to take here, that did not require generating foreign-libs, but it seems this is the way to go.

kwladyka 2019-10-30T08:58:49.035200Z

it simplify things removing about 50% of lines

ingesol 2019-10-30T09:03:00.035500Z

Yes it’s really excellent, I already implemented it. The reason I wanted to avoid it was that it didn’t work without me figuring out some edge cases, and I didn’t have much time for this. In the end it’s obviously the better option.

ingesol 2019-10-30T09:07:46.036800Z

I’m launching figwheel-main in a Cursive REPL. I’m trying to add a cljs.user ns with some utility functions for my figwheel-main repl, is there a recommended way of doing this? When I include a user file, I get this error:

[Figwheel] Compiling build main to "resources/public/js/main.js"
[Figwheel] Failed to compile build main in 0.101 seconds.
[Figwheel:WARNING] Could not Analyze   resources/public/js/main.out/generated-input-files/gen_test_runner.cljs   line:1  column:1

Namespace declarations must appear at the top-level. at line 1 resources/public/js/main.out/generated-input-files/gen_test_runner.cljs

1  (ns figwheel.main.generated.main-auto-test-runner
     ^---
     2    (:require [cljs.test :refer-macros [run-tests]]
           3              [cljs-test-display.core]))
4
5    (run-tests (cljs-test-display.core/init! "app-auto-testing"))

Could not Analyze   /myroot/dev/user.cljs   line:1  column:1

Namespace declarations must appear at the top-level. at line 1 resources/public/js/main.out/generated-input-files/gen_test_runner.cljs

1  (require '[figwheel.main :as fig])
^--- 
4  (defn some-util [x] 
5    (do-some-util-task x))
6