This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-15
Channels
- # announcements (2)
- # aws (52)
- # beginners (326)
- # cider (24)
- # clara (7)
- # clj-kondo (14)
- # cljs-dev (175)
- # clojure (183)
- # clojure-ecuador (2)
- # clojure-europe (4)
- # clojure-italy (11)
- # clojure-nl (1)
- # clojure-norway (1)
- # clojure-spec (5)
- # clojure-sweden (5)
- # clojure-uk (103)
- # clojurescript (49)
- # cursive (29)
- # data-science (9)
- # datascript (17)
- # datomic (23)
- # emacs (6)
- # events (4)
- # fulcro (19)
- # graalvm (8)
- # graphql (2)
- # hoplon (36)
- # jobs (1)
- # jobs-discuss (92)
- # juxt (3)
- # luminus (10)
- # off-topic (4)
- # pedestal (8)
- # planck (1)
- # re-frame (59)
- # reagent (1)
- # reitit (22)
- # rewrite-clj (8)
- # ring-swagger (3)
- # shadow-cljs (101)
- # spacemacs (15)
- # tools-deps (36)
- # vim (68)
Anyone know what could be causing Exception in thread "main" java.lang.RuntimeException: Unable to resolve symbol: qualified-keyword? in this context, compiling:(shadow/jvm_log.clj:74:10)
when running shadow-cljs watch app
? Specifically in regards to this issue: https://github.com/reagent-project/reagent-template/issues/166
I actually cannot replicate this issue myself. Perhaps java or node needs to be updated?
Maybe somehow a version of Clojure < 1.9 is being run?
Shadow is using :lein true
and the project.clj
has clojure 1.10 specified so unless that's changed I'm not sure why shadow-cljs would start with a different version of clojure
@caleb.macdonaldblack what is the actual project.clj?
Yea clojure 1.8.
That will be it then
I must have been looking at the project.clj for the template instead of what was generated
Okay thanks for that. I should be able to fix this now
I added Google Analytics on http://shadow-cljs.org and here's the results of past days.
What may cause the "Stale client! You are not using the latest compilation output"? I keep getting this error, also after recompiling and refreshing
found the cause: i used another keyword than :main
in [:builds :browser :modules] in the shadow-cljs.edn
@chrisblom totally fine to use a different keyword. just need to adjust the html loading the main.js
accordingly
@thheller Any thoughts on https://github.com/Dept24c/viz-min ? I'd appreciate any insights you have. Thank you for your hard work on this project.
I just noticed that one of the reproduction instructions in README.md was incorrect... I have fixed that in the GitHub version.
Okay. Thanks for looking into it. I appreciate it.
I am having an issue with a npm module that I was formerly using as a cljsjs
package.
formerly when using cljsjs
we had
(:require [cljsjs.fuse])
(.search
(js/Fuse.
js-coll
fuse-options)
query)
which in the past worked but when we changed it too
(:require ["fuse" :as fuse])
(.search
(js/Fuse.
js-coll
fuse-options)
query)
I've been getting the following error
ReferenceError: Fuse is not defined
at eval (eval at <anonymous> (), <anonymous>:3:1)
Any ideas of the issue?yes js/Fuse
is accessing a global which doesn't exist. so just use the name you created via :as fuse
instead.
and you may need to change :as
to :default
to use it, depends on how the module is been exported
but for this case specific, if you want, I have a Fuzzy wrapper version that works both on Shadow and Figwheel: https://github.com/wilkerlucio/fuzzy-cljs
Nice, @U066U8JQJ I'll take a look at that
I remember I had to copy and to some small changes to make that work, I think that's reason I did that
I've been getting the error
TypeError: Cannot call a class as a function
at e$jscomp$1 ()
When trying to create an objectare you using new?
(can be (new Fuse)
or (Fuse.)
)
the errors makes it look you are calling the constructor as a fn
@U994BRXMF (fuse. ...)
not (fuse ...)
aha, no error message! @thheller
@thheller have you (or anyone else) noticed Chrome 74+ crashing in development mode? We're struggling with something right now, and it's probably not shadow-cljs
, but wanted to rule it out since it only happens in development.
Since Chrome 74 we're seeing an "Aw snap" error message in all tabs pointed at our development server. Chome stack trace dumps seem to indicate something trying to access an address in memory it doesn't have access to.
I doubt it's actually shadow-cljs
, but since it's only in our dev environment and doesn not occur for QA or production builds I wanted to see if you've ever seen crashing like this. If not, don't worry about it, as it's most likely not our problem. 👍
not a clue what could be causing this. did you maybe start using a new npm dependency or so recently that does weird stuff?
I think I had an infinite loop once that ended up crashing the tab but that was clearly my fault
@jeromedane is this Chrome 74+ crash still happening to you? it’s happening to multiple people here and we’re not quite sure what’s causing it.
Yes @U3GKNM1CK it's still happening to us, and we have no idea what's causing it to the point it's driving us nuts. For what it's worth, we have seen it happen once in a relatively clean project started with lein new shadow-cljs your-project +reagent
while prototyping with material-ui
. It seems to happen whenever there's a very specific unknown error rendering components.
The only thing I can think of is that we have a pretty large application with a good amount of namespaces. Right before chrome crashes, I usually get a message ultimately stating that one of my NPM modules is now nil. I’m wondering if there is any crazy garbage collection happening in Chrome 74+ that is cleaning up things loaded in dev via goog.require
if a lot of memory is being used by the tab and crashing the browser if it tries to reference the required module. Some evidence to support this is that in the Chrome logs, it says
when the crash happens, and it seems like the crash happens after a GC happens, since when I monitor the JS memory usage, it goes up, then goes down, then crashes
We've seen a "memory address access not authorized" error [or something like that] during these crashes when hooked into the chrome process debugger if that helps any.
interesting - i’ll keep looking into it and update with anything i find. it’s interesting that you got it to happen with material-ui, i’ll see if i can create a simple repro as well that might crash more consistently
@jeromedane I’m wondering if the Chrome 74 crashes are a byproduct of the new bytecode flushing feature in the V8 engine (https://v8.dev/blog/v8-release-74#bytecode-flushing) - can you please try shutting down Chrome and re-launching it from the terminal using /Applications/Google\
and let me know if you still run into this issue?
^^ I'll give it a shot and socialize the flag here so others do too. Will report results early next week. 👍
@thheller I am using macOS - I don’t think it’s shadow crashing chrome, if I were to bet it’s trying to reference code brought in through the Closure module loader after they are being flushed out by GC. The V8 docs on the subject say: > In order to reduce V8’s memory overhead, we have implemented support for flushing compiled bytecode from functions during garbage collection if they haven’t been executed recently. In order to enable this, we keep track of the age of a function’s bytecode, incrementing the age during garbage collections, and resetting it to zero when the function is executed. Any bytecode which crosses an aging threshold is eligible to be collected by the next garbage collection, and the function resets to lazily recompile its bytecode if it is ever executed again in the future.
can you try using https://clojureverse.org/t/improving-initial-load-time-for-browser-builds-during-development/2518 and see if it still crashes?
but if I understand correctly this also happens in production builds where shadow-cljs is no longer involved?
yeah originally i thought it was the (very large) source maps but happened with source maps turned off in devtools and also with devtools closed (i’ll re-confirm now)
did you try this with shadow-cljs compile
vs watch
? don't think that the websocket would be causing issues but who knows
yeah got it crashing with incognito with dev tools closed. the only thing that’s reliably fixing it for me is starting Chrome with the --js-flags="--no-flush_bytecode"
flag. I’ll try a compiled version with simple optimizations now.
it only happens if 1) i’m doing something super memory exhaustive or 2) leave the page open for a while and then take an action. yeah not sure if it happens on windows
and it usually happens after i make a change to the app which triggers code that requires a NPM module which it can no longer find. which aligns with the V8 change that removes functions during garbage collection after a set period of time.
:simple
is pretty much the same as :advacned
as far as the npm packages are concerned
can it have something to do with goog.require
’s cache of the node modules getting garbage collected somehow?
Anyone got an idea on how to get https://material-ui.com/layout/grid/ to work with reagent? Looked at the reagent react interopability page, but I can’t seem to get it to work. I was working on the first variant of Basic grid
We're about to start playing with this. See if https://github.com/reagent-project/reagent/blob/master/examples/material-ui/src/example/core.cljs helps, and I'll try to remember to circle back to this once I have a working example
@jeromedane is this Chrome 74+ crash still happening to you? it’s happening to multiple people here and we’re not quite sure what’s causing it.
The only thing I can think of is that we have a pretty large application with a good amount of namespaces. Right before chrome crashes, I usually get a message ultimately stating that one of my NPM modules is now nil. I’m wondering if there is any crazy garbage collection happening in Chrome 74+ that is cleaning up things loaded in dev via goog.require
if a lot of memory is being used by the tab and crashing the browser if it tries to reference the required module. Some evidence to support this is that in the Chrome logs, it says
when the crash happens, and it seems like the crash happens after a GC happens, since when I monitor the JS memory usage, it goes up, then goes down, then crashes
@jeromedane I’m wondering if the Chrome 74 crashes are a byproduct of the new bytecode flushing feature in the V8 engine (https://v8.dev/blog/v8-release-74#bytecode-flushing) - can you please try shutting down Chrome and re-launching it from the terminal using /Applications/Google\
and let me know if you still run into this issue?