-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Reduce our exposure to wildfly-common #45751
Conversation
Also /cc @radcortez |
The methods in |
import static io.smallrye.common.net.HostName.getQualifiedHostName; | ||
import static io.smallrye.common.os.Process.getProcessName; | ||
import static java.util.Collections.emptyList; | ||
import static java.util.Collections.emptyMap; | ||
import static org.wildfly.common.net.HostName.getQualifiedHostName; | ||
import static org.wildfly.common.os.Process.getProcessName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBH, this is what made me think about it. Mostly that it could be counter productive having things depending on both implementations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this makes sense. The main cost is borne by class loading, so every redundant class we don't load is a win even if we still use a couple of classes from the library in the end.
@dmlloyd yeah, in the end, I would like dropping the dependency to wilfly-common except when it's absolutely needed (for instance, when we are using WildFly APIs). FWIW, I added a comment that explains the rationale of this PR. Most of it is noise but what I pointed out might be of interest. |
🎊 PR Preview f22f823 has been successfully built and deployed to https://quarkus-pr-main-45751-preview.surge.sh/version/main/guides/
|
Maybe we can also ban in the build the APIs from WF Common that have an equivalent in SR Common. |
@radcortez we probably could ban some of them. Problem is, you have to be extremely specific as in some cases, you have to use WildFly Common API (for instance when talking to Elytron). Also while we have forbiddenapis enabled in some modules, it's not globally enabled. So I would be in favor of it but I wonder if it's not going to require a lot of investment. Maybe we could try to ban the Net and CPU things from Core + Vert.x + Vert.x HTTP. That would be a good first step. Ideally I would like to drop the dependency from core dependencies (but we will have to wait for JBoss Threads to drop its dependency to it - and I'm perfectly aware that we need to be quite conservative for JBoss Threads). |
Ideally we would only rely on SmallRye Common when we can but: - We have JBoss Threads depending on wildfly-common anyway - We use Locks and Flags which don't have an equivalent in SmallRye Common
9900734
to
513edc3
Compare
@radcortez I pushed an additional commit with some ForbiddenAPIs adjustments. It's still not run everywhere but it should at least improve things in the critical Core modules. We can think a bit more about it and decide if we want to generalize it but it should be done in another PR IMHO. |
Status for workflow
|
Sounds good! |
Status for workflow
|
Ideally we would only rely on SmallRye Common when we can but:
The point of this is that using both might be counter productive if for instance some static fields are initialized. Now I'm not sure exactly what was the plan but SmallRye Common contains more and more elements from wildfly-common.
Draft as this is more to start a discussion than anything else.
/cc @dmlloyd