Repository navigation
Add project-level TypeSpec discovery - #47293
Merged
Timothee Guerin (timotheeguerin) merged 4 commits intoOct 15, 2026
Merged
Timothee Guerin (timotheeguerin) merged 4 commits into
Timothee Guerin (timotheeguerin) merged 4 commits into
Conversation
Next Steps to Merge✅ All automated merging requirements have been met! To get your PR merged, see aka.ms/azsdk/specreview/merge.Comment generated by summarize-checks workflow run. |
1 of 9 tasks
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The refactor preserves TSV selection behavior and provides focused coverage for both discovery scopes and filesystem failures.
0 open findings
What changed in this PR
Centralizes TypeSpec project discovery in @azure-tools/specs-shared, preserving TSV behavior while supporting project-scoped SDK tooling.
Changes:
- Adds shared glob and TypeSpec discovery utilities with service/project scopes.
- Migrates TypeSpec Validation to the shared utilities.
- Adds comprehensive discovery tests and documentation.
| File | Description |
|---|---|
.github/shared/src/glob.ts |
Adds shared file globbing. |
.github/shared/src/typespec-projects.ts |
Implements scoped project discovery. |
.github/shared/test/glob.test.ts |
Updates shared glob test setup. |
.github/shared/test/typespec-projects.test.ts |
Tests discovery scopes and failures. |
.github/shared/package.json |
Exports the new modules. |
.github/shared/readme.md |
Documents the shared APIs. |
eng/tools/typespec-validation/src/find-projects.ts |
Delegates discovery to shared helpers. |
eng/tools/typespec-validation/src/run-projects.ts |
Uses shared all-project discovery. |
eng/tools/typespec-validation/src/rules/compile.ts |
Imports the shared glob helper. |
eng/tools/typespec-validation/src/rules/folder-structure.ts |
Imports the shared glob helper. |
eng/tools/typespec-validation/test/compile.test.ts |
Updates the glob test import. |
eng/tools/typespec-validation/test/folder-structure.test.ts |
Updates the glob test import. |
eng/tools/typespec-validation/test/find-projects.test.ts |
Removes tests relocated to shared. |
eng/tools/typespec-validation/test/mocks.ts |
Mocks the shared glob export. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
1 of 9 tasks
Timothee Guerin (timotheeguerin)
changed the base branch from
main
to
timotheeguerin/extract-typespec-project-discovery
October 14, 2026 16:27
Base automatically changed from
timotheeguerin/extract-typespec-project-discovery
to
main
October 15, 2026 12:40
Timothee Guerin (timotheeguerin)
force-pushed
the
timotheeguerin/shared-typespec-project-discovery
branch
from
October 15, 2026 13:57
55d30c6 to
e5b0615
Compare
Timothee Guerin (timotheeguerin)
marked this pull request as ready for review
October 15, 2026 15:44
Timothee Guerin (timotheeguerin)
requested a review
from a team
as a code owner
October 15, 2026 15:44
Timothee Guerin (timotheeguerin)
deleted the
timotheeguerin/shared-typespec-project-discovery
branch
October 15, 2026 15:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ARM (Control Plane) API Specification Update Pull Request
Service-wide discovery is appropriate for TSV but too broad for SDK generation: changing one project would also select unchanged siblings. Add a separate shared helper for project-level discovery, leaving TSV's service-wide selection unchanged.
The helper selects the nearest config in the old layout, or all ancestor configs in the resource-manager/data-plane layout, without selecting unrelated siblings or descendants. Results associate each project with the changed files that selected it, letting SDK callers preserve README pairing without rediscovering projects. Both discovery functions share changed-path-to-service grouping; TSV's selection behavior and caller are unchanged.
Builds on the merged extraction PR #47298. SDK generation reuse is demonstrated separately in #47294.
Tip
Overwhelmed by all this guidance? See the
Getting helpsection at the bottom of this PR description.PR review workflow diagram
Please understand this diagram before proceeding. It explains how to get your PR approved & merged.
Purpose of this PR
What's the purpose of this PR? Check the specific option that applies. This is mandatory!
Due diligence checklist
To merge this PR, you must go through the following checklist and confirm you understood
and followed the instructions by checking all the boxes:
The API-specific checklist below is not applicable to this engineering-only PR.
ARM resource provider contract and
REST guidelines (estimated time: 4 hours).
I understand this is required before I can proceed to the diagram Step 2, "ARM API changes review", for this PR.
Additional information
Viewing API changes
For convenient view of the API changes made by this PR, refer to the URLs provided in the table
in the
Generated ApiViewcomment added to this PR. You can use ApiView to show API versions diff.Suppressing failures
If one or multiple validation error/warning suppression(s) is detected in your PR, please follow the
suppressions guide to get approval.
Getting help
Purpose of this PRandDue diligence checklist.write accessper aka.ms/azsdk/access#request-access-to-rest-api-or-sdk-repositoriesNext Steps to Mergecomment. It will appear within few minutes of submitting this PR and will continue to be up-to-date with current PR state.and https://aka.ms/ci-fix.
queuedstate, please add a comment with contents/azp run.This should result in a new comment denoting a
PR validation pipelinehas started and the checks should be updated after few minutes.