Skip to content

[typespec-ts] Revert #3938 (migrate generated configs to eng/tsconfigs pattern) and its two dependents#3979

Closed
maorleger wants to merge 4 commits into
Azure:mainfrom
maorleger:revert/3938-tsconfig-migration
Closed

[typespec-ts] Revert #3938 (migrate generated configs to eng/tsconfigs pattern) and its two dependents#3979
maorleger wants to merge 4 commits into
Azure:mainfrom
maorleger:revert/3938-tsconfig-migration

Conversation

@maorleger
Copy link
Copy Markdown
Member

@maorleger maorleger commented May 18, 2026

Resolves #3964

The TL;DR is that since v0.53.0, SDK Validation has been broken for any TypeSpec-based PR in azure-rest-api-specs because the generated warp.config.yml references ./config/tsconfig.src.*.json files that don't actually get emitted on the "update existing package" code path. That's the path SDK automation usually hits, so this affects everyone.

I went back and forth on whether to take #3967 (which patches the symptom by adding the missing builders to the update path) or to just revert the whole thing. I landed on revert for two reasons:

  1. The pre-feat: migrate generated configs to eng/tsconfigs pattern #3938 design was strictly simpler — one builder (buildTsSrcConfig), one template, repo-root ../../../tsconfig.src.*.json references, single linear code path. No new-vs-update fork to keep in sync, and known-good for both new and existing packages.
  2. The eng/tsconfigs alignment goal of feat: migrate generated configs to eng/tsconfigs pattern #3938 is worth doing, but I think it should be reattempted with a cleaner design (single linear path + the consistency test [typespec-ts] Fix missing config/ tsconfig files when updating existing packages #3967 added). That feels safer as a follow-up than as a fast-follow on top of an already-broken release.

I'm open to hearing if there's a reason to keep the #3938 design — but for now this gets us back to a healthy place.

What this PR reverts

Three commits, in dependency order:

Commit PR Why reverted
679311a5 #3943 — Do not generate React Native build targets by default Depends on #3938's split warp targets
813fd759 #3938 — migrate generated configs to eng/tsconfigs pattern Root cause
ab712bd0 #3941 — stop generating vitest.esm.config.ts Depends on #3938's removal of buildVitestConfig("esm")

All 11 unrelated commits between #3938 and HEAD (version bumps, real bug fixes, spector tests, the RestError re-export, etc.) are kept as-is.

Conflict resolution notes

Reverting #3938 surfaced 5 conflicts in regenerated test fixtures under packages/typespec-test/test/.../generated/. They were all about NodeReadableStream (added by #3938) vs RestError/isRestError (added later by unrelated #3930). I kept the RestError/isRestError exports and dropped the NodeReadableStream type alias — that matches what the reverted emitter would actually produce.

Validation

I built the emitter from this branch and ran an end-to-end pipeline (tsp compilepnpm turbo build against a local azure-sdk-for-js) for both code paths:

Spec Path Result
cognitiveservices/CognitiveServices.Management (Azure/azure-rest-api-specs#41922) Update existing package — the case that's failing on main ✅ 19/19 turbo tasks
scvmm/ScVmm.Management (deleted the existing SDK package first to force the new path) New package ✅ 19/19 turbo tasks

I also spot-checked the generated warp.config.yml and it's back to ../../../tsconfig.src.*.json — no ./config/ indirection.

Follow-up

@maorleger maorleger changed the title Revert #3938 (migrate generated configs to eng/tsconfigs pattern) and its two dependents [typespec-ts] Revert #3938 (migrate generated configs to eng/tsconfigs pattern) and its two dependents May 18, 2026
@maorleger maorleger force-pushed the revert/3938-tsconfig-migration branch from 1928f97 to c790323 Compare May 18, 2026 15:04
…iles

The check:tree smoke test failed in CI because three generated index.ts files
had a duplicate `export type { FileContents };` line. Regenerating with the
current emitter removes the duplicate, so commit the cleanup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@maorleger
Copy link
Copy Markdown
Member Author

maorleger commented May 18, 2026

Doing the migration for all packages moves 3000+ files of unnecessary config changes. That's not really great, and we want to simplify all this if we can. I think reverting this change and revisiting with a fresh perspective is the right choice but feel free to disagree!

@maorleger maorleger marked this pull request as ready for review May 18, 2026 16:12
@JialinHuang803
Copy link
Copy Markdown
Member

JialinHuang803 commented May 19, 2026

"#3943 — Do not generate React Native build targets by default" may not relate to #3938 because the react-native build target has been existing in the warp.config since it was introduced in the codegen based on #3802.

And we need to revert the changes on the packages in the sdk repo. Please correct me if my understanding is wrong.

@maorleger
Copy link
Copy Markdown
Member Author

"#3943 — Do not generate React Native build targets by default" may not relate to #3938 because the react-native build target has been existing in the warp.config since it was introduced in the codegen based on #3802.

And we need to revert the changes on the packages in the sdk repo. Please correct me if my understanding is wrong.

Sorry I forgot to close this, you're quite right on both counts - and Jeremy did end up migrating the entire repo so this PR is not even needed. Closing 👍

@maorleger maorleger closed this May 19, 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.

newly generated JS repo flavor packages fail to build

2 participants