lucene icon indicating copy to clipboard operation
lucene copied to clipboard

LUCENE-10202: spatial: feature-variants

Open dsmiley opened this issue 3 years ago • 5 comments

https://issues.apache.org/jira/browse/LUCENE-10202 #11239

TODO on choice of naming RE spherical vs spatial3d

Note: as of this writing, the build doesn't publish the nice Gradle metadata

dsmiley avatar Oct 25 '21 00:10 dsmiley

I spot-checked the generated Maven POMs locally. As expected and according to the Gradle docs, these dependencies showed as optional.

I see something weird though -- this dependency:

    <dependency>
      <groupId>org.apache</groupId>
      <artifactId>lucene-root</artifactId>
      <version>9.0.0-SNAPSHOT</version>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>

This weird lucene-root dependency is only here; it isn't in any of the other Lucene modules. I confirmed this only appears here because of the use of this Gradle feature.

dsmiley avatar Oct 25 '21 00:10 dsmiley

This weird lucene-root dependency is only here; it isn't in any of the other Lucene modules. I confirmed this only appears here because of the use of this Gradle feature.

Things like this is exactly what prevented me from using metadata. If you have a dependency on such a weird-looking artifact and it's not published anywhere, things break (even if it's optional).

dweiss avatar Oct 25 '21 06:10 dweiss

So, in other words - the POMs have to be right. If enabling metadata means we have odd entries in POMs, I'm -1 for adding metadata. The lucene-root dependency may be a result of how palantir works internally too - I'm really not sure and I can't devote any time to look into this (I did in the past, without success).

dweiss avatar Oct 25 '21 06:10 dweiss

Bummer ok. I'll leave this here; not sure if/when I'll get back to it. Sadly the Gradle docs describe no other way to emit your dependencies as optional.

dsmiley avatar Oct 26 '21 03:10 dsmiley

I didn't want to discourage you from trying - maybe the solution is simple, somewhere. I just recall spending a few hours trying to figure out how to make the POMs sane on another project and couldn't do it - turning off gradle metadata was the only way to get the poms right (which I care more than the metadata).

You could try to add those optional blocks by modifying the pom right before it's written. It's hacky but it can be done. https://github.com/apache/lucene/blob/main/gradle/maven/publications-maven.gradle#L65-L75

dweiss avatar Oct 26 '21 05:10 dweiss

This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the [email protected] list. Thank you for your contribution!

github-actions[bot] avatar Jan 09 '24 00:01 github-actions[bot]