new feature: translate core doc references in generated binding docs

オープン
#9,334 コメント 3 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
c, cpp, csharp, go, java, node.js, ocaml, python, rust

調査の方向性

Start with the shared parsers in dev/src/generate/options.rs, capability.rs, and metadata.rs, then inspect the per-binding generators under dev/src/generate/. Reuse the existing Java and .NET translation logic as the initial mapping and rendering cases. Done means generated Capability, Metadata, and options docs use binding-specific names and valid doc syntax without raw Rust paths or intra-doc links.

索引モデルが issue の本文から書いたものです。

説明

bindings/c bindings/cpp bindings/dotnet bindings/go bindings/java bindings/nodejs bindings/ocaml bindings/python enhancement

Drafted with AI assistance (Claude Code, Claude Opus 5.5); the author is accountable for it.

Feature Description

The generators in dev/src/generate/ copy core's doc comments into each binding's Capability, Metadata, and options docs, keeping Rust identifiers, paths, and intra-doc links the binding lacks. I propose a small shared doc post-processor that translates those references into each binding's names.

Problem and Solution

Examples:

  • writeCanCopyFrom says "Writer::copy_from remains available…" in Node.js, Java, .NET, and C.
  • write_with_checksum keeps the raw intra-doc link [crate::WriteChecksum::Any] in every binding; OCaml escapes it as \[crate::WriteChecksum::Any\].
  • Options docs (#9320) say "requires Capability::list_with_start_after" where Node.js exposes listWithStartAfter, and point to crate::layers::SimulateLayer and the auto-simulate Cargo feature.

Today: the shared parsers return raw doc text, and the Capability and Metadata generators pass it through or only escape it. Java and .NET option docs already translate links, each with its own copy (option_javadoc_token, DocContext::path), but not for Capability or Metadata. The website generator drops every sentence containing ::.

Proposed direction: a post-processor next to the shared parsers that:

  1. Parses inline rustdoc markup once: intra-doc links, Markdown links, and code spans.
  2. Resolves known core identifiers (capability fields, metadata accessors, option structs and fields, operation names) through a per-binding naming function, which each binding renders in its own doc syntax ({@link}, <see cref>, code span).
  3. Leaves unknown Rust paths as plain code spans, or drops them where a binding has no equivalent (layers, Cargo features).

The Java and .NET translators would become per-binding naming and rendering on top of the shared parser. Out of scope: rewriting prose; Rust-only sentences stay per-binding overrides, as the Node.js metadata notes do.

Additional Context

Related: #9320, #9122, #9129.

Are you willing to contribute to the development of this feature?
  • Yes, I am willing to contribute to the development of this feature.
主要言語
Rust
スター
5.5k
フォーク
869
平均マージ
8時間 2分
マージ済み PR(30日)
862

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/opendal のほかの issue

apache/opendal の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。