Open mikeharder opened 1 year ago
Yeah thats a good point, on one side I would say it would be nicer if we had a fixed file name to look for but for either options we have to do the same check to see if tspconfig.yml
exists and it also feels a little dumb that we give an error when we can clearly resolve it for the user
We could also simply add an output status line to say tspconfig.yaml
found or not found.
If a spec author accidentally names the config file
tspconfig.yml
instead oftspconfig.yaml
, it can be hard to diagnose. The file is silently ignored, so there is no compiler error, only a warningno emitter was configured
which can be easy to miss.This happened in a PR, and it took me a while to diagnose:
https://github.com/Azure/azure-rest-api-specs-pr/pull/14001
For now, I will be adding a check in TypeSpecValidation to fail if it detects any file named
tspconfig.yml
:https://github.com/Azure/azure-rest-api-specs/issues/25122
Options for
@typespec/compiler
:tspconfig.yml
as equivalent totspconfig.yaml
tspconfig.yml