Skip to content

Commit 26acde9

Browse files
committed
Fix test failures
1 parent 493b60b commit 26acde9

3 files changed

Lines changed: 27 additions & 6 deletions

File tree

.github/skills/java-coding-skill/SKILL.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
22
name: java-coding-skill
3-
description: "Use this skill whenever editing `*.java` files in the `java/` SDK in order to write idiomatic, well-structured Java code for the Copilot SDK"
3+
description: "Use this skill whenever editing `*.java` files in the `java/` directore of the SDK in order to write idiomatic, well-structured Java code for the Copilot SDK"
44
---
55

66
# Java Coding Skill
77

88
## Core Principles
99

10-
- The SDK is in public preview and may have breaking changes
11-
- Requires Java 17 or later
12-
- Requires GitHub Copilot CLI installed and in PATH
13-
- Uses `CompletableFuture` for all async operations
14-
- Implements `AutoCloseable` for resource cleanup (try-with-resources)
10+
- Requires Java 25 or later for building the jar artifact for Copilot SDK for java.
11+
- Uses the Multi-Relase jar feature JEP 238 https://openjdk.org/jeps/238 with `maven.compiler.release` 17 so that uses running JDK 17 can use the jar.
12+
- Requires GitHub Copilot CLI installed and in PATH.
13+
- Uses `CompletableFuture` for all async operations.
14+
- Implements `AutoCloseable` for resource cleanup (try-with-resources).
1515

1616
## Installation
1717

java/pom.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,26 @@
163163
</plugins>
164164
</pluginManagement>
165165
<plugins>
166+
<plugin>
167+
<groupId>org.apache.maven.plugins</groupId>
168+
<artifactId>maven-clean-plugin</artifactId>
169+
<version>3.4.1</version>
170+
<configuration>
171+
<!--
172+
The E2E test harness spawns Node.js child processes
173+
(npx tsx server.ts) whose CWD is inside
174+
target/copilot-sdk/test/harness/. On macOS, orphaned
175+
node processes can briefly hold file descriptors on
176+
the directory tree after the test JVM exits, causing
177+
the first 'mvn clean' to fail with
178+
"Failed to delete target/copilot-sdk".
179+
180+
retryOnError + retryCount give the OS time to reap
181+
those processes before the clean phase gives up.
182+
-->
183+
<retryOnError>true</retryOnError>
184+
</configuration>
185+
</plugin>
166186
<plugin>
167187
<groupId>org.apache.maven.plugins</groupId>
168188
<artifactId>maven-compiler-plugin</artifactId>

java/src/main/java/module-info.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222

2323
opens com.github.copilot to com.fasterxml.jackson.databind;
2424
opens com.github.copilot.generated to com.fasterxml.jackson.databind;
25+
opens com.github.copilot.generated.rpc to com.fasterxml.jackson.databind;
2526
opens com.github.copilot.rpc to com.fasterxml.jackson.databind;
2627
}

0 commit comments

Comments
 (0)