This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-06-05
Channels
- # babashka (4)
- # bangalore-clj (1)
- # calva (5)
- # chlorine-clover (1)
- # cider (5)
- # clara (9)
- # clj-kondo (18)
- # cljs-dev (12)
- # clojure (42)
- # clojure-europe (9)
- # clojure-norway (1)
- # clojure-uk (4)
- # clojured (255)
- # clojurescript (76)
- # community-development (3)
- # conjure (4)
- # emacs (9)
- # figwheel (3)
- # fulcro (6)
- # graalvm (6)
- # java (15)
- # lsp (7)
- # luminus (1)
- # off-topic (5)
- # pathom (9)
- # reagent (5)
- # ring (6)
- # shadow-cljs (38)
- # sql (21)
- # xtdb (12)
I have a weird bug with shadow-cljs: when I add the dependency to tools.deps.alpha, add-libs3 branch, the watch comand crashes.
this is the dependency: org.clojure/tools.deps.alpha {:git/url "https://github.com/clojure/tools.deps.alpha.git" :sha "241cd24c35ba770aea4773ea161d45276e5d3a73"
[2021-06-05 01:46:51.392 - WARNING] :shadow.cljs.devtools.server.util/handle-ex - {:msg {:type :start-autobuild}} NoSuchMethodError 'java.util.stream.Collector com.google.common.collect.ImmutableList.toImmutableList()' com.google.javascript.jscomp.deps.DependencyInfo$Require.asSymbolList (DependencyInfo.java:60) com.google.javascript.jscomp.deps.DependencyInfo$Base.getRequiredSymbols (DependencyInfo.java:163) com.google.javascript.jscomp.Compiler.findModulesFromInput (Compiler.java:1954) com.google.javascript.jscomp.Compiler.findModulesFromEntryPoints (Compiler.java:1910) com.google.javascript.jscomp.Compiler.parseInputs (Compiler.java:1723) com.google.javascript.jscomp.Compiler.parseForCompilationInternal (Compiler.java:933) com.google.javascript.jscomp.Compiler.lambda$parseForCompilation$4 (Compiler.java:916) com.google.javascript.jscomp.CompilerExecutor.runInCompilerThread (CompilerExecutor.java:127) com.google.javascript.jscomp.Compiler.runInCompilerThread (Compiler.java:816) com.google.javascript.jscomp.Compiler.parseForCompilation (Compiler.java:914) com.google.javascript.jscomp.Compiler.compile (Compiler.java:667) jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (:-2)
how can there be dependency conflicts with deps.alpha ? deps.alpha always takes the newest version?
no clue why you are putting tools.deps.alpha on the classpath for CLJS compilation though, probably best to keep it in a server-only alias
What's the proper way to use printf
formatting in Clojurescript? I see posts on the web suggesting using goog.string.format
but there are other posts discussing dead code elimination issues with that library. I have a minimal test app with
(ns stopwatch (:require [goog.string :as gs]))
(println (gs/format "Hello %s" "world"))
that works with shadow-cljs when building without optimizations. But if I use :simple
or :advanced
, I get a runtime failure because goog.string
is missing format
.@sameer864 add an extra [goog.string.format]
to your :require
then it'll work. it lives in its own file/namespace so just importing goog.string
is not enough
(for dev builds likely some other devtool requires it, so it works accidentally. for release builds that devtool is unused and so the require is missing)
@thheller, thanks. That worked. Is this an issue specific to goog.string/format
or will I run into this with other APIs when I create release builds? I though the build system would automatically include all the transitive dependencies of the functions I refer to.
not the functions you refer to. the namespaces you require. goog.string.format
just happens to be this special case that it is a separate namespace, not part of goog.string
.
Somebody solved this npm package w/shadow-cljs? https://www.npmjs.com/package/react-dates, I require as
["react-dates/initialize" :as init]
["react-dates" :as rd :refer [DateRangePicker SingleDatePicker DayPickerRangeController]]
I tried with `
(def DateRangePickerX
(r/adapt-react-class DateRangePicker))
or [:> DateRangePicker..
but not really work..