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

Do not print unexpected attributes to console #338

Open
hendrikvanantwerpen opened this issue Nov 7, 2023 · 0 comments
Open

Do not print unexpected attributes to console #338

hendrikvanantwerpen opened this issue Nov 7, 2023 · 0 comments
Labels
bug Something isn't working tree-sitter-stack-graphs

Comments

@hendrikvanantwerpen
Copy link
Collaborator

TSSG prints warnings to the console if nodes have unexpected attributes defined on them. Printing to the console from a library is bad practice and can break applications using the library. (For example, LSP is often implemented over and stdio connection, and unexpected output breaks that.)

Instead of printing the warnings, we should return them as part of the result, and leave processing them up to the caller.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tree-sitter-stack-graphs
Projects
None yet
Development

No branches or pull requests

1 participant