Skip to content

refactor(plugins): remove per-package registry singletons and legacy function variables#228

Merged
indaco merged 2 commits intomainfrom
fix/remove-legacy-globals
Mar 11, 2026
Merged

refactor(plugins): remove per-package registry singletons and legacy function variables#228
indaco merged 2 commits intomainfrom
fix/remove-legacy-globals

Conversation

@indaco
Copy link
Copy Markdown
Owner

@indaco indaco commented Mar 11, 2026

Description

Remove legacy global state from the plugin system and command infrastructure. This eliminates per-package registry.go singleton files (dead code superseded by the centralized PluginRegistry) and migrates mutable var XxxFn function variables to plain exported functions, improving testability and removing race condition risks.

Related Issue

  • None

Notes for Reviewers

  • Per-package registries deleted: tagmanager, commitparser, versionvalidator, releasegate, dependencycheck, auditlog, changeloggenerator, changelogparser - none were called from production code
  • FromConfigStruct() moved from auditlog/registry.go to auditlog/config.go (only production-used symbol from deleted files)
  • Function variable migrations:
    • RunPreReleaseHooksFn -> RunPreReleaseHooks
    • FromCommandFn -> FromCommand
    • LoadConfigFn -> LoadConfig
    • SaveConfigFn -> SaveConfig
    • LoadPreReleaseHooksFromConfigFn -> LoadPreReleaseHooksFromConfig
  • Test updates: bump and plugin tests now use PluginRegistry directly instead of overriding per-package GetXxxFn globals

@indaco indaco merged commit b91e1f4 into main Mar 11, 2026
7 checks passed
@indaco indaco deleted the fix/remove-legacy-globals branch March 11, 2026 09:08
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.

1 participant