Fork me on GitHub
#cljsrn
<
2020-05-13
>
dnolen00:05:04

device-caching / fast REPL reconnect is in master

👍 16
dnolen00:05:46

it was a doozy - so there's likely to be issues - that said on a larger project where N things might bork something - it makes the dev process a lot smoother

dnolen01:05:20

you can just RN refresh to get back to a good state and the REPL just reconnects and you keep going

dnolen01:05:29

no need to restart the REPL

dnolen01:05:01

if you change things via compile (no REPL) then the app will let you know when you connect a REPL

dnolen01:05:38

(this also means you can interact w/ an App after the first install via Krell w/o connecting a REPL at all)

joshmiller01:05:54

I got Krell/CLJS running on macOS with Microsoft’s RN fork.

👏 4
joshmiller01:05:33

The only big change is react-native-tcp-socket’s Podfile says it supports iOS, but it compiles fine on macOS if you change the Podfile.

joshmiller01:05:40

REPL, reloading both work.

dnolen01:05:41

the above was all tested mainly with Android - so I didn't cut any corners wrt. to platforms

dnolen01:05:58

@joshmiller right that makes sense to me - super cool

joshmiller01:05:23

Yeah, benefits of small lib that lets RN do most of the work.

joshmiller01:05:15

I submitted a PR to add macOS support. Assuming they don’t balk at supporting it, then Krell will be able to run without changes.

👍 4
dnolen12:05:25

nice already merged 🙂

joshmiller13:05:53

And released. @dnolen if you bump the dep for that to 3.6.0 we should be good to go.

👏 4
dnolen13:05:47

@joshmiller bumped the dep

👍 4
joshmiller13:05:31

Awesome, I’ll write up instructions later today then.

👍 4
dnolen14:05:05

huh realizing that with RN Refresh / REPL Reconnect support in Krell, we no longer need to quit the REPL session for changes to assets or arbitrary requires

dotemacs14:05:14

Wow, that’s pretty cool

dotemacs14:05:21

So we can now just npm install smthn..., require it in the ns declaration and we’d be able to just keep going uninterrupted?

dotemacs14:05:06

Thanks @joshmiller 🙂

👍 4
dnolen14:05:36

@dotemacs you would need to refresh RN but you wouldn't need to restart the REPL

dotemacs14:05:58

Thanks for the clarification, that’s great to hear!

dnolen14:05:08

I can easily add a screen like for the cache invalidation, "Asset change detected. Refresh the application"

dotemacs14:05:01

Or maybe just refresh automatically

dnolen15:05:49

I didn't think there was really a supported way to refresh the entire React Native app automatically

dnolen15:05:33

though actually you would get a automatic refresh anyway so never mind 🙂

dnolen15:05:42

the asset support stuff is required by index.js

dnolen15:05:31

removed some broken stuff from the network handling, seems better especially on Android

dnolen15:05:25

much better now regardless of REPL / app launch order

dnolen15:05:44

also tweak it so that we don't generate the support files if nothing changed

dnolen15:05:08

should make the experience of running the app first - then launching REPL via -c -r more sensible

dnolen15:05:18

you'll only see one refresh

joshmiller15:05:17

Awesome, thanks, that was a pain point especially when trying to diagnose broken dependencies.

dnolen16:05:19

painful, all the weird edge cases should be gone w/ the removal of ack stuff

dnolen16:05:54

so now there are no Android permissions to set - just the cache size

gammarray17:05:05

Hi 👋 I'm new here. Looking at options for react native development with cljs. Seems like there are a lot of different tools to choose from. I'm curious if folks have any particular one you might point to for a newcomer to pick up?

dotemacs17:05:26

The gist is this: - re-natal, the oldest option, but now a bit dated - shadow-cljs, stable & works, the maintainer is very prompt to provide support on #shadow-cljs if needed, but only as far as it’s shadow-cljs specific. He doesn’t use it himself for react-native as he doesn’t do much react-native development. - krell the newest arrival, looks super promising but it’s still alpha. Don’t let that put you off as its actively developed.

dnolen17:05:37

re-natal and shadow-cljs are the most mature for sure

dnolen17:05:12

re-natal does force you stay on RN 0.59.7 which is not ideal - since 0.6.X has autolinking which is a big simplification

dnolen17:05:45

pretty sure shadow-cljs doesn't have that problem

dnolen17:05:06

I work on krell - it's getting there especially now - but there some ways to go still

dotemacs17:05:13

No, with shadow-cljs you’re not forced on react-native version

gammarray17:05:39

... the work on this project might not start for another 6 mos

thheller17:05:42

FWIW I just tested react-native-windows and it just works too 😉

👍 8
gammarray17:05:05

krell does sound promising for the reasons mentioned on the repo readme

gammarray17:05:04

i gave re-natal a try a little while back for a sideproject, but got turned off by the need for to run xcode. not sure if that's still an issue, but my team mostly runs linux

dotemacs17:05:31

None of the solutions above will abstract the need for Xcode.

dotemacs18:05:41

If you touch iOS, you’ll need to use Xcode for signing at least.

dotemacs18:05:05

If you’re going to add some extensions, that are native, you might want to do something in Xcode.

dotemacs18:05:50

Having said that, you can probably get very far and maybe even not touch any Swift or ObjC. But to release the app for iOS you’ll need Xcode.

gammarray18:05:21

that's ok, we can run xcode, but would prefer to develop in linux. sounds like that is possible?

gammarray18:05:55

oh excellent! thx

gammarray18:05:13

glad to know its possible now

Oliver George23:05:29

Can anyone comment on using the Metro bundler to serve up static js assets without transformation.

Oliver George23:05:13

I'm speculating in this suggestion, it makes sense only of Metro is happy to not apply transformations to JS files. I think that's how it works but have never done it in anger.