Tags: iggue/github-copilot-sdk
Tags
# Java codegen: clean output directory before generating to prevent o… …rphan accumulation (github#1623) ## Summary Add a clean step to `java/scripts/codegen/java.ts` that removes the entire generated output directory before writing new files. This ensures that when upstream schema types are renamed or removed, the previously-generated `.java` files are automatically deleted rather than silently accumulating as orphans. ## Changes - **`java/scripts/codegen/java.ts`** — At the start of `main()`, recursively delete `src/generated/java/com/github/copilot/generated/` and recreate the empty directory before invoking any generators. - **`java/src/generated/java/`** — 204 orphan files removed (types no longer emitted by the current schema). These accumulated over multiple `@github/copilot` releases as types were renamed or removed upstream. - **`GeneratedRpcRecordsCoverageTest.java`** — Removed test methods that exercised deleted generated types (`SessionWorkspaceCreateFileParams`, `SessionModeGetResult`, `SessionModeSetResult`, `DiscoveredMcpServerSource`, and 16 others). - **`GeneratedRpcApiCoverageTest.java`** — Removed test method for the deleted `SessionAgentDeselectResult` type. ## Why this works going forward The CI workflow (`java-codegen-check.yml`) runs codegen and then checks `git status --porcelain`. Because codegen now cleans before writing, any future orphans will appear as deletions in the diff and the check will fail — preventing orphan accumulation without any additional workflow changes. Fixes github#1619
# Java codegen: clean output directory before generating to prevent o… …rphan accumulation (github#1623) ## Summary Add a clean step to `java/scripts/codegen/java.ts` that removes the entire generated output directory before writing new files. This ensures that when upstream schema types are renamed or removed, the previously-generated `.java` files are automatically deleted rather than silently accumulating as orphans. ## Changes - **`java/scripts/codegen/java.ts`** — At the start of `main()`, recursively delete `src/generated/java/com/github/copilot/generated/` and recreate the empty directory before invoking any generators. - **`java/src/generated/java/`** — 204 orphan files removed (types no longer emitted by the current schema). These accumulated over multiple `@github/copilot` releases as types were renamed or removed upstream. - **`GeneratedRpcRecordsCoverageTest.java`** — Removed test methods that exercised deleted generated types (`SessionWorkspaceCreateFileParams`, `SessionModeGetResult`, `SessionModeSetResult`, `DiscoveredMcpServerSource`, and 16 others). - **`GeneratedRpcApiCoverageTest.java`** — Removed test method for the deleted `SessionAgentDeselectResult` type. ## Why this works going forward The CI workflow (`java-codegen-check.yml`) runs codegen and then checks `git status --porcelain`. Because codegen now cleans before writing, any future orphans will appear as deletions in the diff and the check will fail — preventing orphan accumulation without any additional workflow changes. Fixes github#1619
# Java codegen: clean output directory before generating to prevent o… …rphan accumulation (github#1623) ## Summary Add a clean step to `java/scripts/codegen/java.ts` that removes the entire generated output directory before writing new files. This ensures that when upstream schema types are renamed or removed, the previously-generated `.java` files are automatically deleted rather than silently accumulating as orphans. ## Changes - **`java/scripts/codegen/java.ts`** — At the start of `main()`, recursively delete `src/generated/java/com/github/copilot/generated/` and recreate the empty directory before invoking any generators. - **`java/src/generated/java/`** — 204 orphan files removed (types no longer emitted by the current schema). These accumulated over multiple `@github/copilot` releases as types were renamed or removed upstream. - **`GeneratedRpcRecordsCoverageTest.java`** — Removed test methods that exercised deleted generated types (`SessionWorkspaceCreateFileParams`, `SessionModeGetResult`, `SessionModeSetResult`, `DiscoveredMcpServerSource`, and 16 others). - **`GeneratedRpcApiCoverageTest.java`** — Removed test method for the deleted `SessionAgentDeselectResult` type. ## Why this works going forward The CI workflow (`java-codegen-check.yml`) runs codegen and then checks `git status --porcelain`. Because codegen now cleans before writing, any future orphans will appear as deletions in the diff and the check will fail — preventing orphan accumulation without any additional workflow changes. Fixes github#1619
Revert "Temporarily use beta versions for "latest" dist-tag (github#1283 )" This reverts commit 4e3dc73.
[maven-release-plugin] copy for tag java/v1.0.0-beta-12-java.1
PreviousNext