Skip to content

ducklink: update to v4.1.1#2201

Closed
zacharywhitley wants to merge 1 commit into
duckdb:mainfrom
tegmentum:ducklink-v4.1.1
Closed

ducklink: update to v4.1.1#2201
zacharywhitley wants to merge 1 commit into
duckdb:mainfrom
tegmentum:ducklink-v4.1.1

Conversation

@zacharywhitley

Copy link
Copy Markdown
Contributor

Additive follow-up to v4.1.0 (currently open as #2199). v4.1.1 lands the wasm custom-section docs bridge: components can ship their own summary / description / example / tags inside the .wasm binary via a duckdb.docs custom section, and ducklink merges them with the catalog docs at query time.

Merge semantics

Per-function, per-field:

  • Component summary / description / example replace the catalog value when present.
  • tags union with the catalog set (catalog order preserved, component-only tags appended).
  • Modules without a section render pure catalog data — no behaviour change for existing components.

Why it exists

Catalog authoring lag is a real thing. This lets third-party component authors keep their own docs authoritative without waiting on a catalog PR to land, while still respecting the catalog as source-of-truth for anything the component doesn't override.

Safety

Non-fatal at every step: missing file / malformed envelope / missing section / invalid JSON / wrong shape all return silently. A broken section can never break LOAD WASM 'name'. Diagnostics go through verbose_log!; no user-facing noise on the happy path.

Implementation

  • New module src/docs_section.rs (~260 lines, unit-tested).
  • Hand-rolled uleb128 wasm scanner — no new dependencies. Walks top-level custom sections plus one level into component-nested core modules.
  • Wired through Engine2::load + build_doc_rows, so the override flows through ducklink.docs, ducklink_search, and ducklink_help uniformly.
  • 32 lib tests pass; release build clean.

PR history

Supersedes:

  • #2199 (v4.1.0, still open) — same code plus the wasm-section reader.
  • #2195 (v4.0.2, closed).
  • #2192 (v4.0.1, closed; transient CI failure on osx_arm64).

Closing #2199 alongside this PR with a supersedes comment.

Additive follow-up to v4.1.0 (currently open as duckdb#2199). v4.1.1 lands
the wasm custom-section docs bridge: components can ship their own
summary / description / example / tags inside the `.wasm` binary via
a `duckdb.docs` custom section, and ducklink merges them with the
catalog docs at query time.

Merge semantics per field: component `summary` / `description` /
`example` REPLACE the catalog values; `tags` UNION with the catalog
set. Modules without a section render pure catalog data — no
behaviour change for existing components.

Non-fatal at every step (missing / malformed / invalid all silently
skip), so a broken section can never break `LOAD WASM 'name'`.
Third-party components can keep their docs authoritative without a
catalog PR.

This PR supersedes duckdb#2199. If either is merged the other's noop
against a v4.1.1 CDN; closing duckdb#2199 with a supersedes comment.
@zacharywhitley

Copy link
Copy Markdown
Contributor Author

Superseded by #2207 (v4.2.0).

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