shadow-cljs

2025-05-21T07:08:05.609769Z

I'm having a strange issue with file permissions or so for a shadow-cljs build I'm doing of this project: https://gitlab.com/hyperfiddle/electric3-starter-app The cljs-runtime JS files get built just fine, but the main.js bundle seems to be corrupted. It can not be opened by the web server, and I can also not cat it. It does have a size on the disk.

2025-05-21T07:08:38.529889Z

https://clojurians.slack.com/archives/C7Q9GSHFV/p1747778392576229 I've described here more detail.

2025-05-21T07:09:22.440209Z

I think* this is the command that builds it: https://gitlab.com/hyperfiddle/electric3-starter-app/-/blob/main/src-dev/dev.cljc?ref_type=heads#L24

thheller 2025-05-21T07:10:28.079449Z

shadow-cljs writes all files in pretty much the exact same way, so dunno why any particular file may fail on its end

thheller 2025-05-21T07:10:46.128649Z

could be the OS preventing the write because it detects something it thinks its malware or so

2025-05-21T07:11:00.415629Z

hmm, perhaps yes?

thheller 2025-05-21T07:11:11.570419Z

or it just gets too large? how large is the cljs-runtime folder?

thheller 2025-05-21T07:11:42.492909Z

but that makes no sense .. at most a couple mb should be fine

thheller 2025-05-21T07:11:52.770529Z

maybe disk is just full? 😛

2025-05-21T07:12:31.892089Z

15M resources/public/electric_starter_app/js/cljs-runtime

thheller 2025-05-21T07:12:41.439799Z

yeah thats nothing

2025-05-21T07:13:15.978689Z

300GB free

thheller 2025-05-21T07:15:44.569829Z

macos has all sorts of security nonsense. maybe you just clicked not allow somewhere 😛

2025-05-21T07:16:06.164759Z

hmm okay, I'll try to research in that direction.

2025-05-21T07:16:18.228489Z

odd that only main.js has this issue and the cljs-runtime files open just fine

thheller 2025-05-21T07:17:02.288909Z

I'm not touching this electric setup, too much going on I don't understand

2025-05-21T07:18:12.188239Z

Yeah it's a bit exotic, anyways thanks as always @thheller 🙏

thheller 2025-05-21T07:19:27.828789Z

config wise it looks fine except stuff like :build-hooks [(hyperfiddle.electric.shadow-cljs.hooks3/reload-clj)] where as always I don't understand why this is a hook 😛

thheller 2025-05-21T07:20:31.586029Z

but dunno why that would interfere with writing the module file

2025-05-21T07:23:12.821459Z

Hmm yes, well it could indeed be some kind of macos protection, but the commands my finest LLM's spit out wrt checking these assumptions all come back negative so I don't know!

thheller 2025-05-21T07:24:05.724459Z

just try it in a different folder I guess?

thheller 2025-05-21T07:24:36.818269Z

avoid any of the default macos dirs like Downloads Documents etc. they are all sort of special

2025-05-21T07:25:03.916969Z

I've also tried 3 different folders already 😅

thheller 2025-05-21T07:25:16.735749Z

but whereever you run it should probably just ask for permission, so dunno why it wouldn't

2025-05-21T07:35:54.679329Z

I gave claude sonnet a chance to come up with theories, interestingly... it found that grep can access the file:

2025-05-21T07:46:09.190769Z

Claude no longer helps me because it figures "works as intended" wrt licensing. Hahah.

2025-05-21T07:46:36.212659Z

Thanks for having a look anyway, I'll talk to the electric guys.