Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .agents/tasks/938-move-codegen-request-writer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
slug: 938-move-codegen-request-writer
branch: claude/busy-dirac-wwflbm
owner: claude
status: in-progress
started: 2026-06-10
---

## Goal

`io.spine.code.proto.CodeGeneratorRequestWriter` is removed from `base`
(it is protoc-plugin tooling, not runtime API), and the build is green.
Closes [#938](https://github.com/SpineEventEngine/base-libraries/issues/938)
together with the receiving change in `tool-base`.

## Context

- The class moves to the `tool-base` module of the ToolBase repository under
`io.spine.tools.code.proto` (same-named branch there).
- The only consumers are the protoc-plugin entry points of the Compiler and
ProtoTap; they migrate by switching the import once both PRs are published.
- `CodeGeneratorRequestParsingSpec.kt` and `CodeGeneratorRequestsJavaSpec.java`
stay: they test `io.spine.type` parsing APIs which remain in `base`, and the
Java spec still uses the `constructRequest` helper declared in the former.
- Removing public API is a breaking change: the snapshot version advances to
the next multiple of 10.

## Plan

- [x] Remove `base/src/main/kotlin/io/spine/code/proto/CodeGeneratorRequestWriter.kt`.
- [x] Remove `base/src/test/kotlin/io/spine/code/proto/CodeGeneratorRequestWriterSpec.kt`.
- [x] Bump version `2.0.0-SNAPSHOT.404` -> `2.0.0-SNAPSHOT.410` (breaking).
- [ ] `./gradlew build` green; commit regenerated dependency reports if any.
- Blocked in the sandbox: all Spine artifact repositories return 403 for
the buildscript dependency `io.spine.tools:protobuf-setup-plugins`, so
no Gradle build can run here at all. Verification is delegated to PR CI.
- Repo-wide greps confirm no remaining references to the removed class;
the surviving `CodeGeneratorRequest*` specs do not use it.
- [x] Push and open a draft PR; merge after the tool-base PR.

## Log

- 2026-06-10 — drafted; executing autonomously per issue #938.
- 2026-06-10 — removal committed and version bumped; sandbox cannot resolve
Spine snapshot artifacts (403 on all repos), so the build runs on PR CI
instead.
5 changes: 3 additions & 2 deletions .github/workflows/build-on-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ jobs:
with:
submodules: 'true'

- uses: actions/setup-java@v4
- uses: actions/setup-java@v5
with:
java-version: 17
distribution: zulu
cache: gradle

- uses: gradle/actions/setup-gradle@v6

- name: Build project and run tests
shell: bash
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-on-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ jobs:
submodules: recursive
fetch-depth: 0

- uses: actions/setup-java@v4
- uses: actions/setup-java@v5
with:
java-version: 17
distribution: zulu
cache: gradle

- uses: gradle/actions/setup-gradle@v6

# See: https://github.com/al-cheb/configure-pagefile-action
- name: Configure Pagefile
uses: al-cheb/configure-pagefile-action@v1.3

- name: Build project and run tests
shell: cmd
# For the reason on `--no-daemon` see https://github.com/actions/cache/issues/454
run: gradlew.bat build --stacktrace --no-daemon
run: gradlew.bat build --stacktrace

# See: https://github.com/marketplace/actions/junit-report-action
- name: Publish Test Report
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
cancel-in-progress: true
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

# Detect the Hugo site root (`docs/` or `site/`) by looking for a Hugo
# config file. Hugo config may live directly in the site root or in a
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/ensure-reports-updated.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
# Ensures that the license report files were modified in this PR.
#
# The check runs only for pull requests targeting a default (`master`/`main`) or
# a release-line (e.g. `2.x-jdk8-master`) branch. The report files embed the project
# version, so they are refreshed by the branches which bump it. Pull requests
# targeting auxiliary branches are not checked.
#
# The base branch is checked inside the job rather than via the `branches` filter:
# a workflow skipped by branch filtering leaves its check in the `Pending` state,
# blocking PRs which require it, while a job skipped via `if` reports `skipped`,
# which satisfies required status checks.

name: License Reports

on:
pull_request:
branches:
- '**'

jobs:
check:
name: Ensure license reports are updated
runs-on: ubuntu-latest
# Default and release-line branches, e.g. `master`, `main`, `2.x-jdk8-master`.
if: endsWith(github.base_ref, 'master') || endsWith(github.base_ref, 'main')

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
# Configure the checkout of all branches so that it is possible to run the comparison.
fetch-depth: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout latest code
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@v4
25 changes: 18 additions & 7 deletions .github/workflows/increment-guard.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,39 @@
# Ensures that the current lib version is not yet published but executing the Gradle
# Ensures that the current lib version is not yet published by executing the Gradle
# `checkVersionIncrement` task.
#
# The check runs only for pull requests targeting a default (`master`/`main`) or
# a release-line (e.g. `2.x-jdk8-master`) branch. It is the responsibility of a branch
# which aims to merge into such a branch to bump the version. Auxiliary branches
# do not deal with the versions in the release cycle and are not guarded.
#
# The base branch is checked inside the job rather than via the `branches` filter:
# a workflow skipped by branch filtering leaves its check in the `Pending` state,
# blocking PRs which require it, while a job skipped via `if` reports `skipped`,
# which satisfies required status checks.

name: Version Guard

on:
push:
branches:
- '**'
pull_request:

jobs:
check:
name: Check version increment
runs-on: ubuntu-latest
# Default and release-line branches, e.g. `master`, `main`, `2.x-jdk8-master`.
if: endsWith(github.base_ref, 'master') || endsWith(github.base_ref, 'main')

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
submodules: 'true'

- uses: actions/setup-java@v4
- uses: actions/setup-java@v5
with:
java-version: 17
distribution: zulu
cache: gradle

- uses: gradle/actions/setup-gradle@v6

- name: Check version is not yet published
shell: bash
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
submodules: 'true'

- uses: actions/setup-java@v4
- uses: actions/setup-java@v5
with:
java-version: 17
distribution: zulu
cache: gradle

- uses: gradle/actions/setup-gradle@v6

- name: Decrypt CloudRepo credentials
run: ./config/scripts/decrypt.sh "$CLOUDREPO_CREDENTIALS_KEY" ./.github/keys/cloudrepo.properties.gpg ./cloudrepo.properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
outputs:
package-names: ${{ steps.request-package-names.outputs.package-names }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
submodules: 'true'

Expand Down
31 changes: 8 additions & 23 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions base/src/main/java/io/spine/code/proto/FileName.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* Copyright 2022, TeamDev. All rights reserved.
* Copyright 2026, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
* Redistribution and use in source and/or binary forms, with or without
* modification, must retain the above copyright notice and the following
Expand Down Expand Up @@ -105,7 +105,7 @@ private String nameOnly() {
}

/**
* Returns the file name with extension but without path.
* Returns the file name with an extension but without a path.
*/
public String nameWithExtension() {
var fullName = value();
Expand Down

This file was deleted.

Loading
Loading