-
Notifications
You must be signed in to change notification settings - Fork 117
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
Easy to get m2e pom.xml editor fatally confused #1518
Comments
This is pretty easy to repeat. If I simply add an additional ">" after entering a start tag (ending with ">"), it gets confused. At that point, it adds a blank line that doesn't get a line number. In fact, reverting the file doesn't fix it. I can reset it back to normal by closing the editor buffer and reopening the file. I can start with this: If I then put the cursor at the end of "dependencies" and enter ">>" and then try moving around, I find it has lost its mind. |
@mickaelistria or @vrubezhny, as this is an Editor issue, could you please take a look? |
Hey there! I can confirm all of these problems with pom.xmls and they've been there for a good while. I would love to provide a simple example file, but it seems that state beyond the file itself has an influence (maybe the current editor session or something). Last time, I copied a pom.xml that showed the problem to a pom2.xml and it did not show the problem when editing exactly the same spot. If I disable the Language Server for XML in the preferences, the problems are gone. But obviously, there is no more code completion and even formatting doesn't work any more, so that's barely a workaround. |
I did a lot of testing and I found a reproducible use case and also the solution (or a workaround) for it: Eclipse 2023-06 (for Java Developers) brings lsp4e 0.16.1 by default, but by installing (edited:) Wild Web Developer HTML, CSS, JSON, Yaml, JavaScript, TypeScript, Node tools 1.2.1.202308101949 from the market place, it gets updated to 0.17.0. EDIT: My use case:
Then add a new line somewhere, add the opening tag for a comment (without using the quick-fix that adds the closing tag), write the comment and so far, everything is ok
But as soon as you type the closing bracket ( First one:
Second one:
Now, crazy stuff happens, e.g. if I press the up or down arrow keys, new lines without line numbers appear, as @davidmichaelkarr described it. The only thing that helps now is closing and reopening the editor. |
By the way, I don't know if it matters, but if this is involving lsp, it might be useful to point out that I had filed an issue with SpringBoot, concerning some other issues with the Language Server: spring-projects/sts4#1103 . |
Thank you both for the detailed reports and testing.
In that case, can you please report this to the lsp4e-project? |
I opened another issue for it at lemminx-maven: |
Hi, was facing this error on eclipse 2023-06. |
Thanks for the report. @davidmichaelkarr can you confirm this? |
That will take a little while. I'm going to test this when I install 2023-09. |
Just an additional info: I ran another round of "Help->Check for updates" and now my 2023-06 installation has been upgraded to 2023-09 and the error is still gone. Thanks whoever that fixed it, this was really annoying! |
Thanks for checking |
Ok, I finally got 2023-09 set up and loaded up a project. I'm not seeing the error dialogs or the messed-up view. I can still get it moderately confused, although it's easy to recover from it. I tried inserting a new "dependency" block. At the proper place, I inserted exactly this text:
As soon as I typed the closing ">", it produced this:
I then manually removed the extra "" to fix it. This was repeatable. |
I'm using Eclipse 2023-06.
In the last few days I've been seeing the m2e pom.xml editor get very confused, being unable to edit portions of the text, having it display blank lines where blank lines don't exist. I find I have to close the editor and reopen the file. I have to be very careful entering text or it will get confused.
I am starting with this content:
For example, I can go to the blank line and enter TAB, and then enter the following:
By entering that errant ">", I've basically hosed that editor. If I try to erase one of those and then hit ENTER at the end of the line, it gets confused about what text is in the file and what it is displaying. At this point I also see an error dialog like the following:
The error log has this:
The text was updated successfully, but these errors were encountered: