Fork me on GitHub
#tools-deps
<
2018-03-15
>
delaguardo12:03:50

Is it possible to redefine local maven repo location with tools-deps?

Alex Miller (Clojure team)12:03:24

Yes, I think the key is :mvn/local-repo

Alex Miller (Clojure team)12:03:37

At the root of deps.edn

delaguardo12:03:43

Cool! thanks. will check this out

mpenet12:03:19

any eta for TDEPS-9, or if another approach is considered for that issue?

mpenet12:03:22

having a blank: what's the way to get a dependency from a subdir in a git repo with multiple dependencies ?

mpenet12:03:49

I think I got that answered a while back, but I can't remember the answer (and well... slack history is not helping)

niclasnilsson12:03:06

Sometimes I wonder how Slack managed to take over the world so much. The history problem sucks for large open things like Clojurians.

seancorfield14:03:23

Off-road topic for this channel -- take it to #community-development if you want to discuss Slack/history/etc.

mpenet12:03:27

it might be :deps/root reading the source

Alex Miller (Clojure team)12:03:48

on TDEPS-9, no eta. I’m consulting right now so only getting a few hrs a week on tdeps. The windows installer is my top priority at the moment, hoping to get that done this week.

delaguardo14:03:38

I found strange bug -

15:24 $ clj -Srepro -Sdeps "{:mvn/local-repo \".m2/repository\"}" -Spom
Downloading: org/clojure/clojure/1.9.0/clojure-1.9.0.pom from 
Downloading: org/clojure/spec.alpha/0.1.143/spec.alpha-0.1.143.pom from 
Downloading: org/clojure/pom.contrib/0.2.2/pom.contrib-0.2.2.pom from 
Downloading: org/clojure/core.specs.alpha/0.1.24/core.specs.alpha-0.1.24.pom from 
Downloading: org/clojure/clojure/1.9.0/clojure-1.9.0.jar from 
Downloading: org/clojure/spec.alpha/0.1.143/spec.alpha-0.1.143.jar from 
Downloading: org/clojure/core.specs.alpha/0.1.24/core.specs.alpha-0.1.24.jar from 
Unknown option: "--config-data"

delaguardo14:03:43

It happens only when I’m trying to regenerate pom.xml file with local-repo

Alex Miller (Clojure team)14:03:28

the local-repo is an absolute path btw, although I don’t think that’s the issue you’re seeing

delaguardo14:03:31

but pom.xml is not generated in that case

Alex Miller (Clojure team)14:03:35

if you can file a jira in https://dev.clojure.org/jira/browse/TDEPS that would be helpful. I can repro locally and I suspect I know where the issue is

Alex Miller (Clojure team)14:03:18

there’s some duplicated code in the make classpath and pom gen stuff and I don’t think the latter was updated the last time the former changed

seancorfield15:03:44

FWIW, that command ultimately becomes this

+ /usr/bin/java -Xmx256m -classpath /usr/local/Cellar/clojure/1.9.0.358/libexec/clojure-tools-1.9.0.358.jar clojure.main -m clojure.tools.deps.alpha.script.generate-manifest --config-files /usr/local/Cellar/clojure/1.9.0.358/deps.edn,deps.edn --gen=pom --config-data '{:mvn/local-repo ".m2/repository"}'
and that's what complains about --config-data

Alex Miller (Clojure team)15:03:17

yeah, I’m aware - the generate-manifest hasn’t tracked changes in make-classpath

mhuebert17:03:43

has anyone seen something like this when running -Spom?

clj -Spom
Error generating pom manifest: called children on a leaf node
java.lang.Exception: called children on a leaf node
	at clojure.zip$children.invokeStatic(zip.clj:80)
	at clojure.zip$append_child.invokeStatic(zip.clj:223)
	at clojure.zip$append_child.invoke(zip.clj:223)
	at clojure.tools.deps.alpha.gen.pom$xml_update$fn__2247.invoke(pom.clj:94)
	at clojure.tools.deps.alpha.gen.pom$xml_update.invokeStatic(pom.clj:87)
	at clojure.tools.deps.alpha.gen.pom$xml_update.invoke(pom.clj:83)
	at clojure.tools.deps.alpha.gen.pom$replace_deps.invokeStatic(pom.clj:98)
	at clojure.tools.deps.alpha.gen.pom$replace_deps.invoke(pom.clj:96)
	at clojure.tools.deps.alpha.gen.pom$sync_pom$fn__2265.invoke(pom.clj:120)
	at clojure.tools.deps.alpha.gen.pom$sync_pom.invokeStatic(pom.clj:117)
	at clojure.tools.deps.alpha.gen.pom$sync_pom.invoke(pom.clj:112)
	at clojure.tools.deps.alpha.script.generate_manifest$_main.invokeStatic(generate_manifest.clj:49)
	at clojure.tools.deps.alpha.script.generate_manifest$_main.doInvoke(generate_manifest.clj:27)

Alex Miller (Clojure team)17:03:25

what’s your existing pom.xml?

Alex Miller (Clojure team)17:03:11

does it have a <dependencies>?

mhuebert17:03:09

yes it does

mhuebert17:03:37

I can run -Spom if I remove the existing pom.xml

Alex Miller (Clojure team)18:03:50

well if you can capture the case when it fails, would be happy to take a ticket for that

Alex Miller (Clojure team)18:03:00

the pom.xml when it fails that is

mhuebert20:03:28

here is a minimal pom.xml which produces the error:

<?xml version="1.0" encoding="UTF-8"?>
<!-- generated by shadow-cljs pom, do not edit -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>editor</groupId>
    <artifactId>editor</artifactId>
    <version>0.0.1</version>
    <name>editor</name>

    <dependencies>
        <dependency>
            <groupId>thheller</groupId>
            <artifactId>shadow-cljs</artifactId>
            <version>2.2.9</version>
        </dependency>
    </dependencies>

</project>

mhuebert20:03:49

I can create a ticket for that if it would be helpful

Alex Miller (Clojure team)20:03:32

yes, also would help to know which jdk you’re using

mhuebert20:03:54

java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

Alex Miller (Clojure team)20:03:56

I also assume you’re using latest clj (`clj -Sverbose`) ?

Alex Miller (Clojure team)20:03:16

k, if I get a chance I’ll look at it tomorrow

Alex Miller (Clojure team)20:03:57

this doesn’t seem much different than everything else I’ve done that works fine so not sure what the deal is

seancorfield21:03:40

Looks like it's the comment that causes problems @mhuebert /cc @alexmiller

Alex Miller (Clojure team)21:03:46

I was just about to say that :)

Alex Miller (Clojure team)21:03:27

there’s an assumption in the code about the doc structure that’s being foiled there

seancorfield21:03:54

If you move the comment inside <project> it's fine. Or delete it.

seancorfield21:03:21

(sorry, it made me too curious to resist trying to figure out what was causing it)

Alex Miller (Clojure team)21:03:46

I will fix it, but that’s a workaround in the meantime