-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Delivery/BuildBuild or test infrastructureBuild or test infrastructure>bugTeam:DeliveryMeta label for Delivery teamMeta label for Delivery team
Description
The fundamental problem that led to #73514 is, I believe, that the compiler assumes that things will all be in the same classloader at runtime, so doesn't need to do anything special to access protected fields from one module in another module where the package names match. This wasn't a valid assumption in this case, we had matching package names in modules in different classloaders at runtime which led to the IllegalAccessException.
We've fixed this one case manually but I believe we should take action to avoid all problems of this nature. A couple of naive ideas:
- Can we inform the compiler that these modules won't be in the same classloader somehow?
- Can we forbid package name clashes across classloaders? Maybe even across modules? We duplicate package names to good effect in tests, but maybe we can be stricter about production code.
Metadata
Metadata
Assignees
Labels
:Delivery/BuildBuild or test infrastructureBuild or test infrastructure>bugTeam:DeliveryMeta label for Delivery teamMeta label for Delivery team