[typespec-ts] Revert #3938 (migrate generated configs to eng/tsconfigs pattern) and its two dependents#3979
Conversation
1928f97 to
c790323
Compare
…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>
|
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! |
|
"#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 👍 |
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-specsbecause the generatedwarp.config.ymlreferences./config/tsconfig.src.*.jsonfiles 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:
buildTsSrcConfig), one template, repo-root../../../tsconfig.src.*.jsonreferences, single linear code path. No new-vs-update fork to keep in sync, and known-good for both new and existing packages.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:
679311a5813fd759ab712bd0buildVitestConfig("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 aboutNodeReadableStream(added by #3938) vsRestError/isRestError(added later by unrelated #3930). I kept theRestError/isRestErrorexports and dropped theNodeReadableStreamtype 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 compile→pnpm turbo buildagainst a localazure-sdk-for-js) for both code paths:cognitiveservices/CognitiveServices.Management(Azure/azure-rest-api-specs#41922)mainscvmm/ScVmm.Management(deleted the existing SDK package first to force the new path)I also spot-checked the generated
warp.config.ymland it's back to../../../tsconfig.src.*.json— no./config/indirection.Follow-up
warp.config.ymlfor modular operation groups, and rawNodeJS.*types leaking into RLC browser code). Those are unrelated to feat: migrate generated configs to eng/tsconfigs pattern #3938 and I'll file separate issues.