Skip to content

[Java] Move @azure-tools/typespec-java to typespec-azure repo - #4591

Merged
Srikanta (srnagar) merged 34 commits into
Azure:mainfrom
srnagar:typespec-java
Jun 30, 2026
Merged

Srikanta (srnagar) merged 34 commits into
Azure:mainfrom
srnagar:typespec-java

Conversation

@srnagar

Copy link
Copy Markdown
Member

No description provided.

@github-actions

github-actions Bot commented Jun 9, 2026 •

Copy link
Copy Markdown
Contributor

⚡ Benchmark Results

⚠️ 10 metric(s) regressed above the +5% threshold:

Metric Baseline Current Change
total 🔴 581.1ms 🔴 692.4ms +19.1% 🔴
loader 🟢 154.2ms 🟢 184.8ms +19.9% 🔴
resolver 🟢 16.3ms 🟢 20.6ms +27.0% 🔴
validation 🟢 44.6ms 🟢 47.4ms +6.3% 🔴
 ↳ linter/@azure-tools/typespec-azure-core/no-header-explode 🟡 18.3ms 🟡 19.4ms +6.2% 🔴
 ↳ linter/@azure-tools/typespec-azure-core/no-query-explode 🟡 17.8ms 🔴 22.4ms +25.6% 🔴
 ↳ linter/@azure-tools/typespec-azure-core/no-response-body 🔴 22.7ms 🔴 25.2ms +10.7% 🔴
 ↳ emit/@azure-tools/typespec-python 🔴 4.04s 🔴 4.26s +5.6% 🔴
 ↳ emit/@typespec/openapi3 🟢 140.9ms 🟢 148.7ms +5.6% 🔴
 ↳ emit/@typespec/openapi3/write 🟢 17.3ms 🟢 19.4ms +12.5% 🔴
Full details – comparing faa5f6d vs baseline 32ff9cc
Metric Baseline Current Change
total 🔴 581.1ms 🔴 692.4ms +19.1% 🔴
loader 🟢 154.2ms 🟢 184.8ms +19.9% 🔴
resolver 🟢 16.3ms 🟢 20.6ms +27.0% 🔴
checker 🟡 223.4ms 🟢 192.9ms -13.7% 🟢
validation 🟢 44.6ms 🟢 47.4ms +6.3% 🔴
 ↳ validation/@azure-tools/typespec-azure-core 🟢 6.2ms 🟢 6.8ms +8.9%
 ↳ validation/@typespec/http 🟢 5.4ms 🟢 5.7ms +7.3%
 ↳ validation/@typespec/rest 🟢 0.5ms 🟢 0.6ms +22.5%
 ↳ validation/@typespec/versioning 🔴 30.7ms 🔴 30.9ms +0.6%
 ↳ validation/compiler 🟢 1.5ms 🟢 1.7ms +13.1%
linter 🟢 134.3ms 🟢 138.6ms +3.2%
 ↳ linter/@azure-tools/typespec-azure-core/auth-required 🟢 0.0ms 🟢 0.0ms +2.6%
 ↳ linter/@azure-tools/typespec-azure-core/bad-record-type 🟢 0.2ms 🟢 0.2ms +14.8%
 ↳ linter/@azure-tools/typespec-azure-core/byos 🟢 6.2ms 🟢 6.3ms +2.4%
 ↳ linter/@azure-tools/typespec-azure-core/casing-style 🟢 0.6ms 🟢 0.6ms +9.2%
 ↳ linter/@azure-tools/typespec-azure-core/composition-over-inheritance 🟢 0.1ms 🟢 0.1ms +3.7%
 ↳ linter/@azure-tools/typespec-azure-core/documentation-required 🟢 0.8ms 🟢 0.9ms +7.9%
 ↳ linter/@azure-tools/typespec-azure-core/friendly-name 🟢 0.5ms 🟢 0.6ms +8.4%
 ↳ linter/@azure-tools/typespec-azure-core/key-visibility-required 🟢 0.2ms 🟢 0.2ms +8.4%
 ↳ linter/@azure-tools/typespec-azure-core/known-encoding 🟢 0.3ms 🟢 0.3ms +11.0%
 ↳ linter/@azure-tools/typespec-azure-core/long-running-polling-operation-required 🟢 0.3ms 🟢 0.3ms +5.0%
 ↳ linter/@azure-tools/typespec-azure-core/no-case-mismatch 🟢 0.2ms 🟢 0.2ms +3.4%
 ↳ linter/@azure-tools/typespec-azure-core/no-closed-literal-union 🟢 0.2ms 🟢 0.3ms +17.2%
 ↳ linter/@azure-tools/typespec-azure-core/no-enum 🟢 0.0ms 🟢 0.0ms +6.6%
 ↳ linter/@azure-tools/typespec-azure-core/no-error-status-codes 🟢 0.1ms 🟢 0.1ms +6.9%
 ↳ linter/@azure-tools/typespec-azure-core/no-explicit-routes-resource-ops 🟢 0.1ms 🟢 0.1ms +5.4%
 ↳ linter/@azure-tools/typespec-azure-core/no-format 🟢 0.5ms 🟢 0.6ms +8.9%
 ↳ linter/@azure-tools/typespec-azure-core/no-generic-numeric 🟢 0.4ms 🟢 0.5ms +17.3%
 ↳ linter/@azure-tools/typespec-azure-core/no-header-explode 🟡 18.3ms 🟡 19.4ms +6.2% 🔴
 ↳ linter/@azure-tools/typespec-azure-core/no-legacy-usage 🟢 1.1ms 🟢 1.2ms +3.2%
 ↳ linter/@azure-tools/typespec-azure-core/no-multiple-discriminator 🟢 0.1ms 🟢 0.1ms +6.4%
 ↳ linter/@azure-tools/typespec-azure-core/no-nullable 🟢 0.2ms 🟢 0.3ms +12.5%
 ↳ linter/@azure-tools/typespec-azure-core/no-offsetdatetime 🟢 1.2ms 🟢 1.2ms +3.2%
 ↳ linter/@azure-tools/typespec-azure-core/no-openapi 🟢 2.0ms 🟢 2.3ms +17.9%
 ↳ linter/@azure-tools/typespec-azure-core/no-private-usage 🟢 1.8ms 🟢 2.0ms +8.8%
 ↳ linter/@azure-tools/typespec-azure-core/no-query-explode 🟡 17.8ms 🔴 22.4ms +25.6% 🔴
 ↳ linter/@azure-tools/typespec-azure-core/no-response-body 🔴 22.7ms 🔴 25.2ms +10.7% 🔴
 ↳ linter/@azure-tools/typespec-azure-core/no-rest-library-interfaces 🟢 0.0ms 🟢 0.0ms +27.9%
 ↳ linter/@azure-tools/typespec-azure-core/no-route-parameter-name-mismatch 🟢 4.8ms 🟢 5.5ms +13.5%
 ↳ linter/@azure-tools/typespec-azure-core/no-rpc-path-params 🟢 0.2ms 🟢 0.2ms +13.4%
 ↳ linter/@azure-tools/typespec-azure-core/no-string-discriminator 🟢 0.0ms 🟢 0.0ms +9.5%
 ↳ linter/@azure-tools/typespec-azure-core/no-unknown 🟢 0.2ms 🟢 0.2ms +5.3%
 ↳ linter/@azure-tools/typespec-azure-core/no-unnamed-union 🟢 0.3ms 🟢 0.4ms +10.7%
 ↳ linter/@azure-tools/typespec-azure-core/operation-missing-api-version 🟢 0.2ms 🟢 0.2ms +11.1%
 ↳ linter/@azure-tools/typespec-azure-core/request-body-problem 🟢 0.3ms 🟢 0.3ms +12.6%
 ↳ linter/@azure-tools/typespec-azure-core/require-versioned 🟢 0.0ms 🟢 0.0ms +16.5%
 ↳ linter/@azure-tools/typespec-azure-core/response-schema-problem 🔴 22.0ms 🔴 22.3ms +1.6%
 ↳ linter/@azure-tools/typespec-azure-core/rpc-operation-request-body 🟢 0.3ms 🟢 0.3ms +5.5%
 ↳ linter/@azure-tools/typespec-azure-core/spread-discriminated-model 🟢 0.2ms 🟢 0.3ms +16.9%
 ↳ linter/@azure-tools/typespec-azure-core/use-standard-names 🟢 5.0ms 🟢 5.6ms +12.2%
 ↳ linter/@azure-tools/typespec-azure-core/use-standard-operations 🟢 0.1ms 🟢 0.1ms +5.5%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-agent-base-type-child-resources 🟢 4.0ms 🟢 3.8ms -3.7%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-agent-base-type-lifecycle-operations 🟢 0.0ms 🟢 0.0ms +3.9%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-common-types-version 🟢 4.3ms 🟢 4.0ms -7.7%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-custom-resource-no-key 🟢 0.1ms 🟢 0.1ms +8.0%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage 🟢 0.1ms 🟢 0.1ms +1.0%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes 🟢 1.1ms 🟢 1.0ms -5.9%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-no-path-casing-conflicts 🟢 4.7ms 🟢 4.6ms -2.1%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-no-record 🟢 0.3ms 🟢 0.4ms +4.6%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-post-operation-response-codes 🟢 0.4ms 🟢 0.4ms -5.9%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes 🟢 0.0ms 🟢 0.0ms +2.2%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-action-no-segment 🟢 0.2ms 🟢 0.2ms +7.6%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-duplicate-property 🟢 0.1ms 🟢 0.1ms +10.4%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator 🟢 0.0ms 🟢 0.0ms +36.3%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-action-verb 🟢 0.1ms 🟢 0.1ms +1.6%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property 🟢 0.1ms 🟢 0.1ms +6.6%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-version-format 🟢 0.0ms 🟢 0.0ms +5.0%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-key-invalid-chars 🟢 0.2ms 🟢 0.2ms +5.2%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-name-pattern 🟢 0.0ms 🟢 0.0ms +5.0%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-operation 🟢 0.2ms 🟢 0.2ms +21.8%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-operation-response 🟢 4.5ms 🟢 4.6ms +1.9%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-patch 🟢 0.3ms 🟢 0.3ms +1.0%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-path-segment-invalid-chars 🟢 0.2ms 🟢 0.2ms +3.7%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state 🟢 0.1ms 🟢 0.1ms +6.6%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/beyond-nesting-levels 🟢 0.1ms 🟢 0.1ms +2.1%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/empty-updateable-properties 🟢 0.1ms 🟢 0.1ms +3.6%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/improper-subscription-list-operation 🟢 0.0ms 🟢 0.0ms +17.4%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/lro-location-header 🟡 13.9ms 🟡 12.7ms -8.6% 🟢
 ↳ linter/@azure-tools/typespec-azure-resource-manager/missing-operations-endpoint 🟢 0.0ms 🟢 0.0ms +0.6%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/missing-x-ms-identifiers 🟢 0.3ms 🟢 0.3ms +14.2%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/no-empty-model 🟢 0.1ms 🟢 0.1ms +7.8%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/no-override-props 🟢 0.1ms 🟢 0.1ms -3.0%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/no-resource-delete-operation 🟢 0.2ms 🟢 0.2ms +8.2%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/no-response-body 🟡 19.8ms 🟡 19.8ms -0.0%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/patch-envelope 🟢 0.1ms 🟢 0.1ms +5.8%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/resource-name 🟢 0.2ms 🟢 0.2ms +6.9%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/secret-prop 🟢 2.3ms 🟢 2.7ms +15.8%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/unsupported-type 🟢 0.4ms 🟢 0.4ms +8.6%
 ↳ linter/@azure-tools/typespec-azure-resource-manager/version-progression 🟢 0.0ms 🟢 0.0ms -4.4%
 ↳ linter/@azure-tools/typespec-client-generator-core/property-name-conflict 🟢 1.0ms 🟢 1.1ms +4.8%
 ↳ linter/@azure-tools/typespec-client-generator-core/require-client-suffix 🟢 0.2ms 🟢 0.2ms +17.9%
emit 🔴 5.28s 🔴 5.49s +3.9%
 ↳ emit/@azure-tools/typespec-autorest 🟢 156.1ms 🟢 161.9ms +3.8%
 ↳ emit/@azure-tools/typespec-python 🔴 4.04s 🔴 4.26s +5.6% 🔴
 ↳ emit/@typespec/http-client-js 🔴 906.8ms 🔴 838.3ms -7.5% 🟢
 ↳ emit/@typespec/openapi3 🟢 140.9ms 🟢 148.7ms +5.6% 🔴
 ↳ emit/@typespec/openapi3/compute 🟢 122.8ms 🟢 127.9ms +4.2%
 ↳ emit/@typespec/openapi3/write 🟢 17.3ms 🟢 19.4ms +12.5% 🔴

Averaged across 3 specs (azure-arm-resource-manager, azure-core-dataplane, azure-full).
Threshold: changes > ±5% are highlighted.
🟢 Fast · 🟡 Moderate (stages >200ms, rules >10ms) · 🔴 Slow (stages >400ms, rules >20ms)

@azure-sdk

Azure SDK Bot (azure-sdk) commented Jun 9, 2026 •

Copy link
Copy Markdown
Collaborator

All changed packages have been documented.

  • ✅ @azure-tools/typespec-java
Show changes

@azure-tools/typespec-java - internal ✏️

[Java] Move @azure-tools/typespec-java to typespec-azure repo

Comment thread .chronus/changes/typespec-java-2026-4-27-21-56-46.md Outdated
Comment thread pnpm-workspace.yaml
Comment thread cspell.yaml
@azure-sdk

Azure SDK Bot (azure-sdk) commented Jun 9, 2026 •

Copy link
Copy Markdown
Collaborator

You can try these changes here

🛝 Playground 🌐 Website

Comment thread pnpm-lock.yaml
Comment thread packages/typespec-java/eng/pipelines/steps/build-typespec.yml Outdated
Comment thread packages/typespec-java/src/typespec-extension/package.json Outdated
Comment thread packages/typespec-java/eng/scripts/Build-Packages.ps1 Outdated
Comment thread packages/typespec-java/src/Generate-TypeSpec.ps1 Outdated
@srnagar
Srikanta (srnagar) added this pull request to the merge queue Jun 30, 2026
Merged via the queue into Azure:main with commit c461ceb Jun 30, 2026
40 of 41 checks passed
@srnagar
Srikanta (srnagar) deleted the typespec-java branch June 30, 2026 06:13
Xiaofei Cao (XiaofeiCao) added a commit that referenced this pull request Jun 30, 2026
…ride #4591)

Overrides the architect's #4591 with this branch's structure, and ports their
typespec-java docs into packages/typespec-java/docs/ (incl. curated generated
sample output linked from samples/readme.md). cspell ignores the ported docs.
Xiaofei Cao (XiaofeiCao) added a commit that referenced this pull request Jun 30, 2026
Restore #4591's chronus entry (the original move), and change our entry from a
'feature' add to an 'internal' note describing the flatten + autorest cleanup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
haiyuan_zhang (haiyuazhang) pushed a commit to haiyuazhang/typespec-azure that referenced this pull request Jul 7, 2026
…zure#4721)

## Summary

Builds on top of Azure#4591 (which moved `@azure-tools/typespec-java` into
this repo). This PR overrides that structure with the source-copy
approach (only `options.ts` is authored here; the rest is copied from
`core/` at build time), flattens the package layout, and removes
autorest.java-specific tooling.

## Layout (`packages/typespec-java/`)

- **(root)** — the published `@azure-tools/typespec-java` package. Only
`src/options.ts` is committed; the rest of the emitter TS is copied from
`core/` at build time (`Copy-Sources.ps1`). `Build-TypeSpec.ps1` applies
`core.patch` (Azure customization), builds `emitter.jar` from core, then
packs.
- **`emitter-tests/`** — standalone npm + Maven Spector suite (excluded
from the pnpm workspace; consumes the packed `.tgz`). Hand-written JUnit
+ `tsp/` specs synced from core via `SyncTests.ps1`; `customization/` is
hand-maintained.
- **`docs/`** — developer/user docs ported from Azure#4591.

## Key points

- **Workspace + catalog:** the emitter is a normal workspace package
using `workspace:^` (in-repo/core deps) and `catalog:` (external), like
the other emitters.
- **Java 11:** the emitter only requires JDK 11; `mise.toml` uses
`microsoft-11` + `maven 3.9.16`.
- **CI:** `.github/workflows/ci-java.yml` builds + runs unit and Spector
tests; `nightly-e2e.yml` adds a Java matrix entry; ADO
`build-for-publish.yml` wires Spector coverage upload.
- **SDK regeneration pipeline removed** — `post-publish-sdk.yaml` /
`sync_sdk.py` / patches will live in the SDK repo instead.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants