LuckPerms

LuckPerms

41.4k Downloads

Missing dependency declaration

SlimeDog opened this issue · 9 comments

commented

Spigot 1.15.2 (Jenkins 2596)
LuckPerms 5.0.70

Description
Beginning with Spigot 1.15.2 (Jenkins 2596), missing dependency declarations are reported in the log on server start-up as WARN messages.

Reference: https://hub.spigotmc.org/jira/browse/SPIGOT-5546

The relevant log entry is:

[22:03:03] [Server thread/WARN]: [LuckPerms] Loaded class net.milkbowl.vault.permission.Permission from Vault v1.7.3-b${env.TRAVIS_BUILD_NUMBER} which is not a depend, softdepend or loadbefore of this plugin.

Steps to reproduce the behavior

  • Update Spigot to 1.15.2 latest
  • Start the server
  • Search the log for 'Loaded class'

Expected behavior
Dependencies should be declared in plugin.yml

commented

Then this perhaps is a bug on Spigot's end, considering LP has loadbefore, yet this warn appears?

commented

Seems like it.

commented

No, loadbefore is an inverse softdepend: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/plugin/PluginDescriptionFile.html#getLoadBefore--

Specifying another plugin here is strictly equivalent to having the specified plugin's getSoftDepend() include this plugin.

commented

Not really much I can do about this issue for the time being.

The solution to switching from a loadbefore to a soft-depend will break plugins which integrate with permission plugins by only depending on Vault - this is not a regression I want to have.

I've made some suggestions about how this could be resolved sensibly here: https://hub.spigotmc.org/jira/browse/SPIGOT-5546?focusedCommentId=35859&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-35859

Until such a resolution is added, I guess you can just ignore the warnings.

commented

Tbh. the best solution would be for plugins to properly use the ServiceProvider API rather than in the broken way that the VaultAPI readme specifies. That way all plugins would only need to depend on Vault and the ones that register their own service providers could do so if they want to with every plugin getting the updated ones.

commented

I agree, but understandably, the vast vast majority of plugins have followed the example given by the Vault project when implementing Vault in their plugins.

It's not a problem I'm in a position to fix, so I had to work around it in LuckPerms.

commented

I've added a workaround until a proper solution can be implemented for service provider plugins in Spigot itself.