-
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
Add the notion of QuarkusClassLoaderType and avoid potentially creating CLs in LogCapturingOutputFilter #41433
Conversation
That way, it's easier to differentiate the CL, their lifecycle and what they are used for.
And also avoid passing the CuratedApplication here. The problem was noticed when trying to log something in the QuarkusClassLoader constructor. Related to quarkusio#41233
@geoand probably another one for you. The commit messages have more details! |
Makes sense, but I'd like @aloubyansky to also take a look (especially at the first commit) |
I'd be cautious going with enums in this case. I'd probably prefer some int constants and probably even avoid adding |
Mmmmh, do we really consider the QuarkusClassLoader as a fully supported API? I mean a lot of things have to do with our internal CL infrastructure and if we had to make changes, well, we would. I can make the Enum private if it helps. I can understand your issue with the added methods but I mean I need a way to differentiate the class loaders and one that is readable. I don't want to end with Now we could make the method package protected and have an external class that hosts the method and is clearly marked as not being part of the API. If you have a better proposal, I'm interested but I'd like to have some details as to how we makes things usable. |
Is there another place where this could be useful besides I consider |
This also could be addressed by adjusting the names of those methods deprecating the current ones. For example, those that always create a new instance could start with Are you seeing a case when |
@aloubyansky yes I actually did see it happening. It happens when you try to log something from the Now, I can probably rename the methods. TBH I wanted to do that but thought that it might break something somewhere. I will rename the current methods and also expose true getters for this use case. That being said, I don't see |
I kind of agree with you on this one. Although there are public methods in that class that are used in extension code and I suspect not only in the quarkus repo and for a reason. |
These
application.get*ClassLoader()
methods are a bit dangerous because they get or create a class loader.Related to #41233