This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-01
Channels
- # announcements (3)
- # babashka (17)
- # beginners (163)
- # bristol-clojurians (1)
- # calva (18)
- # chlorine-clover (17)
- # clj-kondo (13)
- # cljs-dev (50)
- # cljsjs (3)
- # cljsrn (13)
- # clojure (218)
- # clojure-dev (5)
- # clojure-europe (9)
- # clojure-italy (10)
- # clojure-nl (8)
- # clojure-uk (107)
- # clojurescript (25)
- # conjure (163)
- # cursive (63)
- # data-science (9)
- # datomic (38)
- # docker (1)
- # figwheel (34)
- # figwheel-main (3)
- # fulcro (15)
- # graalvm (1)
- # helix (12)
- # jobs (3)
- # juxt (5)
- # kaocha (3)
- # lein-figwheel (2)
- # leiningen (6)
- # luminus (2)
- # malli (1)
- # meander (12)
- # nrepl (4)
- # rdf (2)
- # re-frame (2)
- # reagent (7)
- # reitit (5)
- # remote-jobs (2)
- # rum (1)
- # shadow-cljs (65)
- # spacemacs (27)
- # tools-deps (18)
- # vim (19)
- # xtdb (2)
oh snap you're right. It looks like I just needed to save changes and switch windows.
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 devI mean if you intent is to override that file then its kinda important to know that is not happening?
Hi, I run the following script in Cursive to start shadow-cljs:
(require
'[shadow.cljs.devtools.api :as api]
'[shadow.cljs.devtools.server :as server])
(server/start!)
(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?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.
@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
@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
You are right, I did some experiments and foud that it is trouble indeed.
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! 🙂
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?)
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)]
i18n-call)
conflict (some
(fn [other-i18n-call]
(get-conflict i18n-call other-i18n-call))
other-i18n-calls)]
(when conflict
(throw
(ex-info
(str
"Translation calls with the same arguments cannot have differing translations.\n"
(pr-str (:msg i18n-call))
"\nvs.\n"
(pr-str (:msg conflict)))
{:translation i18n-call
:conflicting-translation conflict})))))
cc @thhellerunless the namespace that uses that depends on every other namespace this is checking you'll run into a lot of timing issues
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
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?
that is the value you'd otherwise get out of the @env/*compiler*
atom, so it has the ::ana/namespaces
If I set a hostname like foo.bar
, I get a websocket error like: WebSocket network error: WebSocket connection failed because it violates HTTP Strict Transport Security.
Not sure if this is something shadow-cljs can/should fix or just something I need to fix through my own configuration.
shadow-cljs default to using js/document.location.host
when trying to figure out what it should connect to
or you can use :devtools-url
to override the url completely https://shadow-cljs.github.io/docs/UsersGuide.html#proxy-support
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?
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.
not sure whether it makes any difference, but everything is placed in .cljc namespaces.
Looking at the console, only namespaces a and b are reloaded, not the one with config
Adding ^:dev/always to the config namespace fixes the problem, but not sure why it happens