clojars

http://clojars.org discussion and “support”, see http://status.clojars.org for status.
2021-05-17T12:33:42.059800Z

@borkdude See https://github.com/clojars/clojars-web/wiki/Verified-Group-Names for the full details on the new process, and I'm happy to answer any questions

2021-05-17T12:35:38.061600Z

@seancorfield we may discourage double pushing, since it can lead to issues with having two versions of a jar on the classpath when brought in transitively, where lib A depends on the old name and lib B depends on the new. But we may have a solution to that using Maven's relocation mechanism. I'd love your feedback on that if you have time: https://github.com/clojars/clojars-web/issues/801#issuecomment-841826892

seancorfield 2021-05-17T15:58:08.063200Z

@tcrawley I’d be happy to switch to relocation for any libs that I’m currently double-publishing. I wasn’t planning to double-publish for much longer anyway, given antq is doing a good job spotting the group name “changes”.

alexmiller 2021-05-17T16:31:01.063500Z

well keep in mind relocation won't work for deps/clj yet

2021-05-18T12:03:34.000100Z

That's part of the truth - the other part is folks will push foo/old-lib to com.foo/old-lib, leading to duplication. I'm trying to come up with something that reduces the downstream pains that will cause.

2021-05-17T16:33:38.063600Z

Right - the "relocation" plan is a pom with a relocation stanza and a dependency on the new name, so tooling that doesn't support relocation will still have the new name in the dependency tree. Let me know on that issue if you have concerns with how that will work with deps.

alexmiller 2021-05-17T16:38:16.063800Z

did someone try it? :)

alexmiller 2021-05-17T16:38:48.064Z

it kind of depends on what happens through the maven api in that case - I don't know off the top of my head

2021-05-17T16:40:04.064200Z

Not yet! I haven't looked at the API at all to see how relocation is handled, but assumed if relocation didn't work for tools.deps, the stanza was just being ignored and the pom was being treated as a regular pom. But, well, assumptions.

alexmiller 2021-05-17T16:44:26.064400Z

I wouldn't assume that - I think I just get an exception

alexmiller 2021-05-17T16:56:25.064600Z

from doing a few quick tests, I think the expansion works (finding deps of the relocated artifact), but then it will ask for the jar of the relocated artifact and that just fails with an ArtifactResolutionException (as if the artifact didn't exist, which I guess it doesn't)

alexmiller 2021-05-17T16:57:23.064800Z

without doing some more digging, not sure if I can tell the relocation is why it fails or how to resolve this earlier (I assume there is a way)

alexmiller 2021-05-17T16:57:31.065Z

but I would not assume this will work with deps/clj now

2021-05-17T16:58:06.065200Z

Hmm, if we do this correctly, the jar should exist. Are you saying with a pom that has a dependency on the relocation, it finds that dep, but it is too late in the resolution process to resolve that dep?

alexmiller 2021-05-17T17:07:39.065400Z

I'm simplifying a bit, but there are basically two calls made to the primary Maven API (https://maven.apache.org/resolver/apidocs/org/eclipse/aether/RepositorySystem.html) • readArtifactDescriptor is used to get the deps of the artifact (the pom gets downloaded) • resolveArtifact is used to actually download the jar

alexmiller 2021-05-17T17:08:11.065600Z

I think the first one works but the second one fails (perhaps there is sufficient info in the first result to avoid the failure in the second)

alexmiller 2021-05-17T17:10:25.065800Z

yeah, the result in the first one has a relocations field with that info

alexmiller 2021-05-17T17:12:22.066200Z

that's certainly somewhat inconvenient in the flow :)

alexmiller 2021-05-17T17:24:18.066900Z

Why don’t you just put new things in the new place?

2021-05-17T17:33:40.067100Z

Does the result of the first call not include any dependencies from the pom? > Why don’t you just put new things in the new place? New things are in new places. Folks want consistency in group names, so don't want to have foo/old-lib and com.foo/related-new-lib, and want to have new versions of com.foo/old-lib that is a continuation of foo/old-lib. This may be partially driven by a false stigma that I've introduced with verified groups. The old group will never be verified, so will lack a badge in the UI.

2021-05-17T17:34:08.067300Z

We won't allow relocation of any existing versions

alexmiller 2021-05-17T18:03:48.067500Z

> so don't want to have `foo/old-lib` and `com.foo/related-new-lib`

alexmiller 2021-05-17T18:03:56.067700Z

^^ but isn't that the truth of it?