Skip to content

Enforces Unique Plugin IDs in the Plugin Loader#82

Merged
mdwigley merged 1 commit intoenterlucent:mainfrom
mdwigley:issue#81-mdwigley
Sep 6, 2025
Merged

Enforces Unique Plugin IDs in the Plugin Loader#82
mdwigley merged 1 commit intoenterlucent:mainfrom
mdwigley:issue#81-mdwigley

Conversation

@mdwigley
Copy link
Member

@mdwigley mdwigley commented Sep 6, 2025

Description

This change enhances the plugin loading process by enforcing the uniqueness of PluginID metadata. During plugin grouping, the loader now tracks seen PluginIDs using a HashSet and excludes duplicate plugins, logging a warning for each duplicate detected. This helps prevent ambiguous or conflicting plugin identification that could arise from duplicated PluginIDs across different assemblies.

Related Issue

Motivation and Context

Currently, the plugin loader does not validate or enforce unique PluginIDs, assuming assemblies provide uniqueness implicitly. This assumption can cause conflicts and unpredictable behavior when plugins share IDs. This change aligns the loader behavior with the expected uniqueness constraint, improving robustness and maintainability of the plugin system.

How Has This Been Tested?

The change was tested by loading multiple plugins with both unique and duplicate PluginIDs to verify that duplicates are detected, logged as warnings, and not added multiple times. Existing test methods are expected to be updated for comprehensive validation alongside other relevant PRs.

Screenshots (if appropriate):

  • NA

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Asset change (adds or updates icons, templates, or other assets)
  • Documentation change (adds or updates documentation)
  • Plugin change (adds or updates a plugin)

Checklist:

  • I have read the CONTRIBUTING document.
  • My change requires a change to the core logic.
    • I have linked the project issue above.
  • My change requires a change to the assets.
    • I have linked the asset issue above.
  • My change requires a change to the documentation.
    • I have linked the documentation issue above.
  • My change requires a change to a plugin.
    • I have linked the plugin issue above.

@mdwigley mdwigley self-assigned this Sep 6, 2025
@mdwigley mdwigley added the approved Change issue has been accepted for implementation label Sep 6, 2025
@mdwigley mdwigley moved this to In progress in PlugHub Timeline Sep 6, 2025
@mdwigley mdwigley merged commit a3c77f2 into enterlucent:main Sep 6, 2025
3 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Done in PlugHub Timeline Sep 6, 2025
@mdwigley mdwigley deleted the issue#81-mdwigley branch September 6, 2025 06:05
mdwigley added a commit that referenced this pull request Sep 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Change issue has been accepted for implementation

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Plugin Loader to Enforce Unique Plugin IDs

1 participant