-
Notifications
You must be signed in to change notification settings - Fork 206
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
YAML editor generates wrong EOL characters in Windows #709
Comments
I thought this might be an easy fix for us, but looking a bit closer, I am not so sure. I am not sure which editor is responsible for this error. That doesn't like an STS-specific yaml editor. Anyway... I guess will try to reproduce and dig a little. But since this isn't actually an STS editor (yes the editor is shipped with STS, but it is one probably coming from Eclipse and we do not have direct control over it). I still have some hope however that there may be some way to control the newline formats indirectly via a preference. |
We (@BoykoAlex and me) are not able to reproduce this so far. Here are some questions I do not have answers to:
What we tried:
@aritzbastida Can you try clarifying some of this? Ideally you would write up a sequence of steps that begins with a clean install of STS and leads to producing the problem in question. For example:
I.e to avoid a lot of guess work on our behalf, it is best to try and be as specific as possible as to how you got into the situation shown in the screenshot. We can often fill in some blanks, but at the moment, the blanks are just too many, I have no clue at all what editor you have in that screenshot, and as a result cannot reproduce the problem. |
Some more things we tried (with both mentioned editors).
In both cases both editors seems to use the same newline convention as it detects in the existing file. This doesn't cause them to report problems. So this brings up another question. How did you get into a situation where the file has a mix of different newline conventions being used at the same time? |
Aha! Okay, so Alex was just able to reproduce something very similar to the bug report. Here are the steps:
So far all works fine. Now we insert a new property using the autocompletion. If we select a long / nested property, so that it results in the insertion of a multi-line completion text... then the newlines in that completion are using the unix convention. This results in exactly the error as in the bug report. I'm still not sure this is actually the bug being reported here, but in any case it is:
|
Thanks for the clarifications. That clears up the last bit of confusion I had with the screenshot showing a 'unfamiliar' editor.
No. Actually we pushed in a fix already yesterday. So fix should be there in the next release. |
FYI: If you wanted to try something sooner, nighly builds are available here: |
Thanks for the quick fix! |
When some nested property is added using the "Content Assist" tool of the YAML editor (STS 4.13.0), that is immediately reported by the validator as an error, such as "Nested mappings are not allowed in compact mappings" or "Implicit keys need to be on a single line".
As I found out, that error is caused by the EOL characters generated by the YAML editor, which follow the Linux convention (CR). However, I am running on Windows, and also installed the Windows version of STS (spring-tool-suite-4-4.13.0.RELEASE-e4.22.0-win32.win32.x86_64.self-extracting.jar).
The text was updated successfully, but these errors were encountered: