Fork me on GitHub
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!


do you have the rest of the error available?


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


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


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


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?


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


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


(nested in your build config)

Alex H09:01:37

I'll give that a try later, thanks


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.


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


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


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


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)


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


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


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


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?


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


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.


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


gotta grab some food, bbl


cool, coffe here, Mahlzeit!