Skip to content

fix: align vendored TypeSpec stack with Network specs#558

Merged
necusjz merged 2 commits into
Azure:devfrom
huiii99:feat/support-typespec-v1
Jul 7, 2026
Merged

fix: align vendored TypeSpec stack with Network specs#558
necusjz merged 2 commits into
Azure:devfrom
huiii99:feat/support-typespec-v1

Conversation

@huiii99

@huiii99 huiii99 commented Jul 6, 2026

Copy link
Copy Markdown
Member

Browser-side TypeSpec compilation of current Microsoft.Network RPs failed in the workspace editor (invalid-ref / invalid-argument / versioning errors) because the src/typespec submodule was pinned to an old release (compiler 1.4, azure-core 0.60) while the specs are authored against compiler 1.13 / azure-core 0.69.

  • Bump src/typespec submodule b5a28918 -> ca5bc9e0 (nested core -> 8494a66c):
    compiler 1.4->1.13, azure-core 0.60->0.69, ARM/tcgc->0.69
  • pnpm-workspace.yaml: add catalog (+ minimumReleaseAge, onlyBuiltDependencies)
    mirrored from the submodule so pnpm 9 can resolve catalog: specifiers
  • package.json: pin @types/react / @types/react-dom to ^18 via pnpm.overrides
    (pnpm 9.5.0 ignores overrides in pnpm-workspace.yaml)
  • pnpm-lock.yaml: regenerated
  • typespec-aaz/src/convertor.ts: port emitter to azure-core 0.69 paging API
    (getPagedResult/PagedResultMetadata -> getPagingOperation); stricter enum guard
  • typespec-aaz/test/util.ts: drop @useDependency(Azure.ResourceManager.Versions)
    (ARM 0.69 is unversioned)
  • swagger/api/specs.py: treat stat probe failures as "not found" to fix HTTP 500
    on /Swagger/Specs/Stat from over-long resolver paths
  • web/src/typespec/brower-host.ts: treat failed stat as ENOENT so resolution
    continues instead of aborting the compile
  • web/src/typespec/index.ts (+ assertCompiled.test.ts): surface real compiler
    diagnostics instead of the misleading "tsp-output undefined not found"

@necusjz necusjz changed the title fix: align vendored TypeSpec stack with Network specs (compiler 1.13 … fix: align vendored TypeSpec stack with Network specs Jul 6, 2026
@huiii99 huiii99 force-pushed the feat/support-typespec-v1 branch 6 times, most recently from 20bc308 to 4a05221 Compare July 6, 2026 09:04
…/ azure-core 0.69)

ci: bump Node to 22.x for TypeSpec 1.13 submodule (requires node >=22)

ci: bump pnpm to 10.30.2 to match TypeSpec submodule (fixes frozen-lockfile overrides mismatch)

ci: build TypeSpec packages in the submodule workspace

build:typespec previously ran `pnpm -r build` from the repo root, which
pulls the vendored src/typespec packages into the root workspace and
resolves a different @alloy-js/cli + typescript than the submodule pins.
That mismatch makes `alloy build` (emitter-framework, tspd, http-client*)
crash with `ts.sys` undefined. Building with `pnpm -C src/typespec -r`
uses the submodule's own resolution, where alloy builds correctly; the
turbo monorepo root and the doc websites are excluded, and typespec-aaz
is built separately afterwards. Verified: full build + pnpm bundle
succeed with compiler 1.13 / azure-core 0.69 libs present.
@huiii99 huiii99 force-pushed the feat/support-typespec-v1 branch from 4a05221 to 156e896 Compare July 6, 2026 11:08
- convertor: don't fabricate nextLinkName="nextLink" for continuationToken
  paging; leave it empty so downstream emits no pager instead of a broken one
- package.json: add engines (node>=22, pnpm>=10) matching the vendored
  TypeSpec 1.13 submodule requirement
- docs: bump local dev prerequisites to Node 22+ / pnpm 10+
- pnpm-workspace: document minimumReleaseAge CI time-window behavior and add
  TODO to drop the @alloy-js/cli typescript packageExtensions hack upstream
@necusjz necusjz marked this pull request as ready for review July 7, 2026 04:10

@necusjz necusjz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@necusjz necusjz merged commit 03e5901 into Azure:dev Jul 7, 2026
6 checks passed
@necusjz necusjz mentioned this pull request Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants