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
Newline characters changed to \n in bitrise.yml view #168
Comments
Hi @koral-- This is unfortunately a bit out of our control. Both representations are correct from a YML spec perspective, and so it depends on the serializer how it serializes that string content. Added the |
Isn't it possible to just force particular style when content is modified in Workflow tab? |
If you find an option in the docs (http://godoc.org/gopkg.in/yaml.v2 / https://github.com/go-yaml/yaml) please let us know! ;) |
I guess PR should go there. Even if such will be made that lib does not seem to be contributor friendly: several dozens of issues and PRs opened for months and this: go-yaml/yaml#261 |
It's quite a stable lib, we never had any issue with it, that might explain the lack of activity there, but of course there's always room for improvement.. To be honest this is like the de factor Go standard YAML lib, switching to any other would be quite a risk |
I've managed to determine the scenario in which content is "squashed". I guess that if there are only spaces a the end, text may be intentionally enclosed with double quotes to preserve it and this is only valid solution. However, if there are spaces followed by newlines both block and quoted text can be used. |
That would make sense. Technically it'd be possible to keep the line ending spaces in the non double quoted form I believe, but the double quoted form is definitely more reliable / less error prone as a serialized form.
I think technically that should be possible. |
I've just checked case when trailing sequence of whitespaces contains spaces between newlines and quotes were also used. So, to sum up, it seems that the only feasible action for this is to fill an issue on https://github.com/go-yaml/yaml asking them to prefer block notation if text ends with newline character or in other words use quotes only if space is at the end but not in any position of trailing whitespace sequence. |
Indeed. I believe we tried to find another YAML lib for Go initially when we saw this same issue, but did not find any suitable alternative. |
@koral-- are you still facing the issue? |
Yep, just checked and it is still present. Moreover, it seems that now text is a single, quoted line always if there is any whitespace at the end including single newline. |
This is still an issue and super-annoying. Unfortunately, Bitrise seems to have many of these little bugs (also UI/UX issues) that might cause our company to choose another option. |
Workaround: Just avoid having a space at the end of any line. |
I have a workflow with 2 script steps. One of them looks consistently in both Workflows and bitrise.yml tabs but 2nd one has newline characters replaced with
\n
.Step have been added and edited using Workflows tab only. Content in that tab is the proper one.
The text was updated successfully, but these errors were encountered: