Skip to content

fix: change uv hook namespace - #87

Closed
erral wants to merge 2 commits into
mxstack:mainfrom
erral:uv-namespace
Closed

erral wants to merge 2 commits into
mxstack:mainfrom
erral:uv-namespace

Conversation

@erral

@erral erral commented May 30, 2026

Copy link
Copy Markdown
Contributor

We found out that packages whose name started with uv like uvst.addon or uvxs.addon where not properly handled by the hook.

We have found out that the sections in mx.inifile starting with the same name as the hook's namespace (in this case uv) are reserved for hooks (see).

So we need to change the namespace of our hook in order not to have clashes.

@pbauer

@erral
erral marked this pull request as ready for review May 30, 2026 09:41
@jensens

jensens commented May 31, 2026

Copy link
Copy Markdown
Member

we dont need that one with #88 now merged and released

@jensens jensens closed this May 31, 2026
thet pushed a commit to thet/mxdev that referenced this pull request Sep 28, 2026
Section ownership used an unanchored str.startswith match, so a hook
namespace like "uv" silently classified any section whose name merely
started with "uv" (e.g. uvst.addon, uvxs.addon) as a hook section and
dropped it from the package list - never checked out, never written to
requirements, and with no diagnostic.

Anchor the match: a section belongs to a hook only when its name is
exactly the namespace or is prefixed with "<namespace>:". A colon cannot
occur in a package name, so it unambiguously separates hook sections from
package sections and removes the false-positive class permanently.

This is an alternative to mxstack#87, which worked around the bug by renaming
the uv hook's namespace to "__uv__". Fixing the matching logic instead
keeps the clean "uv" namespace and protects every current and future
hook, not just this one.

Hook config sections previously named [namespace-section] must be renamed
to [namespace:section]; EXTENDING.md updated accordingly. The only known
hook (uv) owns no mx.ini sections, so the practical impact is nil.
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.

2 participants