This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-06
Channels
- # announcements (2)
- # babashka (22)
- # beginners (93)
- # calva (12)
- # cider (65)
- # clj-kondo (15)
- # cljdoc (5)
- # cljs-dev (4)
- # cljsrn (4)
- # clojure (65)
- # clojure-europe (2)
- # clojure-italy (1)
- # clojure-nl (1)
- # clojure-norway (1)
- # clojure-spec (40)
- # clojure-uk (7)
- # clojurescript (12)
- # conjure (1)
- # cursive (2)
- # data-science (13)
- # datomic (1)
- # dirac (12)
- # emacs (3)
- # figwheel-main (19)
- # ghostwheel (5)
- # helix (6)
- # kaocha (1)
- # leiningen (6)
- # news-and-articles (2)
- # off-topic (17)
- # pathom (5)
- # re-frame (59)
- # reitit (17)
- # restql (1)
- # shadow-cljs (31)
- # spacemacs (5)
- # spire (3)
- # sql (35)
How can you achieve the same thing with node is script? That is compiling all dependencies into a single is file when you want to release the script?
I recommend post-processing the file with https://github.com/vercel/ncc
shadow-cljs can also do that on its own but its less reliable and requires more configuration
@thheller you responded when this was brought up recently in another channel: andare (self host compatible core.async: https://github.com/mfikes/andare), doesn't work with shadow due to this function https://github.com/thheller/shadow/blob/master/src/main/shadow/util.clj#L29, specifically the :require
on [cljs.core.async.impl.ioc-macros :as ioc]
which isn't in andare. Was wondering now if you'd consider removing it or gutting it of the internal async stuff. I've removed it locally and have had no problems running my regular shadow workflows, for what that's worth. Andare's implementation is probably not ideal but seems like the best way to accomplish getting core.async on self-hosted cljs for now. You might have a better sense if anyone is using that go!
macro though.
I can remove it ... created it a long time ago and there's even a ticket for it but doubtful anything will ever happen about it
not that important anyways. core.async was a bad fit for want I wanted it for anyways 😛
still feels kinda dangerous to just replace a fairly integral dependency like core.async but I guess andare probably just leaves the clojure.core.async stuff alone and modifies only cljs.core.async
@thheller just FYI: this is one minimal snippet I was able to produce on which GCC (`v20200504`) would fail:
function aa() {
var a = {}, b = null;
a.a = 1,
b.a = 2,
Object.defineProperties(a, b);
}
Latest master
of GCC produces the same error (just double-checked that)@andrewboltachev odd code. did you report it?
@thheller not yet actually. But this is my code. Actual one looks more like this: http://dpaste.com/1053C50#line-87
which comes from that "turf jsts" module (it's min version, which I've beautified)
the selected line confuses the GCC
if replaced with sth = Object.defineProperties(Bi, Vi);
it would pass
what it's doing is about that: this Bi
object just got an update with Object.defineProperties
by adding some Vi
properties to it. But the object isn't used anymore so it wants to optimize that extra work (calling Object.defineProperties
) away
defineProperties has no return value I think. it just modifies the first argument in place
yes sure
but having that Bi
(or a
in my case) won't be used anymore
won't it want to optimize it away?