This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-14
Channels
- # aleph (3)
- # announcements (16)
- # aws (6)
- # babashka (10)
- # beginners (28)
- # cider (1)
- # clj-kondo (14)
- # cljdoc (2)
- # cljs-dev (27)
- # cljsrn (7)
- # clojure (78)
- # clojure-europe (2)
- # clojurescript (14)
- # conjure (6)
- # core-async (2)
- # fulcro (5)
- # helix (7)
- # jobs (1)
- # lgbtq (1)
- # malli (12)
- # missionary (1)
- # nbb (10)
- # pathom (1)
- # portal (12)
- # protojure (1)
- # re-frame (41)
- # react (2)
- # reitit (1)
- # reveal (1)
- # shadow-cljs (72)
- # sql (11)
- # tools-deps (8)
- # vim (1)
- # xtdb (4)
@dnolen which problems did you discover in the closure-compiler upgrade? The biggest one as far as shadow-cljs is concerned is the rename of JSModule
(and variants) to JSChunk
, after renaming references the code seems to work. I changed JSModule and JSModuleGraph in shadow-cljs. The type of the injectedLibraries
field also changed but I don't think CLJS uses that
I get more issues in the closure-library upgrade, eg. goog.module.ModuleLoader
is now a module and no longer exporting the legacy namespace. thus needs to be used via var thing = goog.require("goog.module.ModuleManager")
, ie. using the return value of goog.require
which none of the CLJS code currently does
@thheller we need to switch to builder pattern for SourceFile
- JSChunk
is the other thing - re: modules, I suppose we already assign some require patterns and we could do that in this case - but I guess it's annoying because it's a conditional thing
Hrm but is this necessary for ClojureScript? I thought we already addressed this problem - we transpile modules now during dev to lower them
it works fine if the goog.module
has the goog.module.declareLegacyNamespace()
, some of the newer ones dont have that
well the next problem is that goog.require
only has a return value when inside goog.module
IIRC
But that’s not a problem right? You can only use the pattern if you’re loading a module that requires it
not sure. I have a closure .js file in shadow-cljs that I couldn't get to work using the old style. had to rewrite it to also be a goog.module
to import goog.module.ModuleLoader
I'd assume that CLJS has the same issue when trying to use those but this might have been because shadow-cljs doesn't use the default closure debug loader at all