Fork me on GitHub
#luminus
<
2015-12-01
>
eggsyntax17:12:02

I just discovered that if you create a new project with lein new luminus myproject +cljs and try to lein cljsbuild once you get an error:

Exception in thread "main" java.lang.AssertionError: Assert failed: :source-map true must specify a file in the same directory as :output-to "target/cljsbuild/public/js/app.js" if optimization setting applied
Could be fixed either by adding {:source-map "target/cljsbuild/public/js/app.js.map"} or {:optimizations :none} to :project/dev -> :cljsbuild -> :builds -> :app -> :compiler. @yogthos: I'd be happy to do a bug report and/or pull request if you'd like. If the latter, let me know which fix you'd prefer (or if it's some other fix entirely).

yogthos17:12:20

That's actually the expected behavior, the project is setup for using figwheel

yogthos17:12:39

In not sure if there's a good way to get both ways of compiling working, if you'd like to take a look I'll be happy to take a PR :-)

eggsyntax17:12:50

Huh. Still, if you're specifying additional :cljsbuild config in :project/dev, it seems like it would make sense that it be cljsbuild-compatible. Your call, though, of course. I'll poke around & see if they can both work simultaneously.

eggsyntax17:12:25

That is, if it's not intended to be cljsbuild-compatible, why specify the additional :cljsbuild config?

eggsyntax18:12:18

@yogthos: just tested; either of those solutions works fine w/ figwheel, while simultaneously enabling cljsbuild to work. Got a preference on which solution I implement for a PR?

eggsyntax18:12:04

I'm also noticing something kinda odd -- on a fresh project with lein new luminus myproject +cljs, lein run and lein figwheel end up serving on different ports (3000 vs 3449). Is there a reason for that? I'm used to them being on the same port.

yogthos18:12:53

I think moving :optimizations :none to dev would make sense

yogthos18:12:04

I can push out a new version tonight

yogthos18:12:31

the 3449 server is started by figwheel and it uses its embedded http-kit for that

yogthos18:12:46

so it doesn’t necessarily have the same behavior as the actual server run on 3000

yogthos18:12:20

I find the figwheel server is useful if you’re just doing something with the front-end, but for anything backend related I recommend using the port 3000 server

yogthos18:12:50

the biggest difference is with websockets as the implementation is server specific

eggsyntax18:12:05

Ah, interesting, ok. I'll throw together a PR for you.

yogthos19:12:39

ok awesome!