Fork me on GitHub
#fulcro
<
2021-11-06
>
Jakub Holý (HolyJak)09:11:57

FYI I have updated my Fulcro Explained: When UI Components and Data Entities Diverge post by adding a https://blog.jakubholy.net/img/fulcro-divergent-ui-data/pathom-placeholders.webp and adding the section https://blog.jakubholy.net/2020/fulcro-divergent-ui-data/#_adapting_backend_data_to_the_ui_components_structure that you will hopefully find useful. Feedback welcome!

👀 2
Jakub Holý (HolyJak)11:11:02

The picture illustrating Pathom placeholders has been fixed

hadils13:11:56

Good morning. I upgraded clojurescript/shadow-cljs/fulcro/fulcro RAD to their latest versions but did not change my package.json. I am now getting these errors in the Chrom console:

main.js:1455 TypeError: Cannot read properties of undefined (reading 'get')
    at eval (time.cljs:4)
    at eval (<anonymous>)
    at Object.goog.globalEval (main.js:488)
    at Object.env.evalLoad (main.js:1563)
    at main.js:2923
reportError @ main.js:1455
env.evalLoad @ main.js:1565
(anonymous) @ main.js:2923
There are several more of these but it is related to cljc.java-time:
(:require ["@js-joda/core" :as js-joda]))

(def Period (goog.object/get js-joda "Period"))
(def Instant (goog.object/get js-joda "Instant"))
(def Duration (goog.object/get js-joda "Duration"))
(def LocalDate (goog.object/get js-joda "LocalDate"))
(def LocalTime (goog.object/get js-joda "LocalTime"))
(def ZonedDateTime (goog.object/get js-joda "ZonedDateTime"))
(def LocalDateTime (goog.object/get js-joda "LocalDateTime"))
(def MonthDay (goog.object/get js-joda "MonthDay"))
(def Year (goog.object/get js-joda "Year"))
(def YearMonth (goog.object/get js-joda "YearMonth"))
(def ZoneId (goog.object/get js-joda "ZoneId"))
(def DayOfWeek (goog.object/get js-joda "DayOfWeek"))
(def Month (goog.object/get js-joda "Month"))
(def Clock (goog.object/get js-joda "Clock"))
(def ZoneOffset (goog.object/get js-joda "ZoneOffset"))
(def OffsetDateTime (goog.object/get js-joda "OffsetDateTime"))
(def OffsetTime (goog.object/get js-joda "OffsetTime"))
I need help resolving this.

thheller13:11:28

@hadilsabbagh18 see https://clojurescript.org/news/2021-11-04-release and set :compiler-options {:global-goog-object&array true} in your build config

hadils13:11:20

@thheller Adding the compiler-options flag did not resolve the issue.

thheller13:11:27

oh I think the cache might not invalidate properly since it doesn't account for that flag. delete the .shadow-cljs/builds/<your-build-id> dir and restart the watch in case that is running

hadils13:11:21

@thheller That worked! Thank you very much!

thheller13:11:14

just published a new release so it properly invalidates the cache on its own