Fork me on GitHub
#shadow-cljs
<
2018-11-03
>
souenzzo00:11:46

I'm using shadow in "npm" mode. I'm trying to use devcards for both reagent and "raw" react components

thheller08:11:05

@souenzzo it is intended that you use all your source-paths all the time. a build only includes whatever is required. https://code.thheller.com/blog/shadow-cljs/2018/02/08/problem-solved-source-paths.html

thheller08:11:40

namespaces already provide enough separation. no need to do it at the source-path level

mhuebert19:11:12

hmm, I am working on bringing maria.cloud up to the latest shadow-cljs version (it was on 2.2.x). I found that something changed in 2.3.9 which causes ReferenceError: goog is not defined errors when loading cljs.core macros (`/js/compiled/bootstrap/js/e9a22ddf.cljs.core$macros.js`), the stacktrace points to the first line, goog.provide('cljs.core$macros');. Not a lot changed between 2.3.8 and 2.3.9, https://github.com/thheller/shadow-cljs/compare/2.3.8...2.3.9

mhuebert20:11:21

hmm, it doesn’t look like the code in the 2.3.8 jar matches the code with the 2.3.8 tag on github

mhuebert20:11:59

so i think at least the changes from 2.3.7 (on github) also are included in the cause

thheller20:11:58

@mhuebert the :output-wrapper default changed so that may be causing the issues

thheller20:11:09

try setting :compiler-options {:output-wrapper false}

mhuebert20:11:31

I did try that — unfortunately didn’t help

thheller20:11:18

and you are still using :simple for the host build?

thheller20:11:54

did you set the output-wrapper for the host build?

thheller20:11:04

it will have no effect on the bootstrap build

thheller20:11:38

goog is not defined is probably cause by the output-wrapper

thheller20:11:59

since that prevents creating global variables which the bootstrap stuff relies on

mhuebert20:11:56

k let me try that again

mhuebert20:11:21

so does the output-wrapper stuff mean that there wouldn’t ever be name collisions from advanced builds with other random global variables?

thheller20:11:45

well not "ever" but they are certainly reduced by a bunch

thheller20:11:18

its basically just a function wrapped arround the code so it has its own scope instead of global

mhuebert20:11:26

in my last project i had these super weird bugs from advanced builds accidentally “discovering” other short global names from old js libraries that i was also using. i ended up generating a list of externs from all the objects defined on “window”

thheller20:11:57

yeah it should prevent that kind of issues

mhuebert20:11:16

ok, so this is good news. I clearly did not put :output-wrapper stuff in the right place before. can successfully compile maria with latest version of shadow

👍 4