Fork me on GitHub
#shadow-cljs
<
2021-04-23
>
mbertheau03:04:36

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

thheller06:04:41

@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

thheller06:04:31

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

zimablue08:04:59

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

thheller08:04:39

did you restart shadow-cljs after changing that?

zimablue08:04:04

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

zimablue08:04:01

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

zimablue08:04:04

or maybe it's just me

thheller08:04:08

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

zimablue08:04:24

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

zimablue08:04:40

make it easy for my chimp section of the developer community

niwinz14:04:46

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.

niwinz14:04:37

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

niwinz14:04:01

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

niwinz14:04:31

only reproducible on development builds

thheller14:04:50

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

niwinz15:04:12

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

thheller15:04:05

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

niwinz15:04:33

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

niwinz15:04:31

i'm on a branch

thheller15:04:14

looks ok in deps.edn anyways

thheller15:04:33

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

niwinz15:04:14

hmm let me check

niwinz15:04:43

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

niwinz15:04:12

let me prepare this and i give you instructions

niwinz15:04:28

😞 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

thheller15:04:02

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

thheller15:04:07

so dunno what it might be

niwinz15:04:49

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

niwinz15:04:30

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

thheller15:04:08

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

iGEL14:04:45

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

thheller15:04:14

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

iGEL15:04:04

thank you!

ribelo23:04:36

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