shadow-cljs

https://github.com/thheller/shadow-cljs | https://github.com/sponsors/thheller | https://www.patreon.com/thheller
2021-04-23T03:20:36.445100Z

In https://github.com/thheller/reagent-react-native how do the two package.json and react-native/package.json relate? Which dependencies go where?

thheller 2021-04-23T06:56:41.447400Z

@mbertheau in that repo I specifically wanted to have all code generated and used by the react-native tooling in its own directory. so everything react-native related you do in the react-native directory. that includes installing react-native dependencies. CLJS tooling related things you'd put into the main package.json directly

thheller 2021-04-23T06:57:31.448300Z

you don't have to do that separation, could just as well combine it all but for me this is cleaner and maybe easier to show what parts of CLJS related and what is metro/react-native. should also in theory make it easier to support multiple react-native versions or just upgrading since all you need to change the :output-dir in the build config

zimablue 2021-04-23T08:10:59.450200Z

sorry I have a really basic question - in a clojurescriptdevelopment workflow where one in-development project depends on another in-development project, both clojurescript, how does one use a direct folder link to avoid having to republish everything through git all the time? I saw in the user guide it mentions source-paths, but setting this to "../my-other-prj/src" didn't seem to do anything

thheller 2021-04-23T08:12:39.450700Z

did you restart shadow-cljs after changing that?

zimablue 2021-04-23T08:22:04.451200Z

think I saw the problem, I see a warning in the shadow-cljs server process that it's being ignored because of deps.edn

zimablue 2021-04-23T08:23:01.452400Z

sorry, I feel like your project must be subject to an incredible number of subtle third party bugs, and users trying to use clj/cljs/js/java who aren't great with any or all of their respective sets of build tools

zimablue 2021-04-23T08:23:04.452700Z

or maybe it's just me

thheller 2021-04-23T08:27:08.453Z

nah its a common mistake. thats why I added the warning 😉

zimablue 2021-04-23T08:36:24.453400Z

if you get chance, that section of the docs could note it too

zimablue 2021-04-23T08:36:40.453900Z

make it easy for my chimp section of the developer community

niwinz 2021-04-23T14:47:46.456900Z

hello folks! After upgrading to 2.12.5 I start randomly getting the following error (image), Is usually happens after a modify -> hot-reload -> browser refresh -> error. But on next reload it not happens.

niwinz 2021-04-23T14:49:37.458400Z

The error is raised on loading a module, bacause of a error on loading other module, reading the browserfeaure.js , looks like the const googUserAgent = goog.require('goog.userAgent'); returns nil :S

niwinz 2021-04-23T14:51:01.459200Z

I don't know if is shadow-cljs related or clojurescript related

niwinz 2021-04-23T14:52:31.459500Z

only reproducible on development builds

thheller 2021-04-23T14:57:50.460900Z

make sure oyu have all the proper versions. 2.12.x will only work with CLJS 1.10.844+ and the matching closure-compiler/library versions

iGEL 2021-04-23T14:58:45.461900Z

Hello! I was wondering, whether it's possible to exclude dependencies from npm packages? It's described here for webpack for the package i'm using: https://github.com/seiyria/bootstrap-slider/tree/v9.10.0#how-do-i-exclude-the-optional-jquery-dependency-from-my-build

thheller 2021-04-23T15:00:14.462500Z

:js-options {:resolve {"jquery" false}}

niwinz 2021-04-23T15:02:12.462600Z

I'm not using deps.edn, I use the shadow-cljs dependencies without specifying the clojurescript version...

iGEL 2021-04-23T15:03:04.462900Z

thank you!

thheller 2021-04-23T15:10:05.463100Z

hmm should be ok then. hard to say without seeing actual code

niwinz 2021-04-23T15:12:33.463300Z

The code is open-source, the bad part, is a pretty big project (https://github.com/penpot/penpot) I probably need to isolate it in a small project or similar

niwinz 2021-04-23T15:13:31.463900Z

i'm on a branch

thheller 2021-04-23T15:14:14.464100Z

looks ok in deps.edn anyways

thheller 2021-04-23T15:14:33.464500Z

is this easily reproducible? I mean can I just run this locally or does it need special setup?

niwinz 2021-04-23T15:15:14.464700Z

hmm let me check

niwinz 2021-04-23T15:15:43.464900Z

if you run it locally, you will probably need to add the dev-http serve for serve that files

niwinz 2021-04-23T15:16:12.465100Z

let me prepare this and i give you instructions

niwinz 2021-04-23T15:26:28.465300Z

😞 unfortunatelly I'm unable to reporduce the issue on the login page (the unique page you can view without all the environment) If I found a way to "more" deterministically reproduce it" I'll ping you, but for now it happens randomly, that makes it pretty hard to find the cause

thheller 2021-04-23T15:32:02.465500Z

yeah the goog.events.browserfeature stuff is used pretty commonly (eg. in all my projects) and never had an issue with it

thheller 2021-04-23T15:32:07.465700Z

so dunno what it might be

niwinz 2021-04-23T15:35:49.465900Z

I have tried to serve the files through the shadow-cljs server (using proxy pass to it instead of serving the directory with nginx) and now I unable to reproduce it :S

niwinz 2021-04-23T15:37:30.466100Z

on the end looks something unrelated to shadow-cljs, sorry for inconvenience, but I did not expeted that... specially when it start happens after upgrade :S

thheller 2021-04-23T15:41:08.466300Z

yeah dunno. with custom servers you have to check cache issues but they usually manifest differently so no clue

2021-04-23T23:04:36.466600Z

Have I broken something? Unfortunately I can't find any information either on https://shadow-cljs.github.io/docs/UsersGuide.html or on google