Skip to content

Migrate hook namespace + sections to colon delimiter (mxdev 5.3.1+) #74

@jensens

Description

@jensens

Context

mxdev 5.3.1 (PR #88) fixed a long-standing bug where hook namespaces silently swallowed any package whose name merely started with them (e.g. a uv hook claiming uvst.addon). The fix anchored section matching: hook sections must now be named exactly [namespace] or [namespace:subsection] — a colon, because colons cannot appear in Python distribution names.

That broke mxmake. Under 5.3.1, [mxmake-env], [mxmake-mxenv], and every [mxmake-{template}] section is reclassified as a package, then trips ValueError(\"Section mxmake-env has no URL set!\") on the first run.

mxdev 5.3.2 (in PR #89) restores the hyphen form with a deprecation warning, so mxmake keeps working without changes. This issue tracks the eventual migration to the canonical colon syntax.

What's affected in mxmake

With mxdev 5.3.2, all of the above logs a deprecation warning but continues to work.

Suggested migration path

  1. NAMESPACE = \"mxmake-\"NAMESPACE = \"mxmake\"
  2. ns_name(name)f\"mxmake:{name}\" for section names
    • Settings keys inside [settings] (e.g. mxmake-templates, mxmake-test-runner) are unaffected by mxdev's change — they are keys, not section names. Renaming them to mxmake:templates etc. for consistency is optional and would itself need its own deprecation cycle.
  3. Update src/mxmake/templates/mx.ini[mxmake:env], [mxmake:{{ template[\"name\"] }}]
  4. Adjust template generation so both old [mxmake-*] and new [mxmake:*] keys are recognized during the transition (or accept that users must regenerate)
  5. Pin mxdev>=5.3.2 in pyproject.toml (currently >=4.0.2) once mxdev 5.3.2 is released
  6. Add a release-note section documenting the rename for end users — they'll need to either regenerate from a new mxmake or rename [mxmake-*][mxmake:*] in their mx.ini

Severity / urgency

Not urgent: mxdev 5.3.2 keeps everything working with a warning. Migration can be planned for the next mxmake feature release.

Refs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions