Skip to content

Add ts_type property to IsOption and EveryIsOption - #956

Merged
alexander-yevsyukov merged 6 commits into
masterfrom
more-language-types
Aug 12, 2026
Merged

Add ts_type property to IsOption and EveryIsOption#956
alexander-yevsyukov merged 6 commits into
masterfrom
more-language-types

Conversation

@alexander-yevsyukov

Copy link
Copy Markdown
Contributor

What

Adds a ts_type string property to the IsOption and EveryIsOption message types in spine/options.proto, telling the name of a TypeScript interface for the annotated message type(s) — the TypeScript counterpart of the existing java_type property:

  • IsOption.ts_type = 2 — the interface the generated message type implements; must exist.
  • EveryIsOption.ts_type = 3 — the common interface for all message types of a file; interplay with the generate flag mirrors java_type.
  • The (is)/(every_is) extension-field docs gain "When targeting TypeScript…" sentences, and both message-level docs now mention ts_type.

Why

Groundwork for TypeScript code generation support in the Spine SDK. No consumer of ts_type exists yet anywhere in the organization; enforcement of the documented constraints (interface must exist, build fails on a nested interface) lands together with the TS codegen.

Notes for reviewers

  • The docs deliberately do not prescribe the base type of a generated interface or any toolchain detail: TypeScript generation is likely to use Buf (protobuf-es) rather than the google-protobuf protoc stack, so implementation specifics stay out of the contract. Rationale is recorded in .agents/memory/project/ts-codegen-via-buf.md.
  • The change is purely additive — fresh field numbers, nothing removed or renumbered.
  • Version note: the branch carries a pre-existing +10 bump (.430.440). Local review flagged that +1 (.431) would match a purely additive change per the version policy — keep .440 if the jump is intended to cover the config/dependency updates floated onto this branch, otherwise it can be re-bumped before merge.
  • The regenerated dependency/license reports are included; the .agents task plan and team memory land in a separate commit for standalone review.

🤖 Generated with Claude Code

alexander-yevsyukov and others added 5 commits August 11, 2026 19:23
The license reports catch up with the version bump to
`2.0.0-SNAPSHOT.440` made earlier on this branch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The new property tells the name of a TypeScript interface for
the annotated message type(s), similarly to the existing
`java_type` property.

The docs deliberately do not prescribe the base type of a generated
interface: the TypeScript toolchain is not settled on Google Protobuf
(`protoc`) — Buf is the likely choice — so implementation details
stay out of the contract.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The new `ts-codegen-via-buf` project memory records that TypeScript
codegen is likely to use Buf, so TS-facing docs in `options.proto`
must stay implementation-neutral.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 11, 2026 19:34
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a TypeScript-oriented counterpart to the existing java_type option metadata in spine/options.proto, as groundwork for upcoming TS code generation, and updates the build/dependency metadata on the branch.

Changes:

  • Add ts_type fields to IsOption and EveryIsOption in base/src/main/proto/spine/options.proto and extend the related option documentation.
  • Bump the published snapshot version to .440 and regenerate dependency/license reports.
  • Update buildSrc dependency definitions (Log4j2 version + SLF4J2 bridge coordinate; introduce Jackson 2.x BOM coordinates and wire them into Boms.Optional).

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
version.gradle.kts Bumps versionToPublish to 2.0.0-SNAPSHOT.440.
docs/dependencies/pom.xml Updates documented dependency-report project version to .440.
docs/dependencies/dependencies.md Regenerates dependency/license report with updated version and timestamp.
buildSrc/src/main/kotlin/io/spine/dependency/lib/Log4j2.kt Updates Log4j2 version and adds log4j-slf4j2-impl coordinate constant.
buildSrc/src/main/kotlin/io/spine/dependency/lib/JacksonV2.kt Introduces Jackson 2.x dependency/BOM coordinates for aligning transitive consumers.
buildSrc/src/main/kotlin/io/spine/dependency/lib/Jackson.kt Updates Jackson docs to reference Jackson 2.x artifacts being declared separately.
buildSrc/src/main/kotlin/io/spine/dependency/boms/Boms.kt Switches Boms.Optional.jackson to point at the Jackson 2.x BOM.
base/src/main/proto/spine/options.proto Adds ts_type to IsOption/EveryIsOption and updates option docs for TypeScript targeting.
.agents/tasks/add-ts-type-option.md Agent task artifact (not reviewed per org policy for .agents/** in consumer repos).
.agents/memory/project/ts-codegen-via-buf.md Agent memory artifact (not reviewed per org policy for .agents/** in consumer repos).
.agents/memory/MEMORY.md Agent memory index update (not reviewed per org policy for .agents/** in consumer repos).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread buildSrc/src/main/kotlin/io/spine/dependency/lib/Jackson.kt
@alexander-yevsyukov alexander-yevsyukov moved this from 🏗 In progress to In Review in v2.0 Aug 11, 2026
@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.01%. Comparing base (233e336) to head (d2514bc).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #956   +/-   ##
=======================================
  Coverage   94.01%   94.01%           
=======================================
  Files         194      194           
  Lines        4177     4177           
  Branches      345      345           
=======================================
  Hits         3927     3927           
  Misses        149      149           
  Partials      101      101           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alexander-yevsyukov
alexander-yevsyukov merged commit 51cb428 into master Aug 12, 2026
9 checks passed
@alexander-yevsyukov
alexander-yevsyukov deleted the more-language-types branch August 12, 2026 09:22
@github-project-automation github-project-automation Bot moved this from In Review to ✅ Done in v2.0 Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants