Fork me on GitHub
#clojurescript
<
2020-07-25
>
djblue07:07:23

Anyone have any ideas why this would happen?

clj -Sdeps '{:deps {com.cognitect/transit-cljs {:mvn/version "0.8.264"}
                    org.clojure/clojurescript {:mvn/version "1.10.764"}}}' \
    -m cljs.main -re node
ClojureScript 1.10.764
cljs.user=> (require 'cognitect.transit)
Execution error (TypeError) at (<cljs repl>:1).
util.randomUUID is not a function

p-himik08:07:36

That doesn't happen to me. When it happens, can you try running (println (.-stack *e))?

p-himik08:07:43

Or I guess (js/console.log *e) should suffice as well.

djblue08:07:43

*e is undefined 馃槵

djblue08:07:27

(try (require 'cognitect.transit) (catch :default e (js/console.log e)))
returned
goog.require could not find: cognitect.transit
Error: goog.require could not find: cognitect.transit
    at .load_ (/private/var/folders/3y/kns62z4s04g2yxsd6wdnzc1rgt_q4r/T/out22164861411613001621124901943731467/goog/base.js:2906:13)
    at Object.require (/private/var/folders/3y/kns62z4s04g2yxsd6wdnzc1rgt_q4r/T/out22164861411613001621124901943731467/goog/base.js:905:27)
    at Object.require (repl:31:16)
    at ret__6698__auto__ (repl:1:111)
    at repl:1:89
    at repl:1:52
    at repl:1:1
    at ContextifyScript.runInThisContext (vm.js:116:20)
    at Object.runInThisContext (vm.js:306:38)
    at Domain.<anonymous> ([stdin]:76:38)

p-himik08:07:57

I have no idea what's going on in your environment.

djblue08:07:31

Yeah, me neither. Thanks for the suggestion.

noisesmith19:07:59

add :reload-all to the require to see the original error - this error is secondary from the first

djblue22:07:23

Looks like I get the same error. I think it's specifically related to node on my system as it works just fine in the browser repl.

djblue22:07:58

Not sure why, but switching to an older version of cljs (1.10.738) and then back to 1.10.764 seems to have fixed it 馃し

souenzzo23:07:03

maybe some ~/.cljs cache issue?

Karol W贸jcik10:07:50

Is it possible to know from the code which compilation level is set?

thheller12:07:45

@karol.wojcik yes, its pretty obvious when you look at the file size and structure of the code

thheller12:07:12

ah wait. you mean during compilation? thought from the output 馃槢

Karol W贸jcik12:07:01

Ah sory I was not precise enough. I meant that I would like to know which compiler level is set from the source code. Like: cljs.core/some-magic-constant 馃槃 which would indicate one of :none, :whitespace, :simple, :advanced

thheller12:07:15

typically you'd use :closure-defines if you want to control how the code behaves

馃憤 3
mfikes20:07:24

A fix for the range issues discussed yesterday are now on master. (count (range 0 (+ 1 (/ 9)) (/ 9))) yields 10 and (nth (range 0 1 0.1) 6) yields 0.6

馃挴 15