Fork me on GitHub

for most changes other than dependencies it seems to just magically work for me

Mr. Savy00:05:51

oh snap you're right. It looks like I just needed to save changes and switch windows.


build config changes should be automatically applied yes


just dependencies, source-paths and some others like nrepl require a restart


hi, what would be the better way to solve this

[2020-05-01 10:47:31.625 - INFO] duplicate resource taoensso/timbre.cljs on classpath, using jar:file:/.m2/repository/com/taoensso/timbre/4.10.0/timbre-4.10.0.jar!/taoensso/timbre.cljs over jar:file:/.m2/repository/status-im/timbre/4.10.0-2-status/timbre-4.10.0-2-status.jar!/taoensso/timbre.clj
[2020-05-01 10:47:31.640 - INFO] duplicate resource taoensso/timbre/appenders/core.cljs on classpath, using jar:file:/.m2/repository/com/taoensso/timbre/4.10.0/timbre-4.10.0.jar!/taoensso/timbre/appenders/core.cljs over jar:file:/.m2/repository/status-im/timbre/4.10.0-2-status/timbre-4.10.0-2-status.jar!/taoensso/timbre/appenders/core.cljs
at least do not show this info, this duplication we only have in dev


why would it not show this info? seems kinda important?


I mean if you intent is to override that file then its kinda important to know that is not happening?


yeah its important I'm not arguing 🙂


is there something like :exclusions ?


what is the issue? I don't quite know what you are trying to solve here?


Hi, I run the following script in Cursive to start shadow-cljs:

  '[shadow.cljs.devtools.api :as api]
  '[shadow.cljs.devtools.server :as server])
(api/watch :app)
(api/repl :app)
We've recently made some build changes and bumped shadow's version, and I cannot get this to start any more. I get errors like Syntax error (NoSuchFieldError) compiling at (shadow\cljs\devtools\api.clj:1:1) ES3 and Assert failed: (symbol? read-ns) Any ideas on what I'm doing wrong?

Thijs Creemers12:05:11

Is there a prefered way to merge multiple shadow-cljs projects into one :browser UI? We plan to create UI components per service and merge them together to get a frontend app that communicates to their respective services?


@conan that is due to a version conflict. need to resolve your conflicts. most likely a mismatched clojurescript version and maybe closure-compiler/closure-library.


ah, ok i'll check that. thank you, have a great weekend!


@thijs.creemers if you are asking about combining multiple builds into one single UI then there is no support for that CLJS in general is not suited for that


if you are talking about creating multiple libraries/components and using them to build one UI that is fine

Thijs Creemers13:05:51

@thheller Thank you for the answer. So the way to go for is making a UI library/component per service and combine them in one frontend app.


I guess? Don't know enough about what you are trying to do. Loading multiple different builds on the same page will give you nothing but trouble so you should only load one, that is the only advice I can give without more info

Thijs Creemers13:05:05

You are right, I did some experiments and foud that it is trouble indeed.

Thijs Creemers13:05:18

I will give it a try with cljs libraries.


Everytime I post an issue on Shadow-CLJS, I feel the strenght of this project: most of the time, the bug is not on shadow, but on some dependency that I hardcoded my project... great job! 🙂

💯 4

yeah I wish there were an easy way to sort out dependency issues 😞


its the most common issue people have but I have no idea how to fix it given that shadow-cljs is not always in charge


Do you think it's possible for shadow-cljs to just remove the conflicting dependencies it finds from :depencies vector?


(and issue an warning, or something?)


already doing that for clojurescript/clojure


don't want to hardcode too much since newer versions rarely are an issue


Is there a cljs test runner that works on emacs and not in the browser that offers good navigation between tests and simplifies information about which tests passed and which failed?l


Anyone see any compiler/caching related issues with this code? Inside a translation macro:

(when env/*compiler*
      (validate-consistency! @env/*compiler* i18n-call) ;; The new thing
      (swap! env/*compiler* update-in [::ana/namespaces current-ns ::i18n-calls] vec-conj i18n-call))
That function:
(defn validate-consistency! [compiler i18n-call]
  (let [other-i18n-calls (for [[_ ns-data] (::ana/namespaces compiler)
                               i18n-call (::i18n-calls ns-data)]
        conflict (some
                   (fn [other-i18n-call]
                     (get-conflict i18n-call other-i18n-call))
    (when conflict
            "Translation calls with the same arguments cannot have differing translations.\n"
            (pr-str (:msg i18n-call))
            (pr-str (:msg conflict)))
          {:translation i18n-call
           :conflicting-translation conflict})))))
cc @thheller


@isak I see a lot of issues yes 😛


unless the namespace that uses that depends on every other namespace this is checking you'll run into a lot of timing issues


parallel compile might still be compiling namespaces and so on


Ok, but will that affect anything other than which callsite receives the error? because that doesn't matter in this case


I have no idea in which context you are using this or what ::i18n-calls represent so I cannot comment on that


throwing an error based on other namespace data seems like a problem to me and would probably be something I would do as a post-compile hook


in general macros shouldn't do side effects like that IMHO


The i18n-calls are just the data captured from macro invocations like this: (tr [:api-token/confirm-delete "Are you sure you want to delete this API token?"])


So I would like to throw an error if there are two translation calls that have the same namespaced keyword, but different text. Can this be done in a post-compile hook?


Would it actually stop compilation, or just print a message to the console or something?


hook into :compile-finish and throw the error if it finds one


Ok, I'll fix it, thanks


the build-state argument has a :compiler-env key


that is the value you'd otherwise get out of the @env/*compiler* atom, so it has the ::ana/namespaces


ok, right


@thheller I did some digging into my websocket/cordova issue today.


I’m using ionic wkwebview plugin which serves up the index.html from a server.


In the plugin settings you can set a custom hostname.


If I set a hostname like, I get a websocket error like: WebSocket network error: WebSocket connection failed because it violates HTTP Strict Transport Security.


And the websocket url is …/browser


But changing the hostname back to localhost works without issue.


Not sure if this is something shadow-cljs can/should fix or just something I need to fix through my own configuration.


Just thought I’d let you know what I found out.


This is in iOS btw, so it might be specific to safari.


shadow-cljs default to using js/ when trying to figure out what it should connect to


you can use :devtools {:use-document-host false} to use localhost instead


or you can use :devtools-url to override the url completely


Wow, there’s an option for everything haha


that’s great, thanks

Pavel Klavík23:05:55

Hi, I am having some problems with code reloading. I have multiple defs scattered in multiple namespaces, all contained in one def called config which is used in mount-root for rerendering. When I do changes in one of the namespaces included into config, Shadow-cljs logo appears but the value is not propagated into config. If I change the config itself, the value is finally propagated. How does this work?

Pavel Klavík23:05:18

It seems it does not work when I do transitive change, i.e, config contains the symbol a in ns a, which contains the symbol b in ns b, then updating b does not change config.

Pavel Klavík23:05:33

not sure whether it makes any difference, but everything is placed in .cljc namespaces.

Pavel Klavík23:05:17

Looking at the console, only namespaces a and b are reloaded, not the one with config

Pavel Klavík23:05:27

Adding ^:dev/always to the config namespace fixes the problem, but not sure why it happens