This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-05-10
Channels
- # babashka (35)
- # beginners (70)
- # bristol-clojurians (1)
- # calva (30)
- # cider (2)
- # cljsrn (203)
- # clojure (20)
- # clojure-australia (3)
- # clojure-europe (17)
- # clojure-france (7)
- # clojure-nl (4)
- # clojure-uk (8)
- # clojurescript (27)
- # code-reviews (19)
- # core-async (21)
- # cursive (7)
- # datomic (31)
- # defnpodcast (1)
- # duct (6)
- # emacs (3)
- # events (1)
- # helix (2)
- # honeysql (24)
- # jackdaw (2)
- # jobs (2)
- # jobs-discuss (13)
- # juxt (2)
- # lsp (21)
- # re-frame (45)
- # remote-jobs (2)
- # rewrite-clj (3)
- # shadow-cljs (13)
- # vim (1)
Stand down red alert. Clearly my env variables didn't make it to the node invocation. This worked...
This put me on to it: https://github.com/facebook/react-native/issues/22021
I already deleted everything - actually I had a friend install the tools from scratch (not a clojure user), and he had the same result. I myself tried to reinstall every tool (java, node, clojure etc) starting from a newly created user on my machine. I'm installing node with nvm, android studio, sdk and clojure on the home directory, so the only shared dependency is (to my knowledge) java.
I'm not saying the problem is not in the tools - just that the previous krell version did not trigger the issue
@dnolen the same project worked worked correctly on @pez machine - from an outsider point of view, it looks like it's dependent on the particular os I'm using, which is the same of the friend's machine on which I replicated the issue
Arch is quite quick with releasing updates so it might be triggered by some "new" package version
I can bisect to reach the problematic commit - what directories would you suggest to delete at each try? @dnolen would .cpcache target ~/.gitlibs be enough?
but even on non-M1 Apple hardware I occasionally hit null-pointer exceptions when constructing the classpath
I see - I haven't seen NPEs, but I can switch to the dev version if that can help in some way - just don't really know how
Error building classpath. Cannot invoke "java.io.File.isAbsolute()" because "f" is null
java.lang.NullPointerException: Cannot invoke "java.io.File.isAbsolute()" because "f" is null
I was just checking the stack trace to see if I had actually forgotten the NPE - but I don't see any in the stack trace in my bug report on GH.
the NPE I reported here on the channel was due to some problem with the git SHAs that I copied from the tutorial or from the readme itself.
the tutorial references
io.vouch/reagent-react-native {:git/url ""
:sha "0d25830bd0bf02baf272b9c60d3edefc6766ef24"}
but I do not see that hash here https://github.com/vouch-opensource/reagent-react-native/commits/master
what happens is that Krell does not even try to connect until cljs.core
is loaded to avoid this kind of issue
So Krell startup is blocked, and thus Cider startup is blocked until the RN environment connects (which is after cljs.core is available)
so at least at first glance I cannot understand it since this is the exact same bug I had to fix for cljs.main
style interaction
https://github.com/vouch-opensource/krell/blob/master/resources/krell_repl.js#L167-L172
I was watching the commit introducing these lines yesterday, as it was the most suspect from an outsider point of view, but going back did not solve the issue as you might suspect. I might not have cleaned everything properly at the time though.
I was just setting up a script to automate the cleaning/building etc to let you know, as if I remember correclty, I do see it
@dnolen this is from the output of npx react-native start
LOG Running "Dondai" with {"rootTag":11}
LOG Connected to Krell REPL Server
ERROR Could not evaluate form: (cljs.core._STAR_print_namespace_maps_STAR_ = true) [ReferenceError: Can't find variable: cljs]
@laynor I don't use Cider and not super interested in spending time figuring out Cider/Piggie specific prbolems
the situation you're describing seems impossible but maybe a bit more logging when the REPL connects will clarify something
@laynor re: what I use - anything that let's me use cljs.main
approach - I use IntelliJ, but I also use the shell
I see - I'm not very well versed- very much a beginner - so I don't really know about the different approaches out there. I'll try to look into it.
anyway, fwiw, the issue appears somewhere from d0e1153 to d0e1153, with 6154649 still giving me a mostly working cljs prompt but riddled with errors (http://goog.xyz already declared, I've seen some related fixes in the git log)
if your krell_repl.js
does not look like master then your bug report makes perfect sense
this is the diff:
[ale:~/src/krelltest] master(+1792/-15603)* ± diff repl_tmp.js target/krell_repl.js
15,16c15,16
< var SERVER_IP = "$KRELL_SERVER_IP";
< var SERVER_PORT = krellPortMap ? krellPortMap[DeviceInfo.getDeviceId()] || $KRELL_SERVER_PORT : $KRELL_SERVER_PORT;
---
> var SERVER_IP = "192.168.11.14";
> var SERVER_PORT = krellPortMap ? krellPortMap[DeviceInfo.getDeviceId()] || 5001 : 5001;
18c18
< const KRELL_VERBOSE = $KRELL_VERBOSE;
---
> const KRELL_VERBOSE = false;
[ale:~/src/krelltest] master(+1792/-15603)* 1 ± npx react-native start
issue as detailed on github - LOG Running "Dondai" with {"rootTag":11} LOG Krell sez howdy, Device ID: goldfish_x86 LOG Connected to Krell REPL Server ERROR Could not evaluate form: (cljs.core.STARprint_namespace_maps_STAR_ = true) [ReferenceError: Can't find variable: cljs]
Installed packages:=====================] 100% Computing updates...
Path | Version | Description | Location
------- | ------- | ------- | -------
build-tools;29.0.2 | 29.0.2 | Android SDK Build-Tools 29.0.2 | build-tools/29.0.2/
build-tools;30.0.3 | 30.0.3 | Android SDK Build-Tools 30.0.3 | build-tools/30.0.3/
emulator | 30.6.5 | Android Emulator | emulator/
ndk;22.1.7171670 | 22.1.7171670 | NDK (Side by side) 22.1.7171670 | ndk/22.1.7171670/
patcher;v4 | 1 | SDK Patch Applier v4 | patcher/v4/
platform-tools | 31.0.2 | Android SDK Platform-Tools | platform-tools/
platforms;android-29 | 5 | Android SDK Platform 29 | platforms/android-29/
platforms;android-30 | 3 | Android SDK Platform 30 | platforms/android-30/
sources;android-30 | 1 | Sources for Android 30 | sources/android-30/
system-images;android-30;google_apis;x86 | 9 | Google APIs Intel x86 Atom System Image | system-images/android-30/google_apis/x86/
TBH, before krell I was playing with shadow-cljs/expo but was encountering repl disconnects and other weird errors so I wanted to switch to krell to make the stack a bit less deep
you can even try my project, I posted the url on github - It'll most likely just work for you as it did for @pez
it's probably referencing some older version because at that time I tried to make the version of every package coincide with the ones @pez was using.
I mean Android version is mostly important for compatibility with react-native-tcp-socket - for the REPL part
but Krell now longer requires a REPL to function - so support for various Android devices is much wider now
this may sound ridiculous but still - I removed write permissions from the krell_repl.js file, tried to reconnect, got this error on the repl
nil#'user/configExecution error (FileNotFoundException) at java.io.FileOutputStream/open0 (FileOutputStream.java:-2).
target/krell_repl.js (Permission denied)
no errors in the metro terminal, and a working cljs replyes once I changed Krell to always a produce a working RN app and to reuse Metro / fetch
all the crazy bugs went away - iOS worked, Android works - and a dev can work even if they don't use a REPL
I'd really like the two to go well together, cider is pretty handy and well integrated in emacs