This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-16
Channels
- # adventofcode (76)
- # aleph (1)
- # aws (2)
- # beginners (101)
- # boot (1)
- # boot-dev (1)
- # calva (25)
- # cider (12)
- # cljs-dev (29)
- # clojure (214)
- # clojure-europe (1)
- # clojure-nl (5)
- # clojure-spec (1)
- # clojure-uk (6)
- # clojurescript (155)
- # data-science (1)
- # datomic (48)
- # figwheel-main (5)
- # immutant (1)
- # leiningen (11)
- # nrepl (2)
- # off-topic (24)
- # pathom (2)
- # pedestal (2)
- # portkey (8)
- # protorepl (5)
- # re-frame (2)
- # rum (4)
- # shadow-cljs (21)
Bug discovered. Compile this src/foo.cljs
:
(ns foo
(:require [cljs.js :as cljs]))
(defn -main []
(enable-console-print!)
(println "hello"))
with:
{:deps {org.clojure/clojure {:mvn/version "1.10.0-RC5"}
org.clojure/clojurescript {:mvn/version "1.10.439"}
}
:aliases {:build-simple {:main-opts ["-m" "cljs.main" "-O" "simple" "-co" "{:pretty-print,false,:optimize-constants,true,:static-fns,true}" "-d" "out" "-c" "foo"]}}}
then you get:
Circular dependency detected, cljs.core -> cljs.core
If this not a known issue yet, I’ll post one.(the compile opts are the ones recommend for self-host: https://clojurescript.org/guides/self-hosting)
Will read+string
(introduced in Clojure 1.10) be available in cljs?
I didn’t notice it was in cljs.tools.reader
. Will take a look.
Thanks @dnolen
Following up on the earlier discussion about noting breaking changes https://clojurians.slack.com/archives/C07UQ678E/p1544746745174700
I'd personally appreciate leaning more on the side of noting possible breaking changes rather than not mentioning them at all. At times I've found upgrading to new versions of ClojureScript difficult because things have changed in a way that broke our code. For example https://dev.clojure.org/jira/browse/CLJS-2114
I think you are right that things are going to get ignored...until I need to check something or until I need to debug a problem that I don't know if it's coming from my code or the compiler. That's were I am really whole-heartedly grateful that the maintainer is noting things. Maybe I am stating the obvious here and I see your point though in this particular breakage. In general I really like the approach of asking the contributor to add a couple of lines in the CHANGELOG or somewhere else. I find myself agreeing with @danielcompton here. It is maybe because I admittedly got burned.
On thing I've actually found of value: Canary. It caught an inadvertent consequence of a change that broke Specter.
There is this entires class of "Hyrum" changes that could break things, that are great when Canary catches them.
The two examples in my mind:
• Specter (the vec
thing https://github.com/nathanmarz/specter/commit/e7abb2b5384b0b64d871fb347be7c34a15473eb2)
• Secretary (the merge-with
alignment with Clojure)
@borkdude it seems like a bug yes - but there's no information about how's that different from other usage of the self host ns
I’m not sure what you mean. This is a normal cljs project. I refer to the cljs.js namespace to get self-hosted eval, but I’m actually not using it at all in this example.
ok, make a minor self-host ticket, please point out the cause :optimize-constants true
FWIW, I was trying out this setting because it was documented here: https://clojurescript.org/guides/self-hosting
I think you are right that things are going to get ignored...until I need to check something or until I need to debug a problem that I don't know if it's coming from my code or the compiler. That's were I am really whole-heartedly grateful that the maintainer is noting things. Maybe I am stating the obvious here and I see your point though in this particular breakage. In general I really like the approach of asking the contributor to add a couple of lines in the CHANGELOG or somewhere else. I find myself agreeing with @danielcompton here. It is maybe because I admittedly got burned.