Fork me on GitHub
#shadow-cljs
<
2018-01-08
>
Alex H09:01:45

Hey @thheller - as mentioned in #clojurescript, I see the following issue when trying to use shadow-cljs (clojure 1.9.0, clojurescript 1.9.946 and core.async 0.3.443):

Alex H09:01:27

Only started using shadow-cljs yesterday and clojurescript a week ago, so bear with me!

thheller09:01:52

do you have the rest of the error available?

thheller09:01:02

the actual message is missing

Alex H09:01:21

[:app] Build failure: ------ ERROR ------------------------------------------------------------------- File: jar:file:/home/alex/.m2/repository/thheller/shadow-cljs/2.0.128/shadow-cljs-2.0.128.jar!/shadow/cljs/devtools/client/hud.cljs:1:1 -------------------------------------------------------------------------------- 1 | (ns shadow.cljs.devtools.client.hud -------^------------------------------------------------------------------------ Invalid :refer, var cljs.core.async/go does not exist -------------------------------------------------------------------------------- 2 | (:require [shadow.dom :as dom] 3 | [shadow.xhr :as xhr] 4 | [shadow.cljs.devtools.client.env :as env] 5 | [shadow.cljs.devtools.client.browser :as browser] --------------------------------------------------------------------------------

Alex H09:01:36

that's all I get

thheller09:01:37

ok, that looks like you are using an older version of core.async

Alex H09:01:58

I'm using 0.3.443; I'll try 0.3.465 then

thheller09:01:56

yeah the latest version is required

Alex H09:01:31

ok, that worked a treat - thanks!

Alex H09:01:58

so far I'm mightily impressed with shadowcljs; it got rid of all my funky issues that I was having with lein-figwheel when loading (many) npm modules

Alex H09:01:14

since the closure compiler's module resolution doesn't support wildcard import/export and a few other things that npm modules do sometimes

thheller09:01:28

yeah, the closure compiler is not very reliable yet.

Alex H09:01:30

whilst on it, though, I have one more question; in lein-figwheel, I used to have a :external-config {:devtools/config {:features-to-install [:formatters :hints]}} to configure binaryage/devtools

Alex H09:01:45

is there a way of doing that in the shadow-cljs.edn?

thheller09:01:16

I think you can stick that in :compiler-options, so :compiler-options {:external-config {:devtools/config {:features-to-install [:formatters :hints]}}}

thheller09:01:39

maybe without the extra :external-config, not sure if that is a figwheel thing

thheller09:01:59

(nested in your build config)

Alex H09:01:37

I'll give that a try later, thanks

hlolli14:01:20

I see that shadow-cljs's manifest.edn is very similar to manifest.json for a chrome plugin I'm about to start to develop. I wonder if there's any trick for shadow to output manifest.json or rewrite the manifest.json on changes. I see myself manually adding js path to new files as I add namespaces and libraries. But this just gave me the idea that this should be possible.

hlolli14:01:24

(given that this is not a problem with optimized compilations as they output 1 file, but at cost of long time)

thheller15:01:51

@hlolli you can specify :manifest-name "manifest.json". the output format is chosen by file ext, just defaults to manifest.edn

thheller15:01:16

but that manifest is not really intended to be used by chrome or anything

thheller15:01:11

its just some information about your modules in case you want to use :module-hash-names and need to get the actual filenames (since they are hashed)

thheller15:01:05

I could add a hook to let you write your own manifest based on the build info

hlolli15:01:21

hmm nice, easy thing to add some json manipulation in the pipeline. Or that, hook..

thheller15:01:38

thats the code that generates the manifest. should be easy to extend/modify based on your needs

hlolli15:01:40

ok ok, my brain is uncaffinated and slow. Yes I'll check it out. Should manifest-name be located top-level in shadow-cljs.edn?

thheller15:01:03

in the build as {:build-options {:manifest-name "foo.json"}}

hlolli15:01:21

nice thanks, I will look at the flush-manifest function. It would be nice to write all the plugin configuration in edn and generate it.

thheller15:01:59

not sure how much config you need but should be easy yes.

thheller15:01:02

gotta grab some food, bbl

hlolli15:01:17

cool, coffe here, Mahlzeit!