OpenLiberty / liberty-language-server

The Liberty Config Language Server provides language server features for Liberty server configuration files through any of the supported client IDEs.
Eclipse Public License 2.0
6 stars 12 forks source link

Generate schema w/ schemaVersion=1.1, outputVersion=2 #189

Closed scottkurz closed 1 year ago

scottkurz commented 1 year ago

Fixes #174 .

Consider this more of a POC than an actual fix. I didn't pay much attention to the main vs. 1.x branch or reworking on top of the latest fix in 1.x. But it at least demonstrates to me the XSD changes desired in #174 would be addressed by merging in these options into our schemaGen invocations.

scottkurz commented 1 year ago

This test fails for me locally..but it fails both running against the HEAD of 'main' and also against my PR

Failed tests: io.openliberty.LibertyCompletionTest.testXSDElementCompletionItem(): expected: <170> but was: <169>

cherylking commented 1 year ago

This test fails for me locally..but it fails both running against the HEAD of 'main' and also against my PR

Failed tests: io.openliberty.LibertyCompletionTest.testXSDElementCompletionItem(): expected: <170> but was: <169>

You need to clear your .lemminx cache in your home/user directory on your machine. Then it will work. This happens when we change the default server.xsd to a newer version. In the future, I think I will include the version in the schema file name to avoid this problem. It means more updates to code, but less problems like this one (and for our customers...I think they would not get the new default schema if they had an older one already).