You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the builtin yaml helpers the formattin of the file is not preserved. While it technically doesn't matter how the file is formatted it helps humans to read and understand.
It is also often common convention, in this case I use Gitlab CI which uses a blank line to separate different tasks. I would assume similar conventions is used elsewhere in other CI setups.
Most notably, all the blank lines separating the tasks has been removed but there are other subtle changes
image: 'node:16'# this has turned into a stringstages:
- test
- build
- releasefoo:
stage: testsomething: # this has been converted from [ .. ] to -
- 1
- 2
- 3script:
- foobar:
stage: buildscript:
- barbaz:
stage: releasescript:
- baz
Expected results
All formatting should be intact, at least on lines which otherwise hasn't changed.
I have not checked the implementation but I assume all this has to do with serialization, perhaps it is better to handle it as a syntax tree?
This discussion was converted from issue #181 on September 13, 2023 15:23.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When using the builtin yaml helpers the formattin of the file is not preserved. While it technically doesn't matter how the file is formatted it helps humans to read and understand.
It is also often common convention, in this case I use Gitlab CI which uses a blank line to separate different tasks. I would assume similar conventions is used elsewhere in other CI setups.
Steps to reproduce
Given a yaml file such as:
As an example, lets say the mrm task uses
Actual results
Most notably, all the blank lines separating the tasks has been removed but there are other subtle changes
Expected results
All formatting should be intact, at least on lines which otherwise hasn't changed.
I have not checked the implementation but I assume all this has to do with serialization, perhaps it is better to handle it as a syntax tree?
Beta Was this translation helpful? Give feedback.
All reactions