[typespec-java] flatten typespec-java, cleanup autorest related code#4721
[typespec-java] flatten typespec-java, cleanup autorest related code#4721XiaofeiCao wants to merge 28 commits into
Conversation
|
All changed packages have been documented.
Show changes
|
⚡ Benchmark Results
Full details – comparing
|
| Metric | Baseline | Current | Change |
|---|---|---|---|
| total | 🔴 715.2ms | 🔴 1.04s | +45.5% 🔴 |
| loader | 🟡 203.6ms | 🟡 322.2ms | +58.2% 🔴 |
| resolver | 🟢 21.9ms | 🟢 39.6ms | +81.1% 🔴 |
| checker | 🟡 229.7ms | 🟡 372.3ms | +62.1% 🔴 |
| validation | 🟢 52.0ms | 🟢 86.2ms | +65.8% 🔴 |
| ↳ validation/@azure-tools/typespec-azure-core | 🟢 7.6ms | 🟡 13.2ms | +73.2% 🔴 |
| ↳ validation/@typespec/http | 🟢 7.4ms | 🟡 16.0ms | +117.0% 🔴 |
| ↳ validation/@typespec/rest | 🟢 0.8ms | 🟢 1.6ms | +103.3% |
| ↳ validation/@typespec/versioning | 🔴 33.6ms | 🔴 51.5ms | +53.1% 🔴 |
| ↳ validation/compiler | 🟢 2.0ms | 🟢 3.8ms | +87.4% 🔴 |
| linter | 🟢 157.7ms | 🟡 220.6ms | +39.9% 🔴 |
| ↳ linter/@azure-tools/typespec-azure-core/auth-required | 🟢 0.0ms | 🟢 0.1ms | +224.3% |
| ↳ linter/@azure-tools/typespec-azure-core/bad-record-type | 🟢 0.3ms | 🟢 0.6ms | +100.2% |
| ↳ linter/@azure-tools/typespec-azure-core/byos | 🟢 6.5ms | 🟢 8.4ms | +29.4% 🔴 |
| ↳ linter/@azure-tools/typespec-azure-core/casing-style | 🟢 0.8ms | 🟢 1.4ms | +91.9% |
| ↳ linter/@azure-tools/typespec-azure-core/composition-over-inheritance | 🟢 0.1ms | 🟢 0.2ms | +102.1% |
| ↳ linter/@azure-tools/typespec-azure-core/documentation-required | 🟢 1.0ms | 🟢 2.0ms | +89.0% |
| ↳ linter/@azure-tools/typespec-azure-core/friendly-name | 🟢 0.8ms | 🟢 1.4ms | +87.3% |
| ↳ linter/@azure-tools/typespec-azure-core/key-visibility-required | 🟢 0.2ms | 🟢 0.4ms | +88.6% |
| ↳ linter/@azure-tools/typespec-azure-core/known-encoding | 🟢 0.3ms | 🟢 0.5ms | +57.0% |
| ↳ linter/@azure-tools/typespec-azure-core/long-running-polling-operation-required | 🟢 0.4ms | 🟢 0.8ms | +110.9% |
| ↳ linter/@azure-tools/typespec-azure-core/no-case-mismatch | 🟢 0.3ms | 🟢 0.7ms | +117.1% |
| ↳ linter/@azure-tools/typespec-azure-core/no-closed-literal-union | 🟢 0.4ms | 🟢 1.0ms | +143.5% |
| ↳ linter/@azure-tools/typespec-azure-core/no-enum | 🟢 0.1ms | 🟢 0.2ms | +221.3% |
| ↳ linter/@azure-tools/typespec-azure-core/no-error-status-codes | 🟢 0.1ms | 🟢 0.3ms | +119.4% |
| ↳ linter/@azure-tools/typespec-azure-core/no-explicit-routes-resource-ops | 🟢 0.1ms | 🟢 0.2ms | +52.8% |
| ↳ linter/@azure-tools/typespec-azure-core/no-format | 🟢 0.6ms | 🟢 0.8ms | +36.6% |
| ↳ linter/@azure-tools/typespec-azure-core/no-generic-numeric | 🟢 0.5ms | 🟢 0.8ms | +63.0% |
| ↳ linter/@azure-tools/typespec-azure-core/no-header-explode | 🔴 21.1ms | 🔴 27.9ms | +32.1% 🔴 |
| ↳ linter/@azure-tools/typespec-azure-core/no-legacy-usage | 🟢 1.3ms | 🟢 2.0ms | +57.2% |
| ↳ linter/@azure-tools/typespec-azure-core/no-multiple-discriminator | 🟢 0.1ms | 🟢 0.2ms | +122.1% |
| ↳ linter/@azure-tools/typespec-azure-core/no-nullable | 🟢 0.3ms | 🟢 0.4ms | +45.2% |
| ↳ linter/@azure-tools/typespec-azure-core/no-offsetdatetime | 🟢 1.3ms | 🟢 2.0ms | +51.8% |
| ↳ linter/@azure-tools/typespec-azure-core/no-openapi | 🟢 2.1ms | 🟢 2.3ms | +12.1% |
| ↳ linter/@azure-tools/typespec-azure-core/no-private-usage | 🟢 2.2ms | 🟢 3.0ms | +39.8% |
| ↳ linter/@azure-tools/typespec-azure-core/no-query-explode | 🔴 22.4ms | 🔴 29.2ms | +30.3% 🔴 |
| ↳ linter/@azure-tools/typespec-azure-core/no-response-body | 🔴 26.3ms | 🔴 34.2ms | +30.3% 🔴 |
| ↳ linter/@azure-tools/typespec-azure-core/no-rest-library-interfaces | 🟢 0.0ms | 🟢 0.1ms | +201.8% |
| ↳ linter/@azure-tools/typespec-azure-core/no-route-parameter-name-mismatch | 🟢 5.7ms | 🟢 8.0ms | +41.7% 🔴 |
| ↳ linter/@azure-tools/typespec-azure-core/no-rpc-path-params | 🟢 0.2ms | 🟢 0.4ms | +76.3% |
| ↳ linter/@azure-tools/typespec-azure-core/no-string-discriminator | 🟢 0.1ms | 🟢 0.1ms | +137.1% |
| ↳ linter/@azure-tools/typespec-azure-core/no-unknown | 🟢 0.2ms | 🟢 0.4ms | +60.0% |
| ↳ linter/@azure-tools/typespec-azure-core/no-unnamed-union | 🟢 0.4ms | 🟢 0.8ms | +77.5% |
| ↳ linter/@azure-tools/typespec-azure-core/operation-missing-api-version | 🟢 0.2ms | 🟢 0.4ms | +67.1% |
| ↳ linter/@azure-tools/typespec-azure-core/request-body-problem | 🟢 0.3ms | 🟢 0.4ms | +36.6% |
| ↳ linter/@azure-tools/typespec-azure-core/require-versioned | 🟢 0.0ms | 🟢 0.1ms | +269.4% |
| ↳ linter/@azure-tools/typespec-azure-core/response-schema-problem | 🔴 24.5ms | 🔴 33.4ms | +36.3% 🔴 |
| ↳ linter/@azure-tools/typespec-azure-core/rpc-operation-request-body | 🟢 0.4ms | 🟢 0.7ms | +93.2% |
| ↳ linter/@azure-tools/typespec-azure-core/spread-discriminated-model | 🟢 0.3ms | 🟢 0.5ms | +54.9% |
| ↳ linter/@azure-tools/typespec-azure-core/use-standard-names | 🟢 6.0ms | 🟢 7.9ms | +30.1% 🔴 |
| ↳ linter/@azure-tools/typespec-azure-core/use-standard-operations | 🟢 0.1ms | 🟢 0.3ms | +73.5% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-agent-base-type-child-resources | 🟢 6.8ms | 🔴 21.7ms | +221.8% 🔴 |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-agent-base-type-lifecycle-operations | 🟢 0.0ms | 🟢 0.3ms | +520.2% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-common-types-version | 🟢 5.5ms | 🟡 12.4ms | +125.9% 🔴 |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-custom-resource-no-key | 🟢 0.1ms | 🟢 0.2ms | +107.3% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage | 🟢 0.1ms | 🟢 0.1ms | +74.7% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes | 🟢 2.0ms | 🟢 4.6ms | +129.5% 🔴 |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-no-path-casing-conflicts | 🟡 11.9ms | 🟡 17.2ms | +44.0% 🔴 |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-no-record | 🟢 0.4ms | 🟢 0.6ms | +63.4% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-post-operation-response-codes | 🟢 0.7ms | 🟢 1.4ms | +102.8% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes | 🟢 0.0ms | 🟢 0.2ms | +334.7% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-action-no-segment | 🟢 0.3ms | 🟢 0.4ms | +67.8% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-duplicate-property | 🟢 0.2ms | 🟢 0.4ms | +134.2% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator | 🟢 0.0ms | 🟢 0.1ms | +248.6% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-action-verb | 🟢 0.1ms | 🟢 0.2ms | +66.9% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property | 🟢 0.1ms | 🟢 0.3ms | +117.7% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-version-format | 🟢 0.1ms | 🟢 0.2ms | +201.5% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-key-invalid-chars | 🟢 0.3ms | 🟢 0.5ms | +78.7% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-name-pattern | 🟢 0.0ms | 🟢 0.1ms | +311.7% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-operation | 🟢 0.2ms | 🟢 0.6ms | +147.0% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-operation-response | 🟢 5.7ms | 🟢 9.1ms | +59.8% 🔴 |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-patch | 🟢 0.4ms | 🟢 0.8ms | +105.7% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-path-segment-invalid-chars | 🟢 0.2ms | 🟢 0.4ms | +74.7% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state | 🟢 0.2ms | 🟢 0.4ms | +163.4% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/beyond-nesting-levels | 🟢 0.1ms | 🟢 0.2ms | +127.7% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/empty-updateable-properties | 🟢 0.2ms | 🟢 0.4ms | +119.0% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/improper-subscription-list-operation | 🟢 0.0ms | 🟢 0.1ms | +453.1% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/lro-location-header | 🟡 15.1ms | 🔴 20.8ms | +37.2% 🔴 |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/missing-operations-endpoint | 🟢 0.0ms | 🟢 0.1ms | +238.5% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/missing-x-ms-identifiers | 🟢 0.4ms | 🟢 1.0ms | +141.2% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/no-empty-model | 🟢 0.2ms | 🟢 0.3ms | +78.7% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/no-override-props | 🟢 0.1ms | 🟢 0.3ms | +190.3% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/no-resource-delete-operation | 🟢 0.2ms | 🟢 0.5ms | +101.6% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/no-response-body | 🔴 22.2ms | 🔴 31.5ms | +41.6% 🔴 |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/patch-envelope | 🟢 0.2ms | 🟢 0.4ms | +125.9% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/resource-name | 🟢 0.2ms | 🟢 0.5ms | +131.3% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/secret-prop | 🟢 4.3ms | 🟢 5.2ms | +21.1% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/unsupported-type | 🟢 0.4ms | 🟢 0.7ms | +62.4% |
| ↳ linter/@azure-tools/typespec-azure-resource-manager/version-progression | 🟢 0.1ms | 🟢 0.3ms | +288.1% |
| ↳ linter/@azure-tools/typespec-client-generator-core/property-name-conflict | 🟢 1.3ms | 🟢 2.3ms | +76.9% 🔴 |
| ↳ linter/@azure-tools/typespec-client-generator-core/require-client-suffix | 🟢 0.4ms | 🟢 1.6ms | +279.1% 🔴 |
| emit | 🔴 5.63s | 🔴 6.09s | +8.3% 🔴 |
| ↳ emit/@Azure-Tools | 🟢 0.0ms | 🟢 0.0ms | +0.0% |
| ↳ emit/@azure-tools/typespec-autorest | 🟢 89.0ms | 🟢 125.9ms | +41.4% 🔴 |
| ↳ emit/@azure-tools/typespec-python | 🔴 2.15s | 🔴 2.27s | +5.3% 🔴 |
| ↳ emit/@typespec | 🟢 0.0ms | 🟢 0.0ms | +0.0% |
| ↳ emit/@typespec/http-client-js | 🔴 481.1ms | 🔴 577.8ms | +20.1% 🔴 |
| ↳ emit/@typespec/openapi3 | 🟢 80.4ms | 🟢 108.8ms | +35.3% 🔴 |
| ↳ emit/@typespec/openapi3/compute | 🟢 70.1ms | 🟢 94.3ms | +34.6% 🔴 |
| ↳ emit/@typespec/openapi3/write | 🟢 10.1ms | 🟢 14.2ms | +40.4% 🔴 |
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)
Ignore upstream-synced tsp specs, hand-written tests and patches; add 'devcenter' to the dictionary. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
You can try these changes here
|
commit: |
Co-locate with Build-TypeSpec.ps1 and drop the now single-file eng/ directory. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
It only aliased ./Build-TypeSpec.ps1, which CI and Setup.ps1 already call directly. CONTRIBUTING now references the script directly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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>
Match typespec-python and the repo's Node 22 baseline. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| "@azure-rest/core-client": ^2.3.1 | ||
| "@azure-tools/codegen": ~2.10.1 | ||
| "@azure-tools/openai-typespec": "1.11.0" | ||
| "@azure-tools/typespec-liftr-base": "0.14.0" | ||
| "@azure-tools/typespec-liftr-base": ">=0.14.0 <1.0.0" |
There was a problem hiding this comment.
is this one also necessary?
There was a problem hiding this comment.
currently yes. when we do tsp-client generate-config-files in SDK repository, it takes emitter's package.json as argument, hence we need its(along with openai-typespec) appearance.
quick question: for versions in catalog, who's able to update them?
| - "@azure-tools/typespec-java" | ||
| --- | ||
|
|
||
| [Java] Flatten the `typespec-java` emitter folder structure and clean up autorest.java-specific tooling. |
There was a problem hiding this comment.
doesn't matter because its internal but you shouldn't add the package in the scope here or it will get included in the changelog for that package
There was a problem hiding this comment.
could you elaborate? I've tried to remove the package, CI will complain: https://github.com/Azure/typespec-azure/actions/runs/28504252500/job/84488633473?pr=4721
or other than adding new one here, I should update existing one Srikanta added instead?
Summary
Builds on top of #4591 (which moved
@azure-tools/typespec-javainto this repo). This PR overrides that structure with the source-copy approach (onlyoptions.tsis authored here; the rest is copied fromcore/at build time), flattens the package layout, and removes autorest.java-specific tooling.Layout (
packages/typespec-java/)@azure-tools/typespec-javapackage. Onlysrc/options.tsis committed; the rest of the emitter TS is copied fromcore/at build time (Copy-Sources.ps1).Build-TypeSpec.ps1appliescore.patch(Azure customization), buildsemitter.jarfrom 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 viaSyncTests.ps1;customization/is hand-maintained.docs/— developer/user docs ported from [Java] Move@azure-tools/typespec-javatotypespec-azurerepo #4591.Key points
workspace:^(in-repo/core deps) andcatalog:(external), like the other emitters.mise.tomlusesmicrosoft-11+maven 3.9.16..github/workflows/ci-java.ymlbuilds + runs unit and Spector tests;nightly-e2e.ymladds a Java matrix entry; ADObuild-for-publish.ymlwires Spector coverage upload.post-publish-sdk.yaml/sync_sdk.py/ patches will live in the SDK repo instead.