shadow-cljs

https://github.com/thheller/shadow-cljs | https://github.com/sponsors/thheller | https://www.patreon.com/thheller
thheller 2021-07-02T06:41:58.379200Z

@hadilsabbagh18 can you provide more details? I cannot tell what you actual problem is

thheller 2021-07-02T06:42:46.379400Z

seriously try an upgrade first. this is javascript after all. 2 years is like ancient history. do not bother trying to rescue that old version.

thheller 2021-07-02T06:48:10.379700Z

> I don’t know how to build the classpath from my deps.edn file under the dev alias

thheller 2021-07-02T06:48:15.379900Z

clj -A:dev?

Alex J Henderson 2021-07-02T10:53:59.383100Z

I'm trying to keep a npx shadow-cljs server process running so I can more quickly start and stop watching builds as I switch between git branches in my project. But when I switch branches npx shadow-cljs watch app no longer detects the running server process. Is there a file somewhere or something that I need to keep around which watch app looks for to detect the server?

Mikko Harju 2021-07-02T11:58:40.384300Z

Just discovered the possibility to have Javascript files alongside CLJS – a very nifty thing to say the least. I'm now intrigued is it possible to trigger "re-compilation" (re-evaluation?) of JS files if I should change the definitions within the JS files, or do I always have to restart node-repl?

Björn Ebbinghaus 2021-07-02T15:06:12.392800Z

I have a problem with compiling the new material-ui v5 beta, and I have no idea how to tackle this. shadow-cljs fails to load a file. Reason:

TypeError: _system.keyframes is not a function
 at Object.shadow$provide.module$node_modules$$material_ui$core$node$ButtonBase$TouchRipple (TouchRipple.js:64)
The related JS Code looks like this:
// file -- @material-ui/core/node/ButtonBase/TouchRipple.js
var _system = require("@material-ui/system");
const pulsateKeyframe = (0, _system.keyframes)`... stuff ...`

// file -- @material-ui/styled-engine/index.d.ts
export { ThemeContext, keyframes, css } from '@emotion/react';

// file -- @material-ui/system/index.js
Object.defineProperty(exports, "keyframes", {
  enumerable: true,
  get: function () {
    return _styledEngine.keyframes;
  }
});
I deleted old js output and the .shadow-cljs folder beforehand. (That usually fixes stuff like this. 🙂) Disclaimer: I have no idea of JS or TS modules or shadow-cljs works. Sorry, if I am at the wrong place to ask.

Björn Ebbinghaus 2021-07-03T15:37:05.410200Z

@lucian303 Seems like it is. @thheller Do you have a tip on how to debug this?

lucian303 2021-07-03T18:08:26.410400Z

i'm not sure what is happening exactly. i've tried various combinations of dependencies, cljs, shadow, closure compiler, etc. but haven't been able to get any results. i will try a few other versions to see if it makes a difference. it could be an mui issue as originally i was just trying to add in a dependency for the x-grid component that led to similar errors, but then saw that deps have to be updated

Björn Ebbinghaus 2021-07-03T20:08:13.411700Z

@bbss The Slack Archive hints to you having this problem back in March. Were you able to find a solution?

2021-07-04T02:38:12.416100Z

Oof, had to look it up to refresh my memory but I'm afraid I didn't get very far in finding the right package versions.. I'm still on v4.

lucian303 2021-07-04T22:22:36.437300Z

fwiw, i got arttuka/reagent-material-ui "5.0.0-alpha.29-0" working with cljs 1.10.773 and shadow 2.11.24. Beyond that shadow version, it stopped working (not sure why). would be nice to be able to upgrade and add other packages, but i too am running out of ideas of how to debug such issues

thheller 2021-07-05T05:05:09.437600Z

wouldp help if you setup a reproducible repo. I really don't have enough to go on here.

Björn Ebbinghaus 2021-07-02T15:07:38.392900Z

// file -- package.json
// Relevant dependencies:
"@emotion/react": "^11.4.0",
"@emotion/styled": "^11.3.0",
"@material-ui/core": "^5.0.0-beta.0",

2021-07-02T16:23:26.394400Z

How would i create a release build from clojure, rather then the command line? I'm looking for the docs and don't see an example of this, though im guessing its possible from a namespace such as shadow.cljs.<something> Edit found it: https://shadow-cljs.github.io/docs/UsersGuide.html#clj-run

thheller 2021-07-02T19:43:01.402300Z

does switching the branches wipe the .shadow-cljs dir? the detection is based on a file in that dir? otherwise it should be detected fine?

thheller 2021-07-02T19:44:59.402700Z

this is caused by a dependency conflict

thheller 2021-07-02T19:45:32.402900Z

can't remember which one exactly but somewhere there is a dependency conflict on some lib