-
Notifications
You must be signed in to change notification settings - Fork 2
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
[SPIKE] Test validate dataset classes in catalog using LSP #159
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Sajid Alam <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is ready for review, but I left some comments. Using diagnostic is the right direction.
Something to considered:
- The current feature works on opened file, would it makes sense to work on closed file as well? i.e. when I start with a new project, I want to quickly identify all the missing dependencies.
- Once this is done, we need to deprecated the old static YAML schema validation in
package.json
- Bonus: Is there a way to improve the error message to show what's the missing dependencies?
This is looking good already, you may want to add some documentation or screenshot at the end to show how to use this feature. This is definitely a very useful feature!
Final word: as a next step, is it possible to make this functions standalone, so it can be used as a CLI command? This way the VSCode extension can be a consumer of this function, but also keep it opened so it can be used as a CLI command or extend with other tool easily.
Signed-off-by: Sajid Alam <[email protected]>
Hey @noklam, thanks for the feedback! I'm currently working on extending the feature to validate closed files as well. I agree that it would make sense to quickly identify all missing dependencies when starting a new project. I'll also add documentation and include screenshots to demonstrate how to use this new feature. |
Signed-off-by: Sajid Alam <[email protected]>
Signed-off-by: Sajid Alam <[email protected]>
I've implemented validation of closed files but there is a bit of a performance aspect to this. For projects with many files it may take some time to load them all. |
Signed-off-by: Sajid Alam <[email protected]>
Haven't read the code as I am on my phone. It only need to read the relevant files so it shouldn't need to read the entire project. It can make use of the configuration that it only scan the base /local or the selected env |
Signed-off-by: Sajid Alam <[email protected]>
I'd love to do some QA, @SajidAlamQB do you think a |
Absolutely please find it attached here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like @astrojuanlu said, the extension is parsing more files than it needed like pipeline.py
.
In addition, it seems that it is still validating the entries starts with _
I am not sure why but when I rerun this I don't see these error again and it works fine.
I create a PR, it can be merged either with this PR or we can have a separate one to deprecate the old validation with Redhat's YAML extension. |
Related to: #5
This is a spike to test using the lamguage server protocol from pygls to add validation for dataset classes.
How to Use the Feature