Xtext LSP - Validation - @Check annotations [message #1850774] |
Wed, 16 March 2022 11:58  |
Eclipse User |
|
|
|
Hello,
It seems @Check annotations used on validation rules are not taking into account by Xtext LSP.
More precisely, It seems all validation rules are considered as @Check(CheckType.FAST), so, for exemple, in VSCode, all validation rules are executed in real-time, even if they have @Check(CheckType.NORMAL).
Do you confirm that ?
Best regards,
|
|
|
|
Re: Xtext LSP - Validation - @Check annotations [message #1850793 is a reply to message #1850776] |
Thu, 17 March 2022 04:09   |
Eclipse User |
|
|
|
Hi Axel and Christian,
I think it is not only about the validations. Since Xtext LS does not distinguish between save and edit, also editing a file will run a normal build and invalidate / rebuild affected resources.
This will be a problem if the LS is going to work with a very large code base. In best case it is just overhead, but if the user changes by mistake a public element (e.g. types by mistake while the cursor is on its name) which lots of cross-references, the LS will rebuilt a lot of resources and create a lot of markers.
Also, for the validations, if expensive validations and lager files exist, that will also be a problem.
For the time being we are working on making the LS save and edit, so that edit does not affect any external resources. Probably later we will take a look at how to optimize the validations.
I do not know how the modifications will look like for sure, but if sensible, we will submit patch.
Regards
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04783 seconds