Skip to content

Plugin namespace isolation — detect and warn on method collisions #1977

@bpamiri

Description

@bpamiri

Summary

When two plugins provide the same method name for the same mixin target, the last-loaded plugin silently overwrites the first. There is no warning, no error, and no way for plugin authors or users to know this happened.

Current Behavior

In $processMixins(), methods are collected into a struct keyed by method name. StructAppend with overwrite=true means the last plugin wins silently.

Proposed Behavior

  • During $processMixins(), detect when a method name already exists in the mixin collection for the same target
  • In development mode: log a warning listing the collision (plugin A method X overwritten by plugin B method X)
  • In production mode: log at debug level only
  • Optionally (future): allow plugin.json to declare explicit overrides to suppress the warning

Files

  • vendor/wheels/Plugins.cfc:219-274 — modify $processMixins()

Phase

Phase 1 — Cleanup & Foundation (3.x, no breaking changes)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions