This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-02-19
Channels
- # announcements (10)
- # aws (3)
- # aws-lambda (1)
- # babashka (24)
- # beginners (57)
- # boot (5)
- # calva (20)
- # chlorine-clover (3)
- # cider (14)
- # clj-kondo (37)
- # clojars (17)
- # clojure (200)
- # clojure-dev (40)
- # clojure-europe (9)
- # clojure-france (7)
- # clojure-gamedev (5)
- # clojure-hungary (4)
- # clojure-italy (8)
- # clojure-losangeles (2)
- # clojure-nl (9)
- # clojure-uk (97)
- # clojurebridge (1)
- # clojured (3)
- # clojuredesign-podcast (23)
- # clojurescript (13)
- # code-reviews (2)
- # component (22)
- # core-typed (7)
- # cursive (64)
- # datascript (12)
- # datomic (60)
- # emacs (6)
- # fulcro (54)
- # graalvm (11)
- # graphql (3)
- # hoplon (25)
- # jobs (1)
- # joker (85)
- # juxt (5)
- # kaocha (10)
- # klipse (8)
- # malli (2)
- # off-topic (36)
- # parinfer (1)
- # pathom (1)
- # re-frame (9)
- # reagent (4)
- # reitit (1)
- # remote-jobs (1)
- # shadow-cljs (24)
- # spacemacs (1)
- # sql (39)
- # tools-deps (10)
- # tree-sitter (18)
- # xtdb (18)
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.
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?
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
It works with something along the lines in shadow-cljs.edn
:
{:dependencies [[re-frame/re-frame "1.3.0"]
[reagent/reagent "1.2.0"]
[binaryage/devtools "1.0.7"]]
:repositories {"my-repo" {:url ""
:username #shadow/env "PRIVATE_MAVEN_USERNAME"
:password #shadow/env "PRIVATE_MAVEN_PASSWORD"}}
:builds {:app {:target :browser
...
I would have loved being able to store the password using gpg
though - like with lein
:
:username [:gpg :env/PRIVATE_MAVEN_USERNAME]
:password [:gpg :env/PRIVATE_MAVEN_PASSWORD]
But no luck ๐ ๐ข(pertinent Slack log: https://clojurians-log.clojureverse.org/shadow-cljs/2018-02-27 )
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 0.0.0.0 -> ::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="-
https://superuser.com/questions/453298/how-to-force-java-to-use-ipv4-instead-ipv6
interesting. you can also set :jvm-opts ["-
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
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.
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?
hereโs a blog post that might help getting you started: https://code.thheller.com/blog/shadow-cljs/2017/10/14/bootstrap-support.html
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]
["codemirror/mode/clojure/clojure"]
["codemirror/addon/edit/matchbrackets"]
["codemirror/addon/hint/show-hint"]
[shadow.resource :as rc]
[cljs.reader :as edn]))