Skip to content

Mark namespace-entry as requiring namespace in the build schema - #8984

Merged
cknitt merged 2 commits into
masterfrom
drift-8970-namespace-entry-schema
Oct 23, 2026
Merged

cknitt merged 2 commits into
masterfrom
drift-8970-namespace-entry-schema

Conversation

@cknitt

@cknitt cknitt commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Fixes #8970.

The schema's namespace-entry description, added in #8835, said "Only has an effect when namespace is enabled." That is how the Rust build system behaves. rescript, which is now the OCaml build system, rejects such a configuration on purpose (field "namespace-entry" requires a namespace, listed under the intentional differences in rewatch-ocaml/README.md).

The description now says that namespace-entry requires namespace. A top-level draft-04 schema dependency also requires a namespace that isn't false whenever namespace-entry is set, so editors flag both configurations that rescript rejects. Checked with ajv (draft-04) on six combinations: without an entry, every namespace value still validates; with an entry, a missing namespace and "namespace": false are invalid, and true or a string is valid. The schema-key tests in both build systems read only properties and definitions, so they are unaffected.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xk6AeCYpCK4SZRtHYKHGoe

The schema said a `namespace-entry` without a namespace has no effect, which
describes the Rust build system; `rescript` rejects such a configuration.
The description now says so, and a `dependencies` rule lets editors flag a
`namespace-entry` without a `namespace` key.

Signed-off-by: Christoph Knittel <ck@cca.io>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xk6AeCYpCK4SZRtHYKHGoe
@github-actions

Copy link
Copy Markdown

Semantic Diff

1 commit · Full page

Mark namespace-entry as requiring namespace in the build schema

1728630 · Christoph Knittel with Claude Opus 5.5 · Oct 23, 2026

The schema said a namespace-entry without a namespace has no effect, which describes the Rust build system; rescript rejects such a configuration. The description now says so, and a dependencies rule lets editors flag a namespace-entry without a namespace key.

@pkg-pr-new

pkg-pr-new Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript@8984

@rescript/belt

npm i https://pkg.pr.new/@rescript/belt@8984

@rescript/darwin-arm64

npm i https://pkg.pr.new/@rescript/darwin-arm64@8984

@rescript/linux-arm64

npm i https://pkg.pr.new/@rescript/linux-arm64@8984

@rescript/linux-x64

npm i https://pkg.pr.new/@rescript/linux-x64@8984

@rescript/runtime

npm i https://pkg.pr.new/@rescript/runtime@8984

@rescript/win32-x64

npm i https://pkg.pr.new/@rescript/win32-x64@8984

commit: 8717742

@github-actions

Copy link
Copy Markdown

@cknitt
cknitt marked this pull request as ready for review October 23, 2026 09:24
@cknitt

cknitt commented Oct 23, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T09:33:50.507925Z 8717742 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 17286307ce

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/docson/build-schema.json Outdated
Codex review: the property dependency accepted `"namespace": false` with a
`namespace-entry`, which `rescript` rejects. The schema dependency now also
requires `namespace` not to be `false`.

Signed-off-by: Christoph Knittel <ck@cca.io>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xk6AeCYpCK4SZRtHYKHGoe
@github-actions

Copy link
Copy Markdown

Semantic Diff

1 new commit (2 total) · Full page

Reject namespace false beside namespace-entry in the build schema

8717742 · Christoph Knittel with Claude Opus 5.5 · Oct 23, 2026

Codex review: the property dependency accepted "namespace": false with a namespace-entry, which rescript rejects. The schema dependency now also requires namespace not to be false.

@cknitt

cknitt commented Oct 23, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 8717742a37

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@cknitt
cknitt requested a review from cristianoc October 23, 2026 09:36
@cknitt
cknitt enabled auto-merge (squash) October 23, 2026 09:36
@cknitt
cknitt merged commit f1eedca into master Oct 23, 2026
26 checks passed
@cknitt
cknitt deleted the drift-8970-namespace-entry-schema branch October 23, 2026 10:50
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.

Build schema says namespace-entry without a namespace has no effect; rescript rejects it

2 participants