This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-05
Channels
- # announcements (23)
- # babashka (23)
- # beginners (48)
- # calva (41)
- # clj-kondo (41)
- # cljs-dev (75)
- # cljsrn (5)
- # clojure (85)
- # clojure-europe (46)
- # clojure-nl (2)
- # clojure-spec (70)
- # clojure-uk (4)
- # clojurescript (52)
- # core-async (2)
- # cursive (16)
- # datahike (2)
- # datomic (4)
- # emacs (15)
- # figwheel-main (2)
- # fulcro (5)
- # gratitude (5)
- # helix (14)
- # introduce-yourself (2)
- # jackdaw (13)
- # keyboards (2)
- # lsp (8)
- # luminus (5)
- # malli (3)
- # meander (12)
- # nextjournal (52)
- # off-topic (19)
- # other-languages (1)
- # overtone (3)
- # pathom (4)
- # podcasts-discuss (1)
- # re-frame (6)
- # reitit (1)
- # releases (2)
- # ring (3)
- # sci (22)
- # shadow-cljs (3)
- # specter (1)
- # testing (3)
- # tools-deps (100)
- # uncomplicate (2)
Hello. In my Google Cloud Functions project the deployment broke. shadowcljs compile works, but deployment crashes with:
Error: Error occurred while parsing your function triggers.
TypeError: Cannot read property 'get' of undefined
And this is the generated code where it points to:
java.time.Period=java.time.goog$module$goog$object.get(shadow.js.shim.module$$js_joda$core,"Period");
I always had js_joda in my project and the version did not change. Any suggestions how to debug this? Thanky you very much!@witek https://clojurescript.org/news/2021-11-04-release looks like you're running into this since shadow upgraded CLJS as well
I believe clj-kondo can audit for these cases now? The other things is :global-goog-object&array
compiler flag - you can set this to true
to get the old behavior
https://github.com/juxt/tick/blob/4dbe14a1ea6ea0b31292dbafcd9be620265eab59/src/tick/core.cljc#L1279
Thanks @dnolen - I've pushed a fix to master for that.
testing with 1.10.891 I am seeing foreign-lib code is having properties renamed under advanced compilation and so stops working. This is not tick code using foreign code, but actually the foreign code itself. For example in this code from a js lib, the zones
property reference of packedJson
is renamed. Is there any way to prevent this?
MomentZoneRulesProvider.loadTzdbData = function loadTzdbData(packedJson) {
TZDB_DATA = packedJson;
TZDB_VERSION = packedJson.version;
for (var _iterator = packedJson.zones, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
@henryw374 hrm I would say this is a bit odd - no externs inference test failed (which doesn't prove something regressed but I'm skeptical at the moment)
@henryw374 we dump the inferred externs to a file in the target
- if you're using shadow it might happen in a different way
Ok I'll investigate further. Not using shadow here. I'm surprised foreign lib code is undergoing renaming though. I mean I wouldn't expect to supply any externs for that
if the foreign code itself is getting renamed we don't have that much to do w/ that - Closure doesn't process that stuff
ok - not a cljs problem I think. it turns out that the testing lib, olical/cljs-test-runner, when combined with this version of cljs, does some breaking munging on foreign code.
@raymcdermott very few ns / var facilities exist as they are not applicable
(defn add-metadata
[ns-name var-name]
(let [ns-thing (the-ns (symbol ns-name))]
(binding [*ns* ns-thing]
(meta (resolve (symbol var-name))))))
@raymcdermott ok, but you shouldn't do that in ClojureSript
but I doubt this applies to what you are doing - and that is lazy loading of code splits
@raymcdermott I think you need to explain a bit what you are doing?
@raymcdermott we haven't done a good job keeping this up-to-date but I just updated some things now - https://raw.githubusercontent.com/clojure/clojurescript/master/devnotes/corelib.org
what I'm trying to do ... inspect the code that somebody is typing into an editor or has pasted in and recognize stuff like meta data. There are heavyweight analysis tools for this but I'm trying to use spec and the core libs to do it all dynamically even if they provide less info.
asking also here https://clojurians.slack.com/archives/C053AK3F9/p1636144690270900
The culprit seems to be the no matching architecture in universal wrapper
error.
And it also seems that it's caused by using that JDK with that OS - nothing to do with CLJ[S]. I would try a different JDK version, or an x64 version if you're using an x86 one.
I’m using M1 processor
and I’ve tried jdk-17, and jdk-18
I had the same issue with M1, I downloaded the jdk from Zulu: https://www.azul.com/downloads/?package=jdk. And then it worked just fine
hmm, interesting, this did not help, I’ve installed it for ARM processors and however, still the same problem, I’ve set the path to the installed one.
ok, got it working! needed to bump the
[com.bhauman/figwheel-main] to 0.2.12
however, the hot reload does not work
however, the dev.cljs.edn
contains the
`
^{:watch-dirs [“test” “src”]
:css-dirs [“resources/public/css”]
:auto-testing true}
`