-
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
ClassLoader and augmentation issues #770
Comments
We shouldn't rely on TCCL IMO. Once the new class loading model is in place, we probably should use build items: one for the extension deployment CL, one for the extension runtime CL, one for the bootstrap CL, and one for the CL used for reflective instrumentation of the original user classes. |
Are we really going towards a model with 4 CL? |
Yes. To be fair though, one of them is the original one that we'd have anyway. |
And one would only be created if an extension were present which needed to do reflection on the app classes. |
Here's a helpful diagram:
|
I love how the world has moved on to super cool looking diagrams with animations, 3D and gradients, and we've been left to play with ascii diagrams :) |
Shit I'm old enough to have started working on Borland C under DOS which looked exactly like this diagram! |
Note that I'm not criticising, I would have used Dia and it would have looked much worse. |
Haha. I saw this program "Monodraw" and wanted to give it a try. |
Depends on #425 |
This solution is pretty bad and should be temporary until a proper solution like quarkusio#770 is implemented
@FroMage is this fixed by the big CL change commit ? |
Yeah, at the very least it clarified how things work. |
For example, Hibernate and Panache enhance entity
Foo
, and Panache then generates aFoo$generated
class, which uses reflection onFoo
to get some info that's hard to get using jandex. It doesn't care if it sees a non-enhanced version of the class, using its class' class loader. But if it uses theTCCL (RuntimeClassLoader
) that will trigger a load of the entity class before thetransformers
have been set and all hell breaks loose later on with really weird failures.And if I don't use the TCCL
shamrock:dev
does not work, for some other reason.We're going ot have to clarify what reflection is allowed during bytecode generation (Hibernate uses it, ASM uses it), and how to avoid these issues of difference between
shamrock:dev
and the normal runner.The text was updated successfully, but these errors were encountered: