This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-15
Channels
- # adventofcode (39)
- # aws (1)
- # beginners (39)
- # boot (1)
- # calva (79)
- # cider (8)
- # cljdoc (13)
- # cljs-dev (45)
- # clojure (89)
- # clojure-berlin (2)
- # clojure-europe (1)
- # clojure-uk (1)
- # clojurescript (7)
- # datomic (1)
- # emacs (6)
- # figwheel-main (2)
- # fulcro (29)
- # hyperfiddle (21)
- # juxt (1)
- # leiningen (1)
- # lumo (3)
- # music (1)
- # off-topic (20)
- # pedestal (23)
- # portkey (3)
- # reagent (2)
- # rum (1)
- # shadow-cljs (27)
- # vim (5)
with latest clojurescript master, I’m getting a stacktrace when I try and run a watch
repo you can test: https://github.com/Lokeh/hx/tree/datafy
82c10925eb8d9c3cecf23447ddf4e1342f120b69 (commit before HEAD of master) works fine, so it’s something in https://github.com/clojure/clojurescript/commit/6ccb629e365f46a9516e4defeced652cce9d4d35
got a question, I want to build my code in dev mode and prod mode, so I created a macro to read from environment variable. however shadow-cljs runs a watch server, which means the code compiles in another process, by environment variable does not work when watch server is running. where should I put the variable now?
Not sure I follow, @jiyinyiyong. watch is only for dev mode.
@jiyinyiyong one thing you can do is to checkout the project in another directory and run release there.
@jiyinyiyong don't do that. it breaks caching as the cache won't invalidate if you change the env var
https://shadow-cljs.github.io/docs/UsersGuide.html#_release_specific_vs_development_configuration
release specific configs is still not enough. tried closure-define, no lick either. At last I switched to browser/nodejs(environment variables) for detecting environment.
I thought it would become more predictable if I could decide the environment during compilation. However that breaks caching you mentioned.
@lilactown that commit is invalid. clojure doesn't like that either for me?
CompilerException clojure.lang.ExceptionInfo: Call to clojure.core/let did not conform to spec:
In: [0 0 0 0] val: :spec/keys fails spec: :clojure.core.specs.alpha/local-name at: [:args :bindings :binding :map :mb 0 :sym] predicate: simple-symbol?
In: [0 0 0 0] val: :spec/keys fails spec: :clojure.core.specs.alpha/seq-binding-form at: [:args :bindings :binding :map :mb 0 :seq] predicate: vector?
In: [0 0 0 0] val: :spec/keys fails spec: :clojure.core.specs.alpha/map-bindings at: [:args :bindings :binding :map :mb 0 :map] predicate: coll?
In: [0 0 0 0] val: :spec/keys fails spec: :clojure.core.specs.alpha/map-special-binding at: [:args :bindings :binding :map :mb 0 :map] predicate: map?
In: [0 0 0 1 0] val: :problems fails spec: :clojure.core.specs.alpha/ns-keys at: [:args :bindings :binding :map :nsk 1] predicate: simple-symbol?
In: [0 0 0 0] val: :spec/keys fails spec: :clojure.core.specs.alpha/map-bindings at: [:args :bindings :binding :map :msb 0] predicate: #{:as :or :syms :keys :strs}
...
{:clojure.spec.alpha/keys [problems fn], :clojure.spec.test.alpha/keys [caller]} data
is the clojure variant. not sure why that was changed?
I wonder why when I tried it with the regular CLJS main REPL, Nashorn REPL, and figwheel it didn’t complain
@lilactown shadow-cljs uses the core specs from clojure for CLJS. those are not included in normal CLJS yet