apache / apache/arrow-java

[JAVA] flight-sql-jdbc-driver V16.0.0 shading relocates slf4j dependency

Ouverte
#91 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Java
Étoiles
94
Forks
152
Merge moyen
3 j 16 h
PR mergées (30 j)
11

Description

### Describe the bug, including details regarding any error messages, version, and platform.

When I upgrade to version 16.0.0, suddenly my @Slf4j annotation did no longer work. When I checked for manually creating a LoggerFactory, I noticed that the only imports Intellj could find were unter the path of:
import org.apache.arrow.driver.jdbc.shaded.*;

I then checked the pom.xml of the flight-sql-jdbc-driver and noticed the shading relocations you configured:

https://github.com/apache/arrow/blob/7cd9c6fbd313c9afa0673d85415a84fd199951c9/java/flight/flight-sql-jdbc-driver/pom.xml#L98

```

com.
org.apache.arrow.driver.jdbc.shaded.com.

com.sun.**

org.
org.apache.arrow.driver.jdbc.shaded.org.

org.apache.arrow.driver.jdbc.**
org.apache.arrow.flight.name
org.apache.arrow.flight.version
org.apache.arrow.flight.jdbc-driver.name
org.apache.arrow.flight.jdbc-driver.version

```

I am not an expert on the shading plugin of maven, but it seems to me it moves around all dependencies below the com. and org. pattern. Even if I exclude those dependencies from the flight-sql-jdbc-driver, it does not help.

If I go down to version 15.x.x it works again.

### Component(s)

Java

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez dans java/flight/flight-sql-jdbc-driver/pom.xml, autour des relocations de shading référencées dans l’issue, et comparez la configuration de 16.0.0 avec la version 15.x.x. Vérifiez comment les patterns com. et org. affectent SLF4J et les imports @Slf4j. C’est terminé lorsque le driver ne relocalise plus de manière inattendue la dépendance de logging exposée à l’utilisateur, tout en conservant son shading prévu.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
java
Domaine
build-system
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.