Skip to content

Support custom comment prefixes on schema artifacts - #1296

Merged
jwils merged 1 commit into
mainfrom
joshuaw/schema-artifact-comment-prefix
Jul 7, 2026
Merged

Support custom comment prefixes on schema artifacts#1296
jwils merged 1 commit into
mainfrom
joshuaw/schema-artifact-comment-prefix

Conversation

@jwils

@jwils jwils commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

The generated-file preamble that SchemaArtifact writes has always used # comments, which is only valid for YAML and GraphQL SDL artifacts. Extensions that generate artifacts in other formats need to control the comment syntax — the upcoming elasticgraph-proto_ingestion extension generates a .proto schema artifact, where comments use //.

new_raw_artifact now accepts a comment_prefix keyword (defaulting to #), and SchemaArtifact renders its preamble with the configured prefix.

First of a three-PR sequence introducing elasticgraph-proto_ingestion: this change, then the gem scaffold, then the generation logic.

Base automatically changed from joshuaw/schema-evolution-declarations to main July 7, 2026 16:20
@jwils
jwils force-pushed the joshuaw/schema-artifact-comment-prefix branch from c178c96 to a4d28b4 Compare July 7, 2026 16:22
The generated-file preamble that `SchemaArtifact` writes has always used
`#` comments, which is only valid for YAML and GraphQL SDL artifacts.
Extensions that generate artifacts in other formats (e.g. a `.proto`
schema, where comments use `//`) need to control the comment syntax, so
`new_raw_artifact` now accepts a `comment_prefix` keyword (defaulting to
`#`).
@jwils
jwils force-pushed the joshuaw/schema-artifact-comment-prefix branch from a4d28b4 to e3a237b Compare July 7, 2026 16:23
@jwils
jwils enabled auto-merge (squash) July 7, 2026 16:30
@jwils
jwils merged commit 403204a into main Jul 7, 2026
24 checks passed
@jwils
jwils deleted the joshuaw/schema-artifact-comment-prefix branch July 7, 2026 16:48
jwils added a commit that referenced this pull request Jul 7, 2026
Creates the new `elasticgraph-proto_ingestion` extension gem and wires
it into the repo — bundle/lockfile, RBS collection, docker demo image,
doctest helper, dependency diagrams, and the `run_gem_specs` flatware
list — without any of the Protocol Buffers generation logic yet. The gem
currently just defines its artifact file name constants and an
`APIExtension` entry point that does not customize anything.

Splitting the gem creation out this way keeps the follow-up PR that adds
the actual generation logic (#1080) contained entirely to the gem's own
directory.

Second of a three-PR sequence: #1296 (artifact comment prefixes), this
scaffold, then #1080 (the generation logic).
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.

2 participants