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

Remove --tsp-compile functionality? #72

Open
tjprescott opened this issue Mar 14, 2025 · 2 comments
Open

Remove --tsp-compile functionality? #72

tjprescott opened this issue Mar 14, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@tjprescott
Copy link
Owner

A frequent ask is to make the tool simpler, and currently, the ability to compile TypeSpec as a feature of the tool adds a lot of complexity. The tool actually only compares Swagger, so we could greatly simplify the tool by removing this feature.

Instead users would simply get their Swagger by running a regular tsp command:
tsp compile . --watch --emit=@azure-tools/autorest

Thus, as the TypeSpec is changed, the Swagger is recompiled and you can simply re-run the tool, pointing at the two Swagger locations.

This would also speed up the tool as the TypeSpec compilation seems to be slower when run through the tool than simply running tsp compile . --watch

@tjprescott tjprescott added the enhancement New feature or request label Mar 14, 2025
@pshao25
Copy link

pshao25 commented Mar 17, 2025

I agree this functionality is kind of redundant. But what is the cons if we keep it?

@tjprescott
Copy link
Owner Author

The main downside is complexity and maintenance of the tool. The TypeSpec compilation feature necessitates a bunch of additional flags and conditional logic that could have logic bugs. Additionally, compiling TypeSpec through the tool seems slower than simply compiling it manually (or using tsp compile --watch).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants