Skip to content
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/actions/java-test-report/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ runs:
if [ -f "$JACOCO_CSV" ]; then
extract_instruction_scope() {
local scope=$1
awk -F',' -v scope="$scope" -v generated_prefix="com.github.copilot.sdk.generated" '
awk -F',' -v scope="$scope" -v generated_prefix="com.github.copilot.generated" '
NR > 1 {
is_generated = index($2, generated_prefix) == 1
if ((scope == "generated" && is_generated) ||
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/docs-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- 'python/copilot/**'
- 'go/**/*.go'
- 'dotnet/src/**'
- 'java/src/**'
- 'scripts/docs-validation/**'
- '.github/workflows/docs-validation.yml'
workflow_dispatch:
Expand Down Expand Up @@ -126,3 +127,32 @@ jobs:
- name: Extract and validate C#
working-directory: scripts/docs-validation
run: npm run extract && npm run validate:cs

validate-java:
name: "Validate Java"
if: github.event.repository.fork == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- uses: actions/setup-node@v6
with:
node-version: 22

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'

- name: Install SDK to local repo
working-directory: java
run: mvn install -DskipTests -q

- name: Install validation dependencies
working-directory: scripts/docs-validation
run: npm ci

- name: Extract and validate Java
working-directory: scripts/docs-validation
run: npm run extract && npm run validate:java
2 changes: 1 addition & 1 deletion .github/workflows/java-codegen-fix.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ For each attempt:
2. **Read the generated types** to understand what changed. Check the generated files that the handwritten code references:
```bash
# Example: check what a generated type looks like now
cat java/src/generated/java/com/github/copilot/sdk/generated/rpc/<TypeName>.java
cat java/src/generated/java/com/github/copilot/generated/rpc/<TypeName>.java
```

3. **Fix the affected source files.** You may modify files under:
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/scenario-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
- "dotnet/src/**"
- "rust/src/**"
- "rust/Cargo.toml"
- "java/src/**"
- ".github/workflows/scenario-builds.yml"
push:
branches:
Expand Down Expand Up @@ -235,3 +236,46 @@ jobs:
echo -e "Failures:$FAILURES"
exit 1
fi

# ── Java ────────────────────────────────────────────────────────────
build-java:
name: "Java scenarios"
if: github.event.repository.fork == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
cache: "maven"

# Install SDK to local Maven repo so scenarios can resolve it
- name: Install SDK to local repo
working-directory: java
run: mvn install -DskipTests -q

- name: Build all Java scenarios
run: |
PASS=0; FAIL=0; FAILURES=""
for pom in $(find test/scenarios -path '*/java/pom.xml' | sort); do
dir=$(dirname "$pom")
scenario="${dir#test/scenarios/}"
echo "::group::$scenario"
if (cd "$dir" && mvn compile -q 2>&1); then
echo "✅ $scenario"
PASS=$((PASS + 1))
else
echo "❌ $scenario"
FAIL=$((FAIL + 1))
FAILURES="$FAILURES\n $scenario"
fi
echo "::endgroup::"
done
echo ""
echo "Java builds: $PASS passed, $FAIL failed"
if [ "$FAIL" -gt 0 ]; then
echo -e "Failures:$FAILURES"
exit 1
fi
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@
},
"[go]": {
"editor.defaultFormatter": "golang.go"
}
},
"java.configuration.updateBuildConfiguration": "automatic"
}
432 changes: 432 additions & 0 deletions 80-java-monorepo-add-01-remove-before-merge/20260512-prompts.md

Large diffs are not rendered by default.

Loading
Loading