Clojurians
#cljs-dev
<
2018-12-16
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

borkdude16:12:06

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.

borkdude16:12:01

(the compile opts are the ones recommend for self-host: https://clojurescript.org/guides/self-hosting)

viebel20:12:09

Will read+string (introduced in Clojure 1.10) be available in cljs?

dnolen21:12:39

it already exists in cljs.tools.reader

dnolen21:12:33

I don't really see the need given it's there - and it's mostly for tooling people

viebel21:12:28

I didn’t notice it was in cljs.tools.reader. Will take a look. Thanks @dnolen

danielcompton21:12:13

Following up on the earlier discussion about noting breaking changes https://clojurians.slack.com/archives/C07UQ678E/p1544746745174700

danielcompton21:12:45

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

dnolen22:12:10

I already implied it's more or less a case by case basis

dnolen22:12:22

we could start noting them, though I might argue it will get ignored anyway

richiardiandrea23:12:30

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 @ here. It is maybe because I admittedly got burned.

dnolen22:12:35

a better way is put your library into the OSS testing matrix

mfikes22:12:37

On thing I've actually found of value: Canary. It caught an inadvertent consequence of a change that broke Specter.

dnolen22:12:50

so you can find out about this stuff before the rude awakening

mfikes22:12:56

There is this entires class of "Hyrum" changes that could break things, that are great when Canary catches them.

mfikes22:12:28

The two examples in my mind: • Specter (the vec thing https://github.com/nathanmarz/specter/commit/e7abb2b5384b0b64d871fb347be7c34a15473eb2) • Secretary (the merge-with alignment with Clojure)

dnolen22:12:40

@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

borkdude22:12:46

@dnolen I get this error with :optimize-constants true, not when set to false

dnolen22:12:52

@borkdude and that doesn't happen outside of self-host?

borkdude22:12:36

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.

dnolen22:12:02

what I mean is, if you remove cljs.js, it works?

borkdude22:12:08

yes, then it works

borkdude22:12:19

I’ll try once more to confirm

dnolen22:12:27

ok, make a minor self-host ticket, please point out the cause :optimize-constants true

borkdude22:12:11

FWIW, I was trying out this setting because it was documented here: https://clojurescript.org/guides/self-hosting