Fork me on GitHub
#shadow-cljs
<
2022-12-07
>
juhoteperi16:12:12

I'm seeing a regression between 2.20.10 and 2.20.11 in build report output and used npm files. With 2.20.11+ I'm only seeing the JS files that are directly required from Cljs code.

thheller17:12:20

hmm weird, didn't knowingly change anything

juhoteperi08:12:13

Might be just the Closure update? I'm not sure how directly the report uses Closure information?

juhoteperi09:12:20

Strange, I'm seeing the same extract-report-data build-sources data for a JS file that isn't visible on 2.20.11 report for both versions.

juhoteperi09:12:47

The difference is in build-modules source-bytes data

thheller09:12:48

hmm yeah the problem seems to be in the generated source maps

thheller09:12:53

somehow a bunch of stuff is missing

thheller09:12:40

something here seems to be wrong now. the source maps generated here are all empty

thheller09:12:46

when they didn't use to be

thheller10:12:03

should be fixed in 2.20.14. very obvious mistake in hindsight 😛

Drew Verlee22:12:14

I get an error when i start my app i'm hoping someone can give me some insight into. The error doesn't seem to effect anything as far as i can tell though.

shadow.module.main.append.js:4 An error occurred when calling (centriq-web.main/init!)
eval	@	shadow.module.main.append.js:4
goog.globalEval	@	main.js:472
env.evalLoad	@	main.js:1534
(anonymous)	@	main.js:2253
and the ns in question looks like this:
(ns centriq-web.main
  (:require [centriq-web.admin :refer [admin-component]]
            [reagent.dom :as dom]))

(defn init! []
  (dom/render [admin-component] (.getElementById js/document "app")))
And as you might imagine the shadow cljs uses that init! function to as the init-fn
:builds
 {:app {:target :browser
        :compiler-options {:externs ["datascript/externs.js"]}
        :modules {:main {:init-fn centriq-web.main/init!}}}}
The if i follow the error to the shadow.module.main.append file i don't learn much. MY two theories are that 1. this error comes from my not properly configuring shadow. e.g i forgot to add some build configuration or maybe a hook or annoate the init! function with some meta data. 2. this error is a catch all and the real issue is surfaced else where in the console log.

Drew Verlee22:12:58

it was the later.