This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-29
Channels
- # 100-days-of-code (2)
- # bangalore-clj (1)
- # beginners (141)
- # cider (33)
- # cljs-dev (13)
- # cljsjs (7)
- # cljsrn (1)
- # clojure (88)
- # clojure-conj (3)
- # clojure-dev (24)
- # clojure-italy (11)
- # clojure-nl (4)
- # clojure-russia (1)
- # clojure-sanfrancisco (1)
- # clojure-spec (4)
- # clojure-uk (53)
- # clojurescript (65)
- # core-logic (2)
- # cursive (28)
- # datomic (33)
- # duct (2)
- # emacs (3)
- # figwheel-main (9)
- # fulcro (44)
- # hoplon (6)
- # leiningen (144)
- # mount (1)
- # nrepl (21)
- # off-topic (102)
- # onyx (2)
- # other-languages (5)
- # pathom (6)
- # planck (3)
- # portkey (1)
- # re-frame (7)
- # reagent (5)
- # reitit (17)
- # shadow-cljs (24)
- # spacemacs (16)
- # tools-deps (64)
- # uncomplicate (2)
- # vim (22)
When using :git/url deps, is there any way to emulate latest or snapshot style behaviour? I'm having to manually updates shas a lot.
Interesting idea. It seems like I won't be the only one wanting this. I wonder if there's another best/good practice to emulate maven in this way
The code is about 100 lines. You could modify the resolve-tags library I write quite easily.
modify the resolve-git-dep function with a hardcoded branch, basically https://github.com/SevereOverfl0w/clj-resolve-tags/blob/master/src/io/dominic/deps/resolve_tags.clj
Hmm, maybe I should be writing a new “procurer”. I’ll look into that as a solution. thanks for the nudge in a new direction
https://github.com/clojure/tools.gitlibs#revs supports branch names (e.g. master
)
It does, but tools.deps does not (gitlibs is intentionally broader and more generic)
If you're coordinating changes between many repos all the time I think it's worth considering whether the apparent decoupling you have at repo boundaries maps at all to stable designed API boundaries or whether you'd be better off admitting that you don't yet have decoupling and would be better served putting everything in one place for now.
Good point. In my case it’s not de-coupling I want, but shared specs. The specs are changing a lot currently, hence the need for regular updates
In slightly related news I got a Katamari v0.0.5 out the door which successfully does content addressing of build products (jars, uberjars, javac'd classfiles). At this point it's fully self-bootstrapped and stable as such. Incremental rebuilds were the big thing I wanted to get working before this week's meeup - if I can get repl and test tasks sorted out I'll be happy enough to really try and push this thing. https://github.com/arrdem/katamari/releases/tag/v0.0.5 for your amusement.
I cleared out ~/.m2/repos/org/apache
, and now I’m seeing this error with tools.deps:
Exception in thread "main" org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.apache.httpcomponents:httpcore:jar:4.4.9
btw, I can observe that the jar in question is both being downloaded by the Clojure process, and is available in my ~/.m2
after its run (and failed)
Those maven repos are already set in the install deps.edn so that shouldn’t make much difference
Can you post the entire deps.edn for repro?
I had just the time to watch "Dependency Heaven" an like the arguments.
I'm working quite a lot with git dependencies on systems like gitbook (make books out of git-repos containing md) or smeagol (a git-repo / MD based wiki)
But I find it quite hard to find a good abstraction for addressing git resources.
Are there any plans to support other git servers like gitlab (the SaaS and all the on prem instances) or gitblit, gittea et al?
What about private repos?
In context of privisioning git repos I use this schema: https://github.com/DomainDrivenArchitecture/dda-git-crate/blob/master/doc/reference_domain.md
The relevant parts are Repository
and GitCredential
. These informations will lead to completely different urls like
,
or
In my opinion this part of the dependency problem is not limited to the clojure world ... do you see a chance for finding a more general solution?
@jerger_at_dda gitlab is supported? Anything git takes should work I think?
okay I see ... switching between https & ssh references is not a usecase for u - so your implementation not has to cope with url-magic.
Gitlab & Github will both have a git user for ssh access (url is sth like
But gitblit urls will not work in your way because gitblit urls will have a personal user like
.
Any cool idea about this case?
in tools.deps.alpha I can not find any information about default-deps
.
But our discussion made me more clear about my question remaining:
How can I express a dependency for private gitblit repositories?
The urls dependend on authorized user - so it would be
or
:default-deps
would be how I solve gitblit repos I mean. They are documented here https://clojure.org/reference/deps_and_cli
okay found default-deps in reference.
how would defaults help?
lets take
{:deps {gitblit-sally/awesome {:git/url ""}}}
for exampleYou wouldn't do that, you would do this:
{:deps {gitblit/awesome nil}}
Then a user would put an alias in ~/.clojure/deps.edn
{
:aliases
{:defaults
{:default-deps {gitblit/awesome {:git/url "…"}}}}}
This way, the user specifies how to resolve gitblit/awesome on their machine.okay ... got it
elegant solution for the clojure dependecy case ...
I will think about how to translate this idea to my dokument-references ... thx 🙂
It's an okay solution. In an ideal world, it would be nice to separate auth for some.server from it's reference, but ¯\(ツ)/¯
@dominicm hey, just helped someone track down a problem that looks due to a bad sha on the pack.alpha readme
in the “Auto-add to project” example, the sha at the end that is being injected is 1d455f6c591f440560c57a29e6d930004d735dcf, which is from May (if I understand what’s happening there correctly)
I’m assuming it should probably match the first sha or at least be more recent that that
the thing that was failing was due to not having the system repos, which looks like it was fixed in August
I will bump that this evening, @alexmiller. Thanks for the nudge 😊
Was it somewhere I should have seen it to support? I don't want to burden you with my mistakes!
Is there something wrong with the way I'm trying to pass this Java option: clojure -J-verbose:class
?
@robert.mather.rmm what problem do you have?
clj -Sdescribe
{:version "1.9.0.375"
:config-files ["/home/kevin/clojure-scripts/lib/clojure/deps.edn" "/home/kevin/.clojure/deps.edn" "deps.edn" ]
:install-dir "/home/kevin/clojure-scripts/lib/clojure"
:config-dir "/home/kevin/.clojure"
:cache-dir ".cpcache"
:force false
:repro false
:resolve-aliases ""
:classpath-aliases ""
:jvm-aliases ""
:main-aliases ""
:all-aliases ""}
and clj -J-verbose:class works for meweird, I changed deps.edn
a bit and now it works suddenly. Let me see if I can rewind to the failing state
Here's an even better one:
Exception in thread "main" java.lang.ExceptionInInitializerError
at clojure.main.<clinit>(main.java:20)
I think where this ^^ has been seen is when user.clj has an issue
I’ve got a todo to look at the ticket filed about this in TDEPS (really, I think it’s a CLJ problem)
@robert.mather.rmm if the error was occurring during classpath creation, then you are probably getting the cached cp and missing that part of the logic. You can use -Sforce to force recomputation (and maybe retrigger the error)
You're right, moving user.clj
out of the classpath fixed it.
Clojure should be better at reporting those
just needs a try/catch in the user.clj load path