Open mikeharder opened 7 months ago
To start:
Parallelize by "top level" spec folder (everything in there running sequentially is "safe"). This can be started in PowerShell and moved to Node.
Next step is to remove the dependency on git
from tsv
as much as possible, since some (most? all?) git commands are not safe to execute in parallel in the same repo.
Compile and Format can:
/tmp/tsv-scratch-[guid]/spec
node_modules
from current npm prefix
to /tmp/tsv-scratch-[guid]/node_modules
.tsp
and prettier
commands against scratch foldergit diff --no-index spec /tmp/tsv-scratch-[guid]/spec
, which should hopefully be threadsafe and just a convenient way to diff two folders, regardless of whether either is in a git repository
git
, we could use a package like https://www.npmjs.com/package/dir-compare. But git diff
presents exactly the information we want to show users with no extra work.--validate-only
to not copy from temp back to repo, which can be used in CI when running TypeSpecValidationAll
, to make the tool more performant and completely threadsafe.
Running
TypeSpecValidation.ps1 -CheckAll
is getting slow due to the number of specs. Potential improvements: