Skip to content

delete the suffix stripping; an explicit name is the only publishing override - #235

Merged
eburgos merged 2 commits into
masterfrom
feat/explicit-name-only
Aug 11, 2026
Merged

delete the suffix stripping; an explicit name is the only publishing override#235
eburgos merged 2 commits into
masterfrom
feat/explicit-name-only

Conversation

@eburgos

@eburgos eburgos commented Aug 11, 2026

Copy link
Copy Markdown
Owner

The name-based strip republished every type whose ident happened to end in the
companion suffix — the trigger was pure spelling, so a consuming workspace
could not name a type XData without it silently publishing as X. Measured
in the consuming workspace: eleven pre-existing types retroactively renamed and
two hard collisions. The one legitimate use, a companion stencil publishing
under its real type's name, is what #[model_schema(name = "...")] already
says explicitly.

The strip is gone from both sides: the naming seam returns the ident unchanged,
and the reference-side strip goes with it. A member key that happened to end in
the suffix was being truncated through the same seam; that ends too.

The override was already authoritative for references — the registry stores the
export name and all three surfaces read it — so a declaration and its
references agree in either declaration order: a forward reference falls back to
the ident, and the renamed item publishes an alias at both spellings.

Module naming stays derived from the ident, deliberately, where the task asked
it to follow the override: an override-named module is one no forward reference
can name, and the measured alternative — a module alias — emits unused-import
warnings in consuming crates wherever nothing forward-references the type,
fixable only by a suppression. The module is a Rust implementation detail; the
name a document publishes is already the override everywhere observable.

What no guard answered before is answered now: two items whose published names
collide are a compile error at the ungated seam, not a silent merge, with an
ident reclaiming its own name never a collision.

The companion-suffix pins are inverted rather than dropped: no surface writes
the shortened name for a suffixed ident, overrides publish and are referenced
under the override for structs, enums and aliases alike, and the self-recursive
untagged enum keeps its deferral under the overridden name.

just fmt, just check, just quick, doctests, just lint-all across all 68
toggles, and the test powerset across all 68 in four partitions — all green.

…override

The name-based strip republished every type whose ident happened to end in the
companion suffix — the trigger was pure spelling, so a consuming workspace
could not name a type `XData` without it silently publishing as `X`. Measured
in the consuming workspace: eleven pre-existing types retroactively renamed and
two hard collisions. The one legitimate use, a companion stencil publishing
under its real type's name, is what `#[model_schema(name = "...")]` already
says explicitly.

The strip is gone from both sides: the naming seam returns the ident unchanged,
and the reference-side strip goes with it. A member key that happened to end in
the suffix was being truncated through the same seam; that ends too.

The override was already authoritative for references — the registry stores the
export name and all three surfaces read it — so a declaration and its
references agree in either declaration order: a forward reference falls back to
the ident, and the renamed item publishes an alias at both spellings.

Module naming stays derived from the ident, deliberately, where the task asked
it to follow the override: an override-named module is one no forward reference
can name, and the measured alternative — a module alias — emits unused-import
warnings in consuming crates wherever nothing forward-references the type,
fixable only by a suppression. The module is a Rust implementation detail; the
name a document publishes is already the override everywhere observable.

What no guard answered before is answered now: two items whose published names
collide are a compile error at the ungated seam, not a silent merge, with an
ident reclaiming its own name never a collision.

The companion-suffix pins are inverted rather than dropped: no surface writes
the shortened name for a suffixed ident, overrides publish and are referenced
under the override for structs, enums and aliases alike, and the self-recursive
untagged enum keeps its deferral under the overridden name.

just fmt, just check, just quick, doctests, just lint-all across all 68
toggles, and the test powerset across all 68 in four partitions — all green.
@eburgos
eburgos merged commit 03fe186 into master Aug 11, 2026
1 check passed
@eburgos
eburgos deleted the feat/explicit-name-only branch August 11, 2026 23:45
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