-
Notifications
You must be signed in to change notification settings - Fork 116
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
Update to LemMinX-Maven 0.11.1 #1692
Conversation
e761458
to
f3174be
Compare
@mickaelistria, @laeubi any idea, why the |
@HannesWell are the adjustment of the test class required here due to the update? If not I would revert those as a first step. |
One test complains:
so maybe the test is not happy about the warnings? |
@HannesWell I have now tried to test this and with a local m2e I see no (language server) error markers generated when I open it in a "pure" maven project, but maybe it is intentional, if I open it with |
Are those real Maven errors reported by the LS, or just some XML syntax stuff? |
I also support that the test shouldn't be changed with the update of lemminx-maven if possible. |
It looks like XML validation errors, I think the best would be to bring this testcase to lemminx-maven to see if it fails there to @mickaelistria can you suggest a test for testing diagnostic reports, I'll try to create one then. |
Okay I noticed that lemminx has actually a test for it |
If lemminx-maven was released, it can be assumed to work. |
@szarnekow can you probably have a look here? if I manually raise the versions in lemminx-maven the test still runs (even though some other can't work due to changed API) |
According to your comment, it seems to me that the issue is more that the version of lemminx embedded in Wild Web Developer is not compatible with this release of lemminx-maven. |
I've checked and my former comment is incorrect: both Wild Web Developer and LemMinX-Maven do include/require the same 0.27 version of lemminx. So it doesn't look like an inconsistency in here. |
The only changes are my ones and dependency updates, but its hard to guess if WWD is/could be affected... |
Does one of your change in lemminx-maven require a new version of the resolver, newer than what m2e includes and injects in lemminx together with lemminx-maven? |
My changes should be 100% backward compatibile, the only thing I could think of is maybe maven API version I'm using the |
How does m2e inject maven to leminx?!? |
It seems to be the constant, I have no clue why it compiles / run in lemminx-maven but fails at m2e.... if I recompile with the deprecated one everything works. |
MavenRuntimeClasspathProvider resolves the list of jars that are added to LemMinX's classpath.
Maybe LemMinX-Maven tests uses a different version of Maven that what is in m2e? |
Then it might be that m2e uses an outdated maven-embedder jar I still don't understand why the compiler is not inline this compile time constant! |
They are not, but as written above they don't influence the test-failure.
Is eclipse-lemminx/lemminx-maven#526 related? |
I think i found it here: This all is really a bit unfortunate as the forked process seems to use a flat classpath and therefore did not notice if anything is missing even though it is declared on the OSGi level... also it sounds strange that m2e gives jars to the language server if it already seem to be a standalone process why does it not using its own? |
IIRC, the goal was to save some ~30MB, but if it appears that it's overall better to have lemminx-maven come with its own Maven jars despite the extra resource cost, it would be OK to do it. |
I think another option would be to run the server in a (isolated) OSGi framework, that way it can simply use already installed bundles... but I first need to check how WWD start up everything. |
Can't it just run in the same OSGi runtime? IIRC @mickaelistria you presented a while ago that the JDT-LS now also runs in the same process which even allows sharing objects, in case of m2e project information and caches. |
The idea has strong technical merits, it was already discussed but the "human resource" aspect weigh more here: |
It seems there is already |
I have now created: this would allow m2e to look at the manifest and either use OSGi resolver or P2 resolver to get know what the lemminx-maven has as a dependency. Lemminx itself seem to be an OSGi bundle already... |
Signed-off-by: Christoph Läubrich <[email protected]>
Finally everything green 🥇 |
To get the latest enhancements in LemMinX-Maven for m2e: