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

WIP: Plugin Extensions are not detected with ClassLoadingStrategy.APD #453

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wolframhaussig
Copy link
Contributor

solves #449

  • Added Testcase

TODO: fix Bug

The possible solutions I currently see:

  1. PluginClassLoader.getResource
    PluginClassLoader.getResource would have to be aware of the extensions.idx file and always use the plugin way to load the file. Downside: PluginClassLoader would have to be aware of the internals of the storage as adding a new filename would require to change the pluginClassLoader(e.g. adding a NewExtensionStorage which reads from META-INF/new.idx would require that META-INF/new.idx be added to the PluginClassLoader whitelist
  2. LegacyExtensionFinder.readPluginsStorages
    LegacyExtensionFinder.readPluginsStorages would need to be changed from getResourceAsStream to getResources. This way, the extensionFinder would receive all possible URLs and if more than one url is returned it could decide which url to use(e.g. by comparing with plugin.getPluginPath() to get the correct url). This would partially duplicate the logic of the PluginClassLoader but would keep the classes independent.

@decebals What do you think?

@wolframhaussig wolframhaussig marked this pull request as draft June 15, 2021 06:26
@wolframhaussig
Copy link
Contributor Author

I am not entirely happy with the solution yet but I want to get your opinion @decebals : Is this the right way to go?

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.

None yet

1 participant