Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext LSP - Validation - @Check annotations(@Check annotations don't seem to be taken into account by Xtext LSP)
Xtext LSP - Validation - @Check annotations [message #1850774] Wed, 16 March 2022 15:58 Go to next message
Axel RICHARD is currently offline Axel RICHARDFriend
Messages: 43
Registered: September 2010
Location: France
Member
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,


Axel Richard
Obeo
Re: Xtext LSP - Validation - @Check annotations [message #1850776 is a reply to message #1850774] Wed, 16 March 2022 17:48 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
please feels free to file a bug. patches are also welcome.
but i am not sure if we want to distingish between save and edit in lsp


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext LSP - Validation - @Check annotations [message #1850793 is a reply to message #1850776] Thu, 17 March 2022 08:09 Go to previous messageGo to next message
Rubén Porras Campo is currently offline Rubén Porras CampoFriend
Messages: 67
Registered: July 2009
Member
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
Re: Xtext LSP - Validation - @Check annotations [message #1850798 is a reply to message #1850793] Thu, 17 March 2022 09:34 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
can you please create a bug first

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext LSP - Validation - @Check annotations [message #1850806 is a reply to message #1850798] Thu, 17 March 2022 10:25 Go to previous message
Rubén Porras Campo is currently offline Rubén Porras CampoFriend
Messages: 67
Registered: July 2009
Member
I have created https://github.com/eclipse/xtext-core/issues/1859
Previous Topic:Syntax-Error for LessThan-Keyword
Next Topic:Specify output directory of generated classes via configuration
Goto Forum:
  


Current Time: Thu Apr 25 05:47:55 GMT 2024

Powered by FUDForum. Page generated in 0.03078 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top