Skip to content

use "#" instead of "+" as the variant type separator#8

Merged
hugowetterberg merged 1 commit into
mainfrom
feature/variant-separator-change
Mar 6, 2026
Merged

use "#" instead of "+" as the variant type separator#8
hugowetterberg merged 1 commit into
mainfrom
feature/variant-separator-change

Conversation

@hugowetterberg
Copy link
Copy Markdown
Contributor

The "+" separator for document type variants (e.g. "core/article+template") collides with existing compound document types like "core/article+meta" where "+" is already part of the base type name.

Switch to "#" as the separator, borrowing from URL fragment semantics where a fragment refers to "the same resource, but a different view". This makes "core/article#template" unambiguous — the part after "#" is always the variant suffix.

Also removes the obsolete update-test-results.sh and update-entities.sh shell scripts. The CLI no longer has a "document" subcommand, so update-test-results.sh would silently overwrite golden files with empty output. The tests already support regeneration natively via REGENERATE=true.

The "+" separator for document type variants (e.g. "core/article+template")
collides with existing compound document types like "core/article+meta" where
"+" is already part of the base type name.

Switch to "#" as the separator, borrowing from URL fragment semantics where
a fragment refers to "the same resource, but a different view". This makes
"core/article#template" unambiguous — the part after "#" is always the variant
suffix.

Also removes the obsolete update-test-results.sh and update-entities.sh shell
scripts. The CLI no longer has a "document" subcommand, so update-test-results.sh
would silently overwrite golden files with empty output. The tests already support
regeneration natively via REGENERATE=true.
hugowetterberg added a commit to ttab/elephant-repository that referenced this pull request Mar 5, 2026
The "+" variant syntax (e.g. "core/article+template") collides with
existing meta document types like "core/article+meta", causing them to
be incorrectly interpreted as variants.

Switch to "#" as the variant separator (e.g. "core/article#template"),
borrowing from URL fragment semantics of "same resource, but different
representation".

Updates revisor to v0.11.1-pre1 which implements the separator change
in the resolveVariant parsing logic.

See ttab/revisor#8
hugowetterberg added a commit to ttab/elephant-repository that referenced this pull request Mar 5, 2026
The "+" variant syntax (e.g. "core/article+template") collides with
existing meta document types like "core/article+meta", causing them to
be incorrectly interpreted as variants.

Switch to "#" as the variant separator (e.g. "core/article#template"),
borrowing from URL fragment semantics of "same resource, but different
representation".

Updates revisor to v0.11.1-pre1 which implements the separator change
in the resolveVariant parsing logic.

See ttab/revisor#8
@hugowetterberg hugowetterberg marked this pull request as ready for review March 6, 2026 06:47
hugowetterberg added a commit to ttab/elephant-repository that referenced this pull request Mar 6, 2026
The "+" variant syntax (e.g. "core/article+template") collides with
existing meta document types like "core/article+meta", causing them to
be incorrectly interpreted as variants.

Switch to "#" as the variant separator (e.g. "core/article#template"),
borrowing from URL fragment semantics of "same resource, but different
representation".

Updates revisor to v0.11.1-pre1 which implements the separator change
in the resolveVariant parsing logic.

See ttab/revisor#8
hugowetterberg added a commit to ttab/elephant-index that referenced this pull request Mar 6, 2026
The "+" separator for document type variants (e.g. "core/article+template")
collides with existing article meta document types like "core/article+meta"
where "+" is already part of the type name.

Switch to "#" as the variant separator, borrowing from URL fragment semantics
of "same resource, but different view". The index name mapping is unchanged:
"core/article#template" still becomes "core_article--template" in OpenSearch.

Updates the revisor dependency to v0.11.1-pre1 which uses the new separator
(ttab/revisor#8).
Copy link
Copy Markdown

@danijelvukoje danijelvukoje left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@hugowetterberg hugowetterberg merged commit d3036c2 into main Mar 6, 2026
4 checks passed
@hugowetterberg hugowetterberg deleted the feature/variant-separator-change branch March 6, 2026 07:01
hugowetterberg added a commit to ttab/elephant-repository that referenced this pull request Mar 6, 2026
* switch variant separator from "+" to "#"

The "+" variant syntax (e.g. "core/article+template") collides with
existing meta document types like "core/article+meta", causing them to
be incorrectly interpreted as variants.

Switch to "#" as the variant separator (e.g. "core/article#template"),
borrowing from URL fragment semantics of "same resource, but different
representation".

Updates revisor to v0.11.1-pre1 which implements the separator change
in the resolveVariant parsing logic.

See ttab/revisor#8

* update revisor to v0.11.1 release
hugowetterberg added a commit to ttab/elephant-index that referenced this pull request Mar 6, 2026
* use "#" instead of "+" as the document type variant separator

The "+" separator for document type variants (e.g. "core/article+template")
collides with existing article meta document types like "core/article+meta"
where "+" is already part of the type name.

Switch to "#" as the variant separator, borrowing from URL fragment semantics
of "same resource, but different view". The index name mapping is unchanged:
"core/article#template" still becomes "core_article--template" in OpenSearch.

Updates the revisor dependency to v0.11.1-pre1 which uses the new separator
(ttab/revisor#8).

* update revisor to v0.11.1 release
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