-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Codegen imports unused classes #492
Comments
We would need to use the full name for the Reactive Streams Publisher class and remove it from the import list. |
Another relating issue is: |
Can you give an example of that? |
Origin class import org.jetbrains.annotations.NotNull;
import org.jooq.DSLContext;
import io.github.zero88.jooqx.datatype.DataTypeMapperRegistry;
import io.vertx.codegen.annotations.Fluent;
import io.vertx.codegen.annotations.GenIgnore;
import io.vertx.codegen.annotations.VertxGen;
import io.vertx.core.Vertx;
import io.vertx.sqlclient.Pool;
import io.vertx.sqlclient.Row;
import io.vertx.sqlclient.RowSet;
import io.vertx.sqlclient.Tuple;
/**
* Represents a builder that constructs {@link Jooqx}
*
* @since 2.0.0
*/
@VertxGen
public interface JooqxBuilder extends SQLExecutorBuilder { Generated class import java.util.Map;
import java.util.stream.Collectors;
import io.smallrye.mutiny.Multi;
import io.smallrye.mutiny.Uni;
import java.util.function.Consumer;
import org.reactivestreams.Subscriber;
import org.reactivestreams.Publisher;
import io.smallrye.mutiny.vertx.TypeArg;
import io.vertx.codegen.annotations.Fluent;
import io.smallrye.common.annotation.CheckReturnValue;
import io.github.zero88.jooqx.SQLExecutorBuilder;
import io.github.zero88.jooqx.datatype.DataTypeMapperRegistry;
import org.jooq.DSLContext;
import io.github.zero88.jooqx.SQLErrorConverter;
/**
* Represents a builder that construct {@link io.github.zero88.jooqx.mutiny.Jooqx}
*
* <p/>
* NOTE: This class has been automatically generated from the {@link io.github.zero88.jooqx.JooqxBuilder original} non Mutiny-ified interface using Vert.x codegen.
*/
@io.smallrye.mutiny.vertx.MutinyGen(io.github.zero88.jooqx.JooqxBuilder.class)
public class JooqxBuilder { This issue does not happen with |
Need to change some package interface to public smallrye/smallrye-mutiny-vertx-bindings#492 (comment)
Need to change some package interface to public smallrye/smallrye-mutiny-vertx-bindings#492 (comment)
I will fix the Publisher issue, but the visibility issue is more complex. I've to see what the other generators are doing, but yes, for now, it's a Mutiny generator limitation (do not forget that this generator is very different from the RX ones and does a lot more). Can you open a new issue with to address the visibility issue? |
While I was playing around with the generator, I figured out that for all generated classes the same mandatory imports are generated - no matter what:
smallrye-mutiny-vertx-bindings/vertx-mutiny-generator/src/main/java/io/smallrye/mutiny/vertx/codegen/lang/ImportDeclarationCodeWriter.java
Lines 24 to 34 in dda664c
Unfortunately, I have an interface called
Publisher
which I annotated with@VertxGen
and it clashes withorg.reactivestreams.Publisher
- even if it is not used in the generated class.Any ideas of how to fix this (besides renaming my Interface)?
The text was updated successfully, but these errors were encountered: