Fork me on GitHub
paul a01:02:41

i'm still having a hard time understanding what i need to do to define a macro and use it in my CLJS code at compile time. i read the blog post that i found, but i'm still getting the same Error in phase :compilation error, without a stacktrace.

paul a01:02:26

it feels like the closest i've gotten is an error along the lines of "proj/ns.clj" was found on the classpath. Should this be a .cljs file?

paul a01:02:41

i'm using the latest version of shadow-cljs and 1.10.x of CLJS.

paul a01:02:16

otherwise, my shadow-cljs compilation output is just:

shadow-cljs - connected to server
[:test] Compiling ...
------ ERROR -------------------------------------------------------------------
 File: /path/to/frontend_test.cljs
Error in phase :compilation



Has anyone had any luck getting private Maven repos to work in shadow-cljs? Latest I can find 2018 -- theller notes that it might work, but doesn't seem like anyone has figured out how. I'll just use deps.edn as a workaround, but curious if anyone did figure this out


Just an update, weeks ago (so long ago the thread is gone) I reported a problem I ran into when running shadow-cljs on windows 10 and WSL2. Specifically, WSL2 has a problem right now where it doesn't properly bind the ipv6 address`::1` correctly. What this meant was that I couldn't connect to a shadow-cljs dev server through services like Anyways, it took me until today to find find an excuse to dig into this during work hours. But I found out that Java uses ipv6 by default and converts ipv4 addresses to their ipv6 equivalents. Ex -> ::1 So if you're like me and need to force shadow-cljs to use an ipv4 binding you can set it as an option in env vars export _JAVA_OPTIONS="-.preferIPv4Stack=true"

๐Ÿ‘ 8

interesting. you can also set :jvm-opts ["-.preferIPv4Stack=true"] in shadow-cljs.edn (or deps.edn/project.clj)


Interesting isn't the term I'd use ๐Ÿ˜…. But that is a great alternative to using an env var, thanks for pointing that out ๐Ÿ™‚


how is wsl2 otherwise? I'm hesitant to use it because of the "beta" windows and stuff


i'm using wsl2 with vscode remote through wsl2 for fun


it's fantastic.


it almost competes with my mbp ๐Ÿ™‚


Yeah, I was hesitant on the beta problems as well. Which on the "fast ring", there have been several that have been several bugs that have bit me. However, the file system performance is leagues ahead of WSL1. The file system changes are particularly what has driven me to use WSL2, IE using git (and Magit) feel so much nicer on WSL2 than it ever did on WSL1. It's easy to dip your toes into WSL2 as well just fire up a second distro/image and set it to version two, no need to sacrifice your main dev environment.


I think you could also export your current WSL dev environment, import it under a new name and set it to WSL2. In effect, copying your current set-up and seeing how it performs under WSL2.


need to figure out REBL with X410 though


hmm I guess I'll wait ๐Ÿ˜›


fs performance is pretty much the only thing I really care about


Hi, Iโ€™m trying to create a tiny browser editor that users can create a snippet of clojure -> send to the compiler -> compile and then insert back to the browser where itโ€™s live and callable. Any thoughts on how to approach this?


I would use bootstrapped clojurescript, rather than sending to a remote compiler


Thanks so much!


hereโ€™s a blog post that might help getting you started:


i made it private but its quite easy to get codemirror running with shadow to have a nice cljs editing experience

(ns editor.main
  (:require [reagent.core :as r]
            [clojure.string :as str]
            ["codemirror" :as codemirror]
            [shadow.resource :as rc]
            [cljs.reader :as edn]))