Fork me on GitHub
#tools-deps
<
2021-08-17
>
imre14:08:45

tried a brew upgrade today:

% brew upgrade clojure/tools/clojure
==> Upgrading 1 outdated package:
clojure/tools/clojure 1.10.3.933 -> 1.10.3.943
==> Upgrading clojure/tools/clojure
  1.10.3.933 -> 1.10.3.943

==> Downloading 
Already downloaded: /Users/ikoszo/Library/Caches/Homebrew/downloads/5c6b0abbbfd924d4e8b2057a3a9f89f28760bf1ef52d1467abee7d379fa0737f--clojure-tools-1.10.3.943.tar.gz
Error: An exception occurred within a child process:
  NoMethodError: undefined method `path' for nil:NilClass
Did you mean?  paths

imre14:08:03

did I mess something up here?

Alex Miller (Clojure team)15:08:36

I think someone else reported this somewhere - what mac os are you on?

Alex Miller (Clojure team)15:08:05

I think it's something in brew itself

Alex Miller (Clojure team)15:08:13

yeah, this same error was reported last week on macOS 12.0 beta

imre15:08:48

macos 11.5.2

imre15:08:43

let me try a debug upgrade

Alex Miller (Clojure team)15:08:06

can you run brew doctor ?

imre15:08:39

sure thing

Alex Miller (Clojure team)15:08:07

seems like often this error occurs if xcode is out of date

Alex Miller (Clojure team)15:08:21

according to the googles

imre15:08:00

doctor does report my xcode is out of date

imre15:08:20

I'll try to update that

imre16:08:55

cheers, that indeed fixed it!

👍 3
imre16:08:26

interesting tho, the xcode update had to be forced, it did not show up in any lists

3
cap10morgan17:08:45

Is there a way to specify a subdirectory in a git library in my deps.edn? I.e. the pom.xml and src dir are not in the root of the git repo.

rwstauner17:08:57

:deps/root ?

rwstauner17:08:31

Optional key :deps/root

Specifies the relative path within the root to search for the manifest file

cap10morgan17:08:09

Bet that's it! Thanks @clj149 (and for the reference link)!

👍 3
Alex Miller (Clojure team)20:08:01

New prerelease of Clojure CLI version 1.10.3.949 is now available. The only change in this is an update to all deps (aws api, maven resolver, maven core). I did find one pretty glaring breaking regression in the latest maven core which I suspect will be rolled back in the next release, but it's patched around in tools.deps. One other notable change is that the latest maven core fixes a lot of concurrency issues that were introduced in the prior version (which does coincide with our increase in seeing those issues with the Clojure CLI). So, hopefully, this is better behaved in that respect. Anyways, if anyone wants to try it out, would be grateful for any reports.

cap10morgan20:08:36

I started looking into what it would take to add lein project.clj manifest support to tools.deps.alpha and wanted to see what might or might not be acceptable w/r/t adding additional deps: 1. OK to pull in leiningen-core and use its project.clj reading code? 2. better to reimplement just enough project.clj reading in tools.deps.alpha to get what we need? 3. don't work on this right now because reasons? :)

Alex Miller (Clojure team)20:08:22

2. unsure what the effort/reach of doing this without 1 yields

cap10morgan20:08:33

yeah. it looks like there is potentially a decently-small subset of the project.clj reading code we could copy from leiningen-core b/c we don't need / want e.g. profiles support, etc.

Alex Miller (Clojure team)20:08:26

the impl should look like clojure.tools.deps.alpha.extensions.deps - that's basically the same set of extension methods that need to be implemented (plus adding the manifest-type detector at the top of clojure.tools.deps.alpha.extensions)

cap10morgan20:08:40

yep, makes sense

souenzzo20:08:58

@cap10morgan should be possible to develop somthing like that: deps.edn

{:aliases {:lein {:deps {...lein-deps-connect ...} :fn lein-deps-connect}}}
Then you run clj -X:lein uberjar and it will generate an uberjar following project.clj spec

cap10morgan20:08:34

that's not quite what I'm trying to do

cap10morgan20:08:18

I'm trying to add support to tools-deps so that you can specify a lein-only dependency (most often as a git lib) and it will read from the project.clj (vs. needing to add a pom.xml to the repo)

souenzzo20:08:12

yeah it will be harder.

cap10morgan20:08:47

@alexmiller what is the top level repo I need to build a clojure command w/ my modified tools.deps.alpha?

Alex Miller (Clojure team)21:08:36

the easiest way is to actually NOT do that

Alex Miller (Clojure team)21:08:34

instead, modify your which clojure in the line that starts tools_cp=" to include at the beginning /path/to/your/tools.deps.alpha/src/main/clojure:

Alex Miller (Clojure team)21:08:20

then your own tools.deps source is hooked into your existing clj (make sure to use -Sforce to ensure you're triggering classpath gen)

cap10morgan21:08:16

ah, beautiful. thanks!

cap10morgan23:08:35

Got a first basic cut at project.clj manifest support working: https://clojure.atlassian.net/browse/TDEPS-204