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

Account for conflicting plugin names #436

Merged
merged 3 commits into from
Jan 15, 2025

Conversation

tal5
Copy link
Member

@tal5 tal5 commented Oct 23, 2024

Reported on Discord.

Addtions

  • Depenizen.BridgeData record - just holds a bridge supplier & the new class checks.
  • new registerBridge overload that takes a classCheck.

Changes

  • allBridges now stores the new BridgeData, and all relevant methods take/pass it.
  • bridgeData.classCheck is now checked in loadBridge if it exists, and stops loading the bridge if the class isn't found.
  • The Quests bridge now has a class check of me.pikamug.quests.Quests.

@mcmonkey4eva
Copy link
Member

I don't know if I agree with this check - there should be an error here, a plugin registered itself with the same name as a pre-existing decently well known plugin, that is obviously erroneous behavior.
It should be a big shiny red error, telling you somebody fucked up, because they absolutely did.
That said, the original discord report had like 5 duplicate stack traces in a row, and that's a bit excessive. It should just be one clear error, not a cascade. A shiny red glare in the startup logs, not a clusterfuck.

@tal5
Copy link
Member Author

tal5 commented Jan 12, 2025

I don't know if I agree with this check - there should be an error here, a plugin registered itself with the same name as a pre-existing decently well known plugin, that is obviously erroneous behavior. It should be a big shiny red error, telling you somebody fucked up, because they absolutely did. That said, the original discord report had like 5 duplicate stack traces in a row, and that's a bit excessive. It should just be one clear error, not a cascade. A shiny red glare in the startup logs, not a clusterfuck.

Changed it to an error message, lmk if that looks good.

@mcmonkey4eva mcmonkey4eva merged commit 4c22fb0 into DenizenScript:master Jan 15, 2025
1 check passed
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.

2 participants