Skip to content

docs: document inherited-array composition - #105

Merged
dakusui merged 2 commits into
mainfrom
codex/array-docs-91
Sep 22, 2026
Merged

dakusui merged 2 commits into
mainfrom
codex/array-docs-91

Conversation

@dakusui

@dakusui dakusui commented Sep 20, 2026

Copy link
Copy Markdown
Owner

Summary

Stacked on #103.

  • records OpenSpec completion and its patch-release decision
  • documents $super and $super* semantics and compatibility
  • adds the v0.0.53 changelog entry

Verification

  • tools/bin/gendoc
  • openspec validate --all --strict

Merge after #103.

@dakusui
dakusui added this pull request to stack #106 September 20, 2026 17:16

@dakusui dakusui left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Review feedback: four documentation issues found. Documentation generation, OpenSpec validation, unit tests, and all 186 autotests otherwise passed locally.

Comment thread CHANGELOG.md Outdated
@@ -0,0 +1,8 @@
# Changelog

## v0.0.53

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

This entry does not match the release history: $super was introduced by commit 621a74b in v0.0.50, not v0.0.53. PR #103 will become v0.0.53, and under the stated merge order this documentation PR first reaches main in v0.0.54. Please backfill the compatibility entry under the release that introduced it, or restructure the entries to match the actual tags.

We are considering enhancing the syntax so that a child can explicitly *append*, *prepend*, or *merge* an array with the one inherited from its ancestors, instead of always replacing it.
This is a future consideration and not yet supported; see https://github.com/dakusui/jqplusplus/issues/74[issue #74] for the tracking discussion.
====
See the link:../reference/syntax-reference.html#array-composition[Syntax Reference] for the marker syntax and its constraints.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Asciidoctor generates the target section as id="_array_composition", while this link targets #array-composition, so it opens the page without navigating to the section. Please add an explicit stable anchor to the target section or link to #_array_composition.


Markers use the reserved `$super` namespace only in direct array-element position.
An unrecognized spelling in that position, or more than one marker in the same array, is an error.
Use `raw:$super` when the literal string `$super` is required as an array element.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

A literal $super* is also interpreted as a marker and must be written as raw:$super*. Please document that escape alongside raw:$super; otherwise the new marker has no documented literal-data form here.


The result is `{ "m": ["a", "b", "z"] }`.

`$super*` keeps the elements before it as a literal prefix and pairs each element after it with the inherited element at the same index.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

The implementation rejects object/atom, array/object, and all other cross-kind pairs, but this reference only describes successful same-kind cases. Please state explicitly that paired elements must have the same kind, with null counted as an atom, so the runtime error is documented.

@dakusui
dakusui force-pushed the codex/array-docs-91 branch from 0db1957 to 5f7cb22 Compare September 21, 2026 02:56
Base automatically changed from codex/super-pair-91 to main September 22, 2026 07:03
@dakusui
dakusui force-pushed the codex/array-docs-91 branch from 5f7cb22 to 9bba565 Compare September 22, 2026 07:03
@dakusui
dakusui merged commit 5cd2fda into main Sep 22, 2026
2 checks passed
@dakusui
dakusui deleted the codex/array-docs-91 branch September 22, 2026 07:05
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