This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-04-29
Channels
- # asami (1)
- # babashka (20)
- # beginners (3)
- # biff (1)
- # calva (5)
- # clj-kondo (68)
- # clojure (6)
- # clojure-europe (70)
- # clojure-losangeles (4)
- # clojurescript (1)
- # cursive (6)
- # exercism (1)
- # fulcro (3)
- # hyperfiddle (23)
- # introduce-yourself (1)
- # kaocha (1)
- # lambdaisland (8)
- # lsp (6)
- # off-topic (24)
- # pathom (24)
- # specter (1)
- # tools-deps (4)
- # xtdb (4)
[solved] How do i tell clj about a local library if not by using the file path syntax "/path/to/lib" This error (below in the code block) indicates that it doesn't respect ~/ aka home. I want to keep my dev libs in one place and have other projects pick them up, so it can't be "relative" to the project I'm starting the repl in.
clj -A:developer-libraries
Error building classpath. Local lib developer-libraries not found: /home/drewverlee/clojure/try/add-lib/~/clojure/utils
Some options
1. ~ isn't the right way to do this, and I'm a file path dummy
2. using a clojure alias isnt' the right way to do this and i should use blah
3. ???? If you drop the /
path prefix, what does it resolve to? (I'd try it myself but not at computer 😁)
it will give fail to find something on /clojure/utils, which is fine, because i can use /home/drewverlee/clojure/utils. I forgot vanilla / was an option.
or at least, i was juggling too many things to remember it in this context...
The JVM doesn't expand ~
As ~
is a shell (bash, zsh fish) expansion, a path containing ~
would need to be used as a command line argument which the shell will expand before passing to the Clojure tool (jvm). In theory that would work for clojure.main as it uses string arguments, but maybe more involved for clojure.exec as it uses EDN style arguments
Using an with the full path seems to be the simplest & most reliable approach, unless the approach is being used on different operating systems & user accounts (but then it's not really local anymore)