Repository navigation
style(protos): use /* ... */ for multi-line comments - #8991
Conversation
Multi-line comments in the .proto files were written as runs of `//` lines, which editors cannot fold. The long design notes in `file2.proto`, `table.proto` and the encoding schemas therefore dominate the files when you are trying to read the schema itself. This converts every multi-line comment run to a `/* text` / ` * text` / ` */` block and adds `ci/check_proto_comments.py` to enforce the style, wired up as a pre-commit hook (with `--fix`) and a new `Protobuf lint` workflow. The layout keeps each content column where the `//` form had it, so protoc extracts identical leading comments and the generated Rust, Python and Java doc comments are unchanged. The only differences are that `///` runs no longer leave a stray `/` at the start of each generated doc line, and two stray trailing spaces are gone. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Important Format specification voteThis PR modifies the Lance format specification, so it requires 3 binding +1 votes from PMC members (excluding the proposer) and a minimum 72-hour voting period, weekends excluded, before it can merge. Vote by approving this PR (+1) or requesting changes (−1, a veto). See the voting process. Status: ❌ Blocked — 1 of 3 required approvals
Updated automatically by the format-spec vote gate, which re-checks every 15 minutes — just voted? Re-check now (press Run workflow; leave the input blank to re-check every open format PR). A PMC member may apply the |
There was a problem hiding this comment.
✅ Gate recommendation: approve.
The conversion improves schema readability while preserving the protobuf wire and file-format contract. Repository-local enforcement is preferable to editor-specific folding settings because it keeps the convention consistent for every contributor.
The multi-line comment style landed with its own pre-commit hook (#8991) while this draft was out for review, and these files predate it. No wording changes; the hook did the rewrite. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The multi-line comment style landed with its own pre-commit hook (#8991) while this draft was out for review, and these files predate it. No wording changes; the hook did the rewrite. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The multi-line comment style landed with its own pre-commit hook (lance-format#8991) while this draft was out for review, and these files predate it. No wording changes; the hook did the rewrite. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Multi-line comments in the
.protofiles were written as runs of//lines, which editors cannot fold. The long design notes infile2.proto,table.protoand the encoding schemas therefore dominate the files when you are trying to read the schema itself.This converts every multi-line comment run to a
/* text/* text/*/block, and adds a check that keeps it that way. We had no protobuf linting before —buf.yamlexists only to publish the module to the BSR, andbuf linthas no rule for comment syntax — so the check is a small script,ci/check_proto_comments.py, wired up as a pre-commit hook (which auto-fixes) and a newProtobuf lintworkflow.No schema field, name or number changes, and no generated code changes: the
/* text/* textlayout keeps each content column exactly where the//form had it, so protoc extracts byte-identical leading comments. I verified this by diffing the--include_source_infodescriptors for every proto before and after. The only differences are two incidental improvements:///runs no longer leave a stray/at the start of each generated doc line, and two stray trailing spaces are gone.Not included
Single-line
//comments are untouched, as are the SPDX headers (license-header-checkrequires those verbatim). Addingbuf lintorbuf breakingto CI would be a separate PR.