Skip to content
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

Set proper File Origins for bundled plugins #1121

Merged

Conversation

novotnyr
Copy link
Collaborator

@novotnyr novotnyr commented Jul 15, 2024

Set proper FileOrigins for bundled plugins.

Bundled plugin classes have been incorrectly marked as FileOrigin where they should have been more specifically: as an instance of IdeFileOrigin. This resolves multiple tricky corner-cases where class origins are not reported correctly as a part of the Platform.

This is an extension of #1120.

  • Introduce BundledPlugin as a FileOrigin. This corresponds to an origin of classes that belong to the same bundled plugin. This helps to discriminate between class origins in the verification rules, especially those that detect Platform invocations from Plugin invocations.
  • Allow customizable file origin resolution for JARs and lib directories. These have been originally set to SingleJar or SingleLib. Treating regular plugins and bundled plugins as the same source might not be enough in some scenarios.
  • Create a BundledPluginClassFinder that loads bundled plugin classes with correct origins.
  • Support arbitrary origins for MainClassesLocator that has been hardwired to JARs and libs.
  • Refactor PluginDetailsProviderImpl.
    • Introduce DefaultPluginDetailsProvider that supports bundled plugins with corresponding file origin resolution.
    • Replace all PluginDetailsProviderImpl references with DefaultPluginDetailsProvider as a new bundle-supporting mechanism.

MP-6729

@novotnyr novotnyr merged commit fcae030 into master Jul 17, 2024
6 checks passed
@novotnyr novotnyr deleted the mp-6729-do-not-report-experimental-api-usages-in-bundled-plugins branch July 17, 2024 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants