This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-02
Channels
- # announcements (1)
- # architecture (1)
- # aws (21)
- # babashka (37)
- # beginners (173)
- # boot (12)
- # chlorine-clover (5)
- # cider (36)
- # clara (11)
- # clj-kondo (25)
- # clojure (128)
- # clojure-europe (7)
- # clojure-finland (3)
- # clojure-germany (2)
- # clojure-nl (57)
- # clojure-uk (23)
- # clojurescript (71)
- # clojurex (1)
- # core-async (30)
- # core-typed (5)
- # cursive (35)
- # datomic (8)
- # duct (4)
- # emacs (8)
- # exercism (41)
- # fulcro (116)
- # jackdaw (4)
- # jobs-discuss (6)
- # juxt (4)
- # kaocha (16)
- # leiningen (14)
- # malli (5)
- # observability (4)
- # off-topic (2)
- # pathom (19)
- # pedestal (29)
- # re-frame (64)
- # reitit (18)
- # ring (8)
- # shadow-cljs (3)
- # sql (13)
- # tools-deps (32)
- # tree-sitter (5)
- # yada (17)
Hi! I'm trying to invoke tools.deps directly from clojure (more specifically clojure.tools.deps.alpha/resolve-deps
) but I get a
Cannot access s3p://... using the registered transporter factories: HttpTransporterFactory, S3TransporterFactory, FileTransporterFactory
error. If I run a clj -Sdeps
with the same content it works fine. Is there any library that I should include in the classpath to make s3 repos work? Or any environment variable or system property that I should set? I'm using org.clojure/tools.deps.alpha {:mvn/version "0.8.677"}
.@rfhayashi did you try s3:// ? that's the only documented protocol for s3 access (s3p did work in some older versions but has never been supported)
you should not have to do anything special to get s3 to work
@alexmiller it does work. thanks!
is there any support for modifying the bootclasspath, like:
https://github.com/sunng87/lein-bootclasspath-deps
does for leiningen? It would be nice to use some special case of :boot-deps
so that I don’t have hack it together with downloading jar files locally from maven and using :jvm-opts
directly
this seems to be in the focus area of tools-deps of invoking java with the correct dependencies ready
you should not modify the bootclasspath in my opinion, so I'm not going to make that any easier
there are legitimate use-cases, like enabling alpn for jdk8 for http2: https://www.eclipse.org/jetty/documentation/current/alpn-chapter.html I agree that it should be avoided when possible, but now I need to hack around deps.edn because of the lack of support
you can make an alias that produces the boot classpath you need, then use clj -Spath
to generate the classpath from it, so there is no need for manual jar downloading
and then put that path in your :jvm-opts
clj -Spath
would produce an absolute path to my main maven repo, which is hosted in my home directory
an alternative would be to set :mvn/local-repo
to fetch it into a subdirectory of the project, then use relative paths in the jvm-opts
you would just use this for what you need in the bootclasspath
I'm using clojure cli / deps.edn. Is there a way to define env vars following the 12 factor app?
Looking into https://github.com/weavejester/environ but it seems like it does not support deps.edn
(for instance, if your using lein. you can have .lein-env)
@jaime.sangcap (System/getenv "varname")
is all you need to get an environment variable's value so I'm not sure what you're asking in the context of CLI/`deps.edn`?
Perhaps "Can you have environment variables in your deps.edn
?" No. It's a pure EDN file, not executable code, and has no substitutions made.
I'm wondering if there is library that can load env var from file. And you can configure where the file is in the deps.edn. Right now I'm only using intellij to set env vars. What I'm thinking is there should be a example file (checkin to version control) that has all the required env var Then locally, the library will check the example file against your env file for missing env var
This might be at least partially what you're looking for: https://github.com/yogthos/config
Sorry, I have no idea what you mean by any of that.
Environment variables are set at the O/S level before a process is started -- I would imagine IntelliJ is setting the environment variables before starting the REPL or run process.
You can't set environment variables from inside a process. You can set JVM properties tho'...
BTW environ
is just a library. It can be used from any process run by CLI/`deps.edn`.
It just happens to have existing plugins for lein
and boot
that call it in particular ways.
(but I would caution you against storing anything in deps.edn
that isn't part of the official syntax -- deps.edn
is not intended to be a "general configuration file -- which project.clj
and build.boot
tend to be)