Skip to content

fix(build): make the plugin structure verification pass on main #645

Description

@Miou-zora

Problem

The plugin scaffolding verification fails on main:

$ xmake scaffold --verify        # xmake plugin --verify before #641
"builder" is not a valid source directory for plugin '.../src/plugin/physics'.
error: One or more issues found in the plugins.

src/plugin/physics/src/builder/ holds VehicleBuilder.hpp (added by #443), but the check in tools/xmake/plugins.lua accepts a source directory only when a directory of the same name exists in tools/xmake/plugins/template/src. The template ships component, event, exception, plugin, resource, scheduler, system and utils — no builder.

So the command is red for every contributor, and it cannot be wired into CI while it stays that way.

What to decide

One of:

  1. Accept the directory. Add builder to the template, if a builder is a category of plugin code the project wants to keep. CLAUDE.md (Plugin internals convention) then lists it as well.
  2. Move the code. VehicleBuilder.hpp becomes part of an approved directory — utils is the closest fit — and the physics plugin keeps only template-approved names.

Option 1 is the smaller change; option 2 keeps the approved list short. Whichever wins, the wiki's plugin structure page and CLAUDE.md should agree with the template afterwards.

Done when

  • xmake scaffold --verify exits 0 on a clean checkout
  • the template, CLAUDE.md and the actual plugin layout agree on the allowed source directories
  • the decision is recorded in the PR description, so the next plugin author knows which way it went

Found while reviewing #641.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbuildEverything related to the build system

    Type

    No type

    Projects

    • Status
      Not planned

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions