This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-11
Channels
- # announcements (4)
- # aws (6)
- # babashka (40)
- # beginners (318)
- # biff (4)
- # bootstrapped-cljs (9)
- # calva (19)
- # chlorine-clover (1)
- # cider (3)
- # clj-on-windows (25)
- # cljdoc (8)
- # cljfx (1)
- # cljs-dev (30)
- # cljss (2)
- # clojure (62)
- # clojure-chile (9)
- # clojure-europe (11)
- # clojure-finland (17)
- # clojure-italy (1)
- # clojure-kc (1)
- # clojure-nl (3)
- # clojure-spec (27)
- # clojure-uk (40)
- # clojuremn (1)
- # clojurescript (51)
- # conjure (6)
- # cursive (8)
- # data-science (9)
- # datahike (4)
- # datascript (1)
- # datomic (31)
- # emacs (10)
- # emotion-cljs (1)
- # events (1)
- # figwheel-main (16)
- # find-my-lib (1)
- # fulcro (30)
- # graalvm (3)
- # graphql (12)
- # helix (16)
- # honeysql (5)
- # jobs (1)
- # jobs-discuss (10)
- # juxt (3)
- # kaocha (26)
- # lambdaisland (3)
- # leiningen (15)
- # malli (7)
- # off-topic (100)
- # pathom (8)
- # pedestal (15)
- # protojure (24)
- # re-frame (2)
- # reagent (7)
- # reitit (22)
- # remote-jobs (1)
- # shadow-cljs (140)
- # spacemacs (17)
- # spire (2)
- # tools-deps (23)
- # uix (11)
- # vim (5)
- # xtdb (3)
- # yada (3)
TIL https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/queueMicrotask
Morning. I’m building a reframe/reagent/react UI with https://github.com/stripe/react-stripe-js and https://github.com/stripe/stripe-js for payment. I’m using shadowcljs with npm packages. I got an issue where the optimizations :advanced of clojurescript is breaking the code. In fact the property createPaymentMethod of stripe object is undefined when running with the optimizations. My code is similar to this example https://github.com/stripe/react-stripe-js/blob/master/examples/hooks/0-Card-Minimal.js#L31 Perhaps the issue comes from stripe-js because it’s only a wrapper to download js module and initialise a stripe object https://js.stripe.com/v3 Someone has an idea?
@khaled.basbous turn on externs inference. it'll likely tell you were the problem is and you just add a ^js
typehint https://shadow-cljs.github.io/docs/UsersGuide.html#externs
I don't want to pollute the chat with my err logs, but I am getting java.xml.Bind not found errors on compile of newly cloned cljs projects... I tried adding
:jvm-opts ["--add-modules" "java.xml.bind"]
but the error then is
Compiling ClojureScript... Error occurred during initialization of boot layer java.lang.module.FindException: Module java.xml.bind not found
Subprocess failed
Any pointers appreciated ^.^
that used to be included in the jdk but t hey pulled it out in newer jdks
you can explicitly include javax.xml.bind/jaxb-api instead as a dependency
I actually just updated the version numbers in the project file and it works now
but thank you I found that line as well
I almost never update version numbers of dependencies ... do you recommend running lein-ancient when getting a new clone offa github?
Hmmm. it's missing from the JDK... thanks
Hello, what do you use to / how you measure clojurescript test coverage?
@martin.hablak how do you mean? to make sure all your functions have tests?
yes, to see what parts of code are covered by tests @U3ES97LAC
I see there is tool for clojure, but I can not find anything for clojurescript
Hmm, wish I had a lead for you there..
Hello guys. I'm pretty sure I am missing something, but I can't get :source-map
to work properly. In https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/closure.clj#L1408, emit-optimized-source-map
function is spitting source map to the file, while passing the same file to source map https://github.com/clojure/clojurescript/blob/master/src/main/cljs/cljs/source_map.cljs#L198. As a result, source map is pointing to itself and not working. Can't imagine this bug wasn't spotted yet, must be I am missing something. Any help would be much appreciated.
@ai212983 need more information, source-maps under advanced should work but it's not going to be that accurate
source maps are best during development. Can you provide more information about what you are trying to do?
@dnolen I am trying to make a production build and provide it with source map for sane error logs
right so like I said you should not expect to find this all that useful, it works and can provide some hints while debugging
I am confused. Right now generated source map is pointing to itself. Is it expected behaviour?
make something minimal that demonstrates the issue please, no tooling except for ClojureScript and tools deps
Thank you @ai212983 for pinpointing the origin of the issue. That could explain why after uploading my sourcemap to sentry I still can't see cljs code there.
@UC0JV84JF I've ended up with adding sed call into my makefile. But I'd rather liked to see it fixed, of course 🙂
imo code is talking for itself. spitting source map and passing same file as a parameter
https://github.com/tc39/proposal-record-tuple JS proposal for immutable records (key/value) and tuples (random access)
the 😭 part is that the current proposal disallows mutable objects inside of records or tuples
at a first glance I like that suggestion
I can imagine we'd end up with people using "index maps" used to join immutable tokens to mutable things that should be associated.
here’s the long issue thread about it: https://github.com/tc39/proposal-record-tuple/issues/31
yeah, the index maps would be an added complexity as collatoral damage basically
but it's a common pattern
yeah I see how much of a pain in the ass that would be the idea that functions and dates aren't already immutable is another can of worms entirely of course