This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-17
Channels
- # 100-days-of-code (5)
- # announcements (13)
- # beginners (98)
- # boot (19)
- # cider (10)
- # cljdoc (32)
- # clojure (142)
- # clojure-dev (37)
- # clojure-italy (3)
- # clojure-nl (2)
- # clojure-spec (30)
- # clojure-uk (18)
- # clojurescript (28)
- # cursive (8)
- # datomic (25)
- # duct (18)
- # editors (5)
- # emacs (39)
- # events (4)
- # figwheel (7)
- # figwheel-main (5)
- # fulcro (38)
- # graphql (19)
- # jobs-discuss (1)
- # jobs-rus (7)
- # keechma (1)
- # lumo (47)
- # off-topic (28)
- # om-next (3)
- # parinfer (3)
- # re-frame (18)
- # reagent (37)
- # reitit (8)
- # shadow-cljs (101)
- # specter (7)
- # tools-deps (8)
- # vim (1)
I think maybe when I convert a clj -> cljs file? I think I did that shortly before this started happening…I noticed the real error was missing a :
on require
Also noticed sometimes the watch does not report the error, it prints "Error:" that's it
Since version .12
will try to repro
@tony.kay which version are you on? I removed the :e
from the :build-failure
message precisely because of those errors
btw can you please try (pr-str (ex-info "foo" {:bar 1}))
in your project? I don't understand why :e
would not print as #error ...
. It seems like something is messing with the default printing setup?
IIRC @wilkerlucio reported a similar issue a while back (bad exception printing) but I could never reproduce it
is this with just shadow-cljs running standalone or is there some server stuff as well?
yeah, I still have it, at the nubank project I always have to get errors on the console
in my case just shadow, no server things
I just got one, let me paste here too
env.cljs:167 failed to parse websocket message {:type :build-failure, :report "------ ERROR -------------------------------------------------------------------\n File: /Users/wilker.lucio/Development/nubank/shuffle/src-common/nubank/shuffle/modules/logistic/components.cljs:55:43\n--------------------------------------------------------------------------------\n 52 | (ui/text-field {::ui/target this ::ui/attr :address/postcode :classes [:$margin-right-12]})\n 53 | (ui/text-field-raw {:maxLength \"8\"\n 54 | :value postcode-lookup\n 55 | :onChange })\n-------------------------------------------------^------------------------------\nnubank/shuffle/modules/logistic/components.cljs [line 55, col 43] The map literal starting with :maxLength on line 53 column 30 contains 5 form(s). Map literals must contain an even number of forms.\n\n--------------------------------------------------------------------------------\n 56 | (ui/text-field {::ui/target this ::ui/attr :address/postcode :classes [:$margin-right-12]})\n 57 | (ui/button {:onClick #(let [postcode (-> this fp/props :address/postcode)]\n 58 | (if (= 8 (count postcode))\n 59 | (db.h/load this (fp/get-ident this) AddressForm {:params {:abrams.api/extra-attrs {:address.brazil/postcode postcode}}}))\n--------------------------------------------------------------------------------\n", :e clojure.lang.ExceptionInfo: failed to compile resource: [:shadow.build.classpath/resource "nubank/shuffle/modules/logistic/components.cljs"] {:ex-kind :reader-error, :source-excerpt {:start-idx 51, :before [" (ui/text-field {::ui/target this ::ui/attr :address/postcode :classes [:$margin-right-12]})" " (ui/text-field-raw {:maxLength \"8\"" " :value postcode-lookup"], :line " :onChange })", :after [" (ui/text-field {::ui/target this ::ui/attr :address/postcode :classes [:$margin-right-12]})" " (ui/button {:onClick #(let [postcode (-> this fp/props :address/postcode)]" " (if (= 8 (count postcode))" " (db.h/load this (fp/get-ident this) AddressForm {:params {:abrams.api/extra-attrs {:address.brazil/postcode postcode}}}))"]}, :file #object[java.io.File 0x396f9cf3 "/Users/wilker.lucio/Development/nubank/shuffle/src-common/nubank/shuffle/modules/logistic/components.cljs"], :resource-id [:shadow.build.classpath/resource "nubank/shuffle/modules/logistic/components.cljs"], :ex-type :reader-exception, :column 43, :line 55, :url #object[java.net.URL 0x37a875ae "file:/Users/wilker.lucio/Development/nubank/shuffle/src-common/nubank/shuffle/modules/logistic/components.cljs"], :source-id [:shadow.build.classpath/resource "nubank/shuffle/modules/logistic/components.cljs"], :tag :shadow.build.compiler/compile-cljs}, :build-id :workspaces} #error {:message "Invalid symbol: cloj … lang.ExceptionInfo:.", :data {:type :reader-exception, :ex-kind :reader-error}}
shadow$cljs$devtools$client$env$process_ws_msg @ env.cljs:167
(anonymous) @ browser.cljs:344
`this I think is the important bit, seems like what Tony described:
#error {:message
"Invalid symbol: cloj … lang.ExceptionInfo:."
Invalid symbol: clojure.lang.ExceptionInfo:.
, :data {:type :reader-exception, :ex-kind :reader-error}}
yeah, exactly
ok, checking it out
[1:0]~shadow.user=> (pr-str (ex-info "foo" {:bar 1}))
"#error {\n :cause \"foo\"\n :data {:bar 1}\n :via\n [{:type clojure.lang.ExceptionInfo\n :message \"foo\"\n :data {:bar 1}\n :at [clojure.core$ex_info invokeStatic \"core.clj\" 4739]}]\n :trace\n [[clojure.core$ex_info invokeStatic \"core.clj\" 4739]\n [clojure.core$ex_info invoke \"core.clj\" 4739]\n [shadow.user$eval33297 invokeStatic \"form-init8724609811994379936.clj\" 1]\n [shadow.user$eval33297 invoke \"form-init8724609811994379936.clj\" 1]\n [clojure.lang.Compiler eval \"Compiler.java\" 7062]\n [clojure.lang.Compiler eval \"Compiler.java\" 7025]\n [clojure.core$eval invokeStatic \"core.clj\" 3206]\n [clojure.core$eval invoke \"core.clj\" 3202]\n [shadow.cljs.devtools.server.socket_repl$repl$fn__17857 invoke \"socket_repl.clj\" 97]\n [clojure.main$repl$read_eval_print__8572$fn__8575 invoke \"main.clj\" 243]\n [clojure.main$repl$read_eval_print__8572 invoke \"main.clj\" 243]\n [clojure.main$repl$fn__8581 invoke \"main.clj\" 261]\n [clojure.main$repl invokeStatic \"main.clj\" 261]\n [clojure.main$repl doInvoke \"main.clj\" 177]\n [clojure.lang.RestFn invoke \"RestFn.java\" 805]\n [shadow.cljs.devtools.server.socket_repl$repl invokeStatic \"socket_repl.clj\" 64]\n [shadow.cljs.devtools.server.socket_repl$repl invoke \"socket_repl.clj\" 28]\n [shadow.cljs.devtools.server$from_cli$fn__19792 invoke \"server.clj\" 606]\n [shadow.cljs.devtools.server$from_cli invokeStatic \"server.clj\" 605]\n [shadow.cljs.devtools.server$from_cli invoke \"server.clj\" 517]\n [clojure.lang.AFn applyToHelper \"AFn.java\" 160]\n [clojure.lang.AFn applyTo \"AFn.java\" 144]\n [clojure.lang.Var applyTo \"Var.java\" 702]\n [clojure.core$apply invokeStatic \"core.clj\" 657]\n [clojure.core$apply invoke \"core.clj\" 652]\n [shadow.cljs.devtools.cli$lazy_invoke invokeStatic \"cli.clj\" 22]\n [shadow.cljs.devtools.cli$lazy_invoke doInvoke \"cli.clj\" 19]\n [clojure.lang.RestFn invoke \"RestFn.java\" 460]\n [shadow.cljs.devtools.cli$blocking_action invokeStatic \"cli.clj\" 148]\n [shadow.cljs.devtools.cli$blocking_action invoke \"cli.clj\" 135]\n [shadow.cljs.devtools.cli$main invokeStatic \"cli.clj\" 196]\n [shadow.cljs.devtools.cli$main doInvoke \"cli.clj\" 151]\n [clojure.lang.RestFn applyTo \"RestFn.java\" 137]\n [clojure.core$apply invokeStatic \"core.clj\" 661]\n [clojure.core$apply invoke \"core.clj\" 652]\n [shadow.cljs.devtools.cli$_main invokeStatic \"cli.clj\" 238]\n [shadow.cljs.devtools.cli$_main doInvoke \"cli.clj\" 236]\n [clojure.lang.RestFn invoke \"RestFn.java\" 421]\n [clojure.lang.Var invoke \"Var.java\" 385]\n [user$eval543 invokeStatic \"form-init8724609811994379936.clj\" 1]\n [user$eval543 invoke \"form-init8724609811994379936.clj\" 1]\n [clojure.lang.Compiler eval \"Compiler.java\" 7062]\n [clojure.lang.Compiler eval \"Compiler.java\" 7052]\n [clojure.lang.Compiler load \"Compiler.java\" 7514]\n [clojure.lang.Compiler loadFile \"Compiler.java\" 7452]\n [clojure.main$load_script invokeStatic \"main.clj\" 278]\n [clojure.main$init_opt invokeStatic \"main.clj\" 280]\n [clojure.main$init_opt invoke \"main.clj\" 280]\n [clojure.main$initialize invokeStatic \"main.clj\" 311]\n [clojure.main$null_opt invokeStatic \"main.clj\" 345]\n [clojure.main$null_opt invoke \"main.clj\" 342]\n [clojure.main$main invokeStatic \"main.clj\" 424]\n [clojure.main$main doInvoke \"main.clj\" 387]\n [clojure.lang.RestFn applyTo \"RestFn.java\" 137]\n [clojure.lang.Var applyTo \"Var.java\" 702]\n [clojure.main main \"main.java\" 37]]}"
do you use transit for the encoding? because I learned that you can have generic handlers to have "default handlers" to encode things that transit doesn't understand, that could fix some encoding issues
I was in the latest version already :thinking_face:
maybe that could change, transit encoding is also faster than pr-str
what can't be?
ah, sorry, again I forgot to update the lein -.-
let me do that
I could change it to transit but I've been trying to keep dependencies to a minimum given that the code is injected into the build
yeah, makes sense, but the gain can be noticable, when I was testing speed of things for the Fulcro Inspect encoding to send Fulcro data, transit sometimes gets up to 2~3x faster than pr-str on my tests
hey, I just got this:
[:workspaces] Build failure:
it fail and gets stuck
I had the same yesterday, both on the latest version
no, it gets stuck after that, no more printing
its not every time
but now I got the correct HUD on my compilation 😄
for the error
ok, HUD is working fine now in the latest
started working on HUD, stopped on console 😛
nice, so happy to see the HUD error back again, thank you! 😄
I have a shadow build that outputs to target: npm-module
which I import into react storybook (which has it's own server and index.html runner). I'm trying to get the browser repl working for this build, is there a javascript file I need to import into the foreign index.html?
@haywood its not gonna be very reliable you you need to load the shadow.cljs.devtools.client.browser
namespace
@thheller I'm having problems doing release builds with shadow 2.6.12
:
humm, could be
is there a easy place for me to find which are the current ones used by shadow?
ok, answering my own question https://github.com/thheller/shadow-cljs/blob/master/project.clj#L34-L40
if you list shadow-cljs as your first dependency you should always be getting the correct versions
I'm in a bizarre situation that I have to support both shadow-cljs and lein cljsbuild (the later just to run old tests on phatomjs that I'm unable to proper compile/run with shadow, not shadow fault, previous setup was not very nice)
just bumped both, but I still getting that error
trying to clean .shadow-cljs and trying again
I tried the deps :tree, the versions seem correct there
and I'm trying to do the shadow release
oh, when I bumped the cljs and closure I also had shadow downgraded and forgot to upgrade back trying again
When I make some changes to a function, do I have to save the file to make the changes effective? Eval the new function to repl doesn’t seem to do the job, so I’m wondering if this is expected or there’s something wrong with my setup
I was hoping for something like, when I change the return value in get-x
from 1
to 2
and eval get-x
into repl, the console will start to log 2
instead of 1
.
(defn get-x [] 1)
(defn loop []
(js/console.log (get-x)
(loop))
depends on how you do the loop? can't do it like that because that will forever block the main thread so nothng else ever happens
So it will work if I don’t block the thread?
(defn loop []
(js/console.log (get-x)
(js/setTimtout loop 0))
thats unlike live-reload where there is an entire lifecycle of stuff that also happens