shadow-cljs

https://github.com/thheller/shadow-cljs | https://github.com/sponsors/thheller | https://www.patreon.com/thheller
2021-03-24T09:44:38.171900Z

I'm trying to use the material-ui/core@next which also uses @emotion/styled and @emotion/react and running into some issues with the :require/:refer:

core.js:1662 TypeError: module.keyframes is not a function
    at Object.shadow$provide.module$node_modules$$material_ui$core$node$ButtonBase$TouchRipple (TouchRipple.js:58)
    at shadow.js.jsRequire (js.js:66)
    at Object.shadow$provide.module$node_modules$$material_ui$core$node$ButtonBase$ButtonBase (ButtonBase.js:37)
    at shadow.js.jsRequire (js.js:66)
    at Object.shadow$provide.module$node_modules$$material_ui$core$node$ButtonBase$index (index.js:34)
    at shadow.js.jsRequire (js.js:66)
    at Object.shadow$provide.module$node_modules$$material_ui$core$node$AccordionSummary$AccordionSummary (AccordionSummary.js:31)
    at shadow.js.jsRequire (js.js:66)
    at Object.shadow$provide.module$node_modules$$material_ui$core$node$AccordionSummary$index (index.js:27)
    at shadow.js.jsRequire (js.js:66)
I'm using shadow-cljs 2.11.20 Which seems to be the :refer of https://github.com/mui-org/material-ui/blob/next/packages/material-ui/src/index.js#L20

thheller 2021-03-24T09:55:01.172900Z

in general when using @next packages you are on your own. they are unreleased preview alpha packages that very likely contain some breaking changes that might not match "current" documentation or so

thheller 2021-03-24T09:55:12.173200Z

it is also often much more likely to run into version conflicts

thheller 2021-03-24T09:55:42.173800Z

don't know why you linked the above but this is the call that seems to fail https://github.com/mui-org/material-ui/blob/next/packages/material-ui/src/ButtonBase/TouchRipple.js#L14

thheller 2021-03-24T09:56:02.174300Z

so maybe you don't ahve the correct version of this package @material-ui/styled-engine

2021-03-24T10:15:46.175500Z

Alright, that makes sense. Thanks for having a look as always, seeing if I can find that magical npm packages combo.. 🙂

2021-03-24T15:33:30.176800Z

I wonder what makes running shadow-cljs significantly faster when :deps true is not enabled. Isn’t shadowcljs itself a jvm library that ultimately leverages java regardless :deps is enabled or not?

thheller 2021-03-24T15:46:08.177100Z

@i running or starting? running should not be much of a difference

thheller 2021-03-24T15:46:30.177700Z

startup speed is faster because shadow-cljs.edn uses the aot artifact by default

thheller 2021-03-24T15:46:52.178300Z

you can switch the thheller/shadow-cljs dependecy to thheller/shadow-cljs$aot in deps.edn I think

2021-03-24T16:16:12.178700Z

so in theory, if I switch to the $aot version, there should not be a different

2021-03-24T16:16:16.178900Z

right?

thheller 2021-03-24T16:27:15.179100Z

depends on what you are doing. startup speed should be similar then yes

2021-03-24T23:02:33.180600Z

there's a way to invoke lein's with-profile with shadow-cljs, like when I use aliases with -A using deps.edn?