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

Parse tspconfig as yaml to be able to figure out where errors are #2273

Merged
merged 28 commits into from
Sep 8, 2023

Conversation

timotheeguerin
Copy link
Member

@timotheeguerin timotheeguerin commented Aug 8, 2023

fix #2298
Update yaml parser library from js-yaml to yaml which allow us to have an ast and resolve where values are coming from.

Before

image Now: image

On top of providing error locations for config errors that the compiler can resolve this also setup the base to provide the ability for an emitter to report na error on its emitter options and show where it is.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2023

Changes in this PR will be published to the following url to try(check status of TypeSpec Pull Request Try It pipeline for publish status):
Playground: https://cadlplayground.z22.web.core.windows.net/prs/2273/

Website: https://cadlwebsite.z1.web.core.windows.net/prs/2273/

@timotheeguerin timotheeguerin changed the title Feature/yaml ast Parse tspconfig as yaml to be able to figure out where errors are Aug 8, 2023
@timotheeguerin timotheeguerin marked this pull request as ready for review August 9, 2023 17:58
Copy link
Contributor

@markcowl markcowl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would also be nice to see the impact on typespec-azure

Copy link
Contributor

@markcowl markcowl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please file an uptake PR in Azure/typespec-azure before merging.

@timotheeguerin
Copy link
Member Author

Please file an uptake PR in Azure/typespec-azure before merging.

PR https://github.com/Azure/typespec-azure/pull/3513

@timotheeguerin timotheeguerin merged commit 1098447 into microsoft:main Sep 8, 2023
12 checks passed
@timotheeguerin timotheeguerin deleted the feature/yaml-ast branch September 8, 2023 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Load config yaml as ast to be able to report errors position
3 participants