This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-08-07
Channels
- # aleph (4)
- # announcements (7)
- # arachne (1)
- # beginners (138)
- # calva (5)
- # cider (1)
- # clara (14)
- # clj-kondo (1)
- # cljsrn (2)
- # clojars (4)
- # clojure (247)
- # clojure-dev (33)
- # clojure-europe (3)
- # clojure-italy (71)
- # clojure-losangeles (6)
- # clojure-romania (6)
- # clojure-spain (11)
- # clojure-uk (17)
- # clojurescript (95)
- # core-async (2)
- # cursive (19)
- # datomic (7)
- # duct (27)
- # figwheel (1)
- # graalvm (22)
- # juxt (7)
- # kaocha (8)
- # leiningen (1)
- # luminus (7)
- # lumo (4)
- # off-topic (38)
- # reagent (4)
- # reitit (11)
- # shadow-cljs (30)
- # spacemacs (42)
- # tools-deps (103)
- # xtdb (5)
If I want to use a fork of Clojure with deps, can I exclude the clojure version pulled in from the system deps.edn somehow?
@cfleming If your local deps.edn
file has that (local?) Clojure in :deps
directly, it should override the system deps anyway?
correct ^^
assuming you have built and installed that fork locally in Maven so that it's artifact id is still org.clojure/clojure
if you want to call it something else (or use as a git or local dep), then no, that is not currently supported
that's not really intentional just kind of a consequence of various assumptions
top-level exclusions would possibly help with this but not there yet
Actually, if I had the forked jar in a lib
dir, and used :deps {org.clojure/clojure {:local/root "lib/clojure-1.10.1.jar"}}
, that should work, right?
there are some issues with overriding a maven dep with a git / local dep
so I don't think it will work
that one kind of bugs me. I haven't had a chance to look at it yet
part of it is the version comparison across dep types
Hi folks, has anyone successfully used tools.deps w/ git repos on private repositories?
As the maintainer of both tools.deps
and tools.gitlibs
, I expected a more user-friendly answer from you.
Sorry, was just answering your question. Was hard to provide any additional detail without any problem description
I'm having issues w/ unknown host key if I use git@...
or I need to provide credentials if I use the https form, which I obviously won't do, since I'm not comiting credentials on the repo
can you share the error message or more info about your setup and what you're doing?
what os are you on?
have you been through the git stuff at https://clojure.org/reference/deps_and_cli#_procurers ?
https auth is not currently supported so you'll need to use ssh
I'm running from Fedora 30, very basic setup. The error code I get is:
Execution error (JSchException) at com.jcraft.jsch.Session/checkHost (Session.java:805).\nUnknownHostKey: . RSA key fingerprint is .....
It came from a direct invocation of tools.deps respolve-deps
:
(deps/resolve-deps {:deps {'project {:git/url ":repo"
:sha "commit-sha"}}}
{})
I'm running the repl from a session where I've added the keys to ssh-agent
, so I assume this step is done.
there's a workaround described at https://codehopper.nl/2018/09/27/clojure-gitlab-deps/
ED25519 on the user identity file is fine (when using an agent) @ingvij the error you're pasting is an rsa host key, a different kind of key
ssh-keyscan
and the link @alexmiller posted
the article @alexmiller posted seems to use the same exact thing I'm describing
since clojure deps.edn is not terminal interactive, the .ssh/known_hosts file needs the host key
That worked for checking the dependency, but I'm getting a MetadataNotFoundException
now. I'll double-check everything, specially the dependency itself. Thanks for the help @ghadi and @alexmiller.
if you can share more info, might have some idea what that is, but I don't even know what layer of the stack it's from
just in general, providing information at the beginning lets people help you more efficiently, and we're all doing this for free, in spare time
Execution error (MetadataNotFoundException) at org.eclipse.aether.internal.impl.DefaultMetadataResolver/resolve (DefaultMetadataResolver.java:233).\nCould not find metadata org.clojure:clojure/maven-metadata.xml in local (/home/hkupty/.m2/repository)
The stacktrace from tools.deps:
[[org.eclipse.aether.internal.impl.DefaultMetadataResolver
resolve
"DefaultMetadataResolver.java"
233]
[org.eclipse.aether.internal.impl.DefaultMetadataResolver
resolveMetadata
"DefaultMetadataResolver.java"
191]
[org.apache.maven.repository.internal.DefaultVersionResolver
resolveVersion
"DefaultVersionResolver.java"
233]
[org.eclipse.aether.internal.impl.DefaultRepositorySystem
resolveVersion
"DefaultRepositorySystem.java"
238]
[clojure.tools.deps.alpha.extensions.maven$eval362$fn__365
invoke
"maven.clj"
40]
[clojure.lang.MultiFn invoke "MultiFn.java" 239]
[clojure.tools.deps.alpha$canonicalize_deps$fn__761
invoke
"alpha.clj"
68]
[clojure.core.protocols$fn__8159 invokeStatic "protocols.clj" 168]
[clojure.core.protocols$fn__8159 invoke "protocols.clj" 124]
[clojure.core.protocols$fn__8114$G__8109__8123
invoke
"protocols.clj"
19]
[clojure.core.protocols$seq_reduce invokeStatic "protocols.clj" 31]
[clojure.core.protocols$fn__8144 invokeStatic "protocols.clj" 75]
[clojure.core.protocols$fn__8144 invoke "protocols.clj" 75]
[clojure.core.protocols$fn__8088$G__8083__8101
invoke
"protocols.clj"
13]
[clojure.core$reduce invokeStatic "core.clj" 6828]
[clojure.core$reduce invoke "core.clj" 6810]
[clojure.tools.deps.alpha$canonicalize_deps
invokeStatic
"alpha.clj"
67]
[clojure.tools.deps.alpha$canonicalize_deps invoke "alpha.clj" 65]
[clojure.tools.deps.alpha$expand_deps$fn__787
invoke
"alpha.clj"
184]
[clojure.tools.deps.alpha$expand_deps invokeStatic "alpha.clj" 183]
[clojure.tools.deps.alpha$expand_deps invoke "alpha.clj" 164]
[clojure.tools.deps.alpha$resolve_deps invokeStatic "alpha.clj" 231]
[clojure.tools.deps.alpha$resolve_deps invoke "alpha.clj" 213]
org.clojure:clojure/maven-metadata.xml
looks weird
maybe bad format in your deps.edn?
org.clojure:clojure when should be org.clojure/clojure maybe?
I checked the dependency, it's clojure version was RELEASE
as it comes from default when you bootstrap a project w/ https://github.com/seancorfield/clj-new
@alexmiller maybe -Sresolve
can rewrite symbolic maven things, too
re RELEASE, agreed, bleh
RELEASE is not officially supported in deps.edn
I've let it continue to work as it's sometimes a good hack, but shouldn't be enshrining it
-Sresolve is going to go away (move into an external tool)
I moved past that error, now yet another one bothering me. A dependency of a dependency is not being resolved, whereas if I run clj
on the library I'm trying to import, it works fine:
Syntax error (ExceptionInfo) compiling at (cli/ops.clj:5:1).\nUnable to resolve io.grpc/grpc-core version: [1.17.1]
When I run the repl directly it works, if I call this it fails:
(deps/resolve-deps {:deps {'io.etcd/jetcd-core {:mvn/version "0.3.0"}}}
{})
I don't want to keep you involved in the debugging unless you want to, I just keep posting since I think those might be relevant. I'd understand if you'd rather want me to open an issue.
which, btw, I'll do for clj-new
so new projects are not created w/ RELEASE
on clojure version.
I would dig in to cli/ops.clj on the given line number, likely something isn't being quoted correctly
that particular invocation is this one:
(deps/resolve-deps {:deps {'io.etcd/jetcd-core {:mvn/version "0.3.0"}}}
{})
I believe this might be due to some parsing from pom.xml instead of deps.edn maybeon pardon me, that does come from tools deps, I wonder why it is categorized as a syntax error
I assume it's complaining about the dependency declaration syntax, as it expects ns:symbol:jar:version
where version is a string, but instead it gets a list.
@U0NCTKEV8 the syntax thing is a bug, I have a patch pending for that
clj -Sdeps "{:deps {io.etcd/jetcd-core {:mvn/version \"0.3.0\"}}}"
might give you a clearer error
if you're calling this with tools.deps directly, you need to pass it the repos
clj provides those, but tools.deps does not (automatically)
there's an example at https://github.com/clojure/tools.deps.alpha/blob/master/API.md
I'll check that. However, the thing is I can do
(deps/resolve-deps {:deps {'io.grpc/grpc-core {:mvn/version "1.17.1"}}} {})
b/c you have it locally
But I can't do the same for io.etcd/jetcd-core
, which fails on this very same dependency.
it does not for me, for me it fails to find io.netty:netty-codec-http2:jar:[4.1.30.Final] in central
Right. I got a Syntax error (ExceptionInfo) compiling at (cli/ops.clj:5:1).\nCould not find artifact io.grpc:grpc-core:jar:1.17.1
after moving my ~/.m2
to ~/.m2-bkp`.
it looks like the place in deps where that exception is thrown is if the dep is either a version range or an alias like LATEST or RELEASE
so my guess something in jetcd is changing how maven attempts to resolve an alias or a range in io.grpc's dependencies
hrmm, I am still getting errors, and it has changed to different artifacts not being found in central now 😞
In light of continued complaints about the use of "RELEASE"
in projects created by clj-new
... seancorfield/clj-new {:mvn/version "0.7.7"}
pins these to 1.10.1 (for Clojure) and 0.10.0-RC1 (for test.check). You're welcome 🙂
Bear in mind that lein new
, boot new
, and clj-new
all look for templates themselves (on Clojars/Central) using "RELEASE"
under the hood unless you specify a template version to use (which almost no one does).
thanks @seancorfield
This is not a critical question in any way, but was curious whether folks had any recommendations on creating a deps.edn file for a library that has Clojure-specific and ClojureScript-specific flavors in the same git repo, e.g. core.rrb-vector is the one I have in mind. One thought: create a deps.edn that has almost 0 dependencies when no aliases are specified, and has a :clj alias for Clojure dependencies/paths, and a :cljs alias for ClojureScript dependencies/paths. Second thought: Two separate deps.edn files, except there is only one root directory file named deps.edn available.
Third thought: two separate git repos, one for each variant?