Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TypeSpec Validation] Determine specs to validate by following imports #25544

Closed
mikeharder opened this issue Aug 25, 2023 · 1 comment
Closed
Assignees
Labels
Spec PR Tools Tooling that runs in azure-rest-api-specs repo.

Comments

@mikeharder
Copy link
Member

Currently, Get-TypeSpec-Folders.ps1 validates all specs under folder specification/foo, when any file under this folder is changed. This is required to handle cases where specs use shared files from other folders. Specs are currently forbidden from importing files outside their top-level folder under specification, so this is a pretty good heuristic.

However, some folders are getting large enough this may be too course of a metric. An example is specification/cognitive, as shown in this run:

https://dev.azure.com/azure-sdk/internal/_build/results?buildId=3030757&view=logs&j=52599800-cfcd-5615-dd98-137d26e8cb9a&t=c0acbdc7-6ccc-5699-6c3a-c41428f73fe2&l=63

We might be able to improve Get-TypeSpec-Folders.ps1 by trying to analyze code, like the imports in *.ts files, or the settings in tsconfig.yaml, to determine exactly which specs might be impacted by changed files.

@ckairen
Copy link
Member

ckairen commented Apr 1, 2024

@ckairen ckairen closed this as completed Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Spec PR Tools Tooling that runs in azure-rest-api-specs repo.
Projects
Status: 🎊 Closed
Development

No branches or pull requests

3 participants