This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
I tried the 76ac6bf41300f821f052d03537edf7e86694fc6d
sha, I believe those are coming from juxt/tick but I haven’t investigated deep:
[Sun Oct 17 2021 06:06:25.174] ERROR [TypeError: undefined is not an object (evaluating 'goog.debug.Logger.Level')]
[Sun Oct 17 2021 06:06:25.761] ERROR [TypeError: undefined is not an object (evaluating 'figwheel.repl.logging.set_log_level.call')]
[Sun Oct 17 2021 06:06:28.243] ERROR [TypeError: undefined is not an object (evaluating 'java.time.goog$module$goog$object.get')]
[Sun Oct 17 2021 06:06:28.341] ERROR [TypeError: undefined is not an object (evaluating 'cljc.java_time.local_date.goog$module$goog$object.get')]
[Sun Oct 17 2021 06:06:28.376] ERROR [TypeError: undefined is not an object (evaluating 'cljc.java_time.local_date_time.goog$module$goog$object.get')]
[Sun Oct 17 2021 06:06:28.411] ERROR [TypeError: undefined is not an object (evaluating 'cljc.java_time.local_time.goog$module$goog$object.get')]
[Sun Oct 17 2021 06:06:28.444] ERROR [TypeError: undefined is not an object (evaluating 'cljc.java_time.instant.goog$module$goog$object.get')]
[Sun Oct 17 2021 06:06:28.461] ERROR [TypeError: undefined is not an object (evaluating 'cljc.java_time.zone_id.goog$module$goog$object.get')]
[Sun Oct 17 2021 06:06:28.481] ERROR [TypeError: undefined is not an object (evaluating 'cljc.java_time.zone_offset.goog$module$goog$object.get')]
[Sun Oct 17 2021 06:06:28.516] ERROR [TypeError: undefined is not an object (evaluating 'cljc.java_time.offset_date_time.goog$module$goog$object.get')]
[Sun Oct 17 2021 06:06:28.533] ERROR [TypeError: undefined is not an object (evaluating 'cljc.java_time.offset_time.goog$module$goog$object.get')]
[Sun Oct 17 2021 06:06:28.576] ERROR [TypeError: undefined is not an object (evaluating 'cljc.java_time.month.goog$module$goog$object.get')]
[Sun Oct 17 2021 06:06:28.593] ERROR [TypeError: undefined is not an object (evaluating 'cljc.java_time.year.goog$module$goog$object.get')]
[Sun Oct 17 2021 06:06:28.621] ERROR [TypeError: undefined is not an object (evaluating 'cljc.java_time.day_of_week.goog$module$goog$object.get')]
[Sun Oct 17 2021 06:06:28.650] ERROR [TypeError: undefined is not an object (evaluating 'cljc.java_time.period.goog$module$goog$object.get')]
[Sun Oct 17 2021 06:06:28.674] ERROR [TypeError: undefined is not an object (evaluating 'cljc.java_time.duration.goog$module$goog$object.get')]
[Sun Oct 17 2021 06:06:28.712] ERROR [TypeError: undefined is not an object (evaluating 'java.time.temporal.goog$module$goog$object.get')]
[Sun Oct 17 2021 06:06:28.766] ERROR [TypeError: undefined is not an object (evaluating 'cljc.java_time.temporal.chrono_field.goog$module$goog$object.get')]
[Sun Oct 17 2021 06:06:28.785] ERROR [TypeError: undefined is not an object (evaluating 'cljc.java_time.temporal.chrono_unit.goog$module$goog$object.get')]
[Sun Oct 17 2021 06:06:28.800] ERROR [TypeError: undefined is not an object (evaluating 'java.time.format.goog$module$goog$object.get')]
[Sun Oct 17 2021 06:06:28.821] ERROR [TypeError: undefined is not an object (evaluating 'cljc.java_time.format.date_time_formatter.goog$module$goog$object.get')]
[Sun Oct 17 2021 06:06:28.870] ERROR [TypeError: undefined is not an object (evaluating 'java.time.MonthDay.prototype')]
@henryw374 Might have some pointers, please take a look if you’re available. Thank you!
cc
@U08E3BBST dirac.runtime.oops
@UCFG3SDFV helins.binf.protocol.impl
TL;DR:
clojuresciprt will not accept the use of goog.object/get
without (:require [goog.object])
Thanks @U050KSS8M - it was missing goog.object require. branch if you want to try it out: https://github.com/juxt/tick/tree/cljs-bump-2021-10
Thanks! Weird it isn't complaining during tests
I'm just curious, even with the latest Shadow version, I don't see any warnings anywhere. Where does it come from?
@UCFG3SDFV this is for the next release of CLJS This is not a new/breaking thing in cljs itself, but the closure library changed, and it will affect cljs. in short words: goog.object moved from the old way of define closure libraries to a new way, that is more strict.
it looks like those all use goog.object/get
directly without having a proper :require
for it. looks like that'll now break given that the local reference is missing
Yes there’s no workaround for that really - relying on it being loaded was probably always a bad idea
@dnolen one way to make this transition smoother is treating goog.module
with goog.module.declareLegacyNamespace()
the old way and not going with goog.module.get
. the non legacy modules are still quite rare but goog.object is pretty much used all over the place with the require often missing
We could special case goog.object
and even put that behind flag that you have to enable to force people to stop this
an alternative would be exposing these things in some shared place, so that its only done once and not per ns
but I guess that gets kinda complicated tracking where and if it already registered/required
Yeah I don’t want to complicate what was already written nor parse for legacy namespaces
Special casing and then forcing users to enable the old behavior is way to put some fire into the ecosystem
Currently clj-kondo treats goog.*
stuff as magic, as in, you don't need to require goog.object
to use goog.object/get
. If it helps, I could change this.
I think you should also have a flag for the old behavior and we should try to coordinate the releases
OK. If there's a CLJS JIRA issue I could link to, to explain why this changed in clj-kondo, that would be great.
Will make a ticket and the release notes can talk about this as well reference kondo which is quite popular
Basically the important thing is that no Google namespace is safe from becoming a module
hmm but thinking about it. how are macros supposed to do this? say you write a macro that needs to emit some goog.object/set
or whatever call
the CLJS variant of the macro ns can require goog.object
just fine but it'll still fail if the ns using the macro does not?
Macros writers just can’t depend on Google stuff being loaded that is just dead practice now
I guess macro writers can also include a .cljs
namespace which takes care of this loading?
@borkdude its not about loading, that is guaranteed anyways. its about creating the local reference in the namespace using goog.object, which when done via macro might not exist
but it doesn't have to be toast. we can just resolve goog.object
to cljs.module$goog$object
or which is then guaranteed to exist as long as something did a require (which the macro provider can ensure)