Description looks very ugly in snap.yaml
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Snapcraft | Status tracked in Trunk | |||||
Legacy |
Fix Committed
|
High
|
Sergio Schvezov | |||
Trunk |
Fix Released
|
High
|
Sergio Schvezov |
Bug Description
Multi-line strings are being marshaled in a very poor way by snapcraft. For example, from blender:
description: "Blender is the free and open source 3D creation suite. It supports the\n\
entirety of the 3D pipeline\
\ compositing and motion tracking, even video editing and game\ncreation.
\ is a public project, made by hundreds of people from around the\nworld; by studios\
\ and individual artists, professionals and hobbyists,
\ experts, animators, game artists, modders, and\nthe list goes on.\n\nThe standard\
\ snap channels are used in the following way:\n \n stable - Latest stable\
\ release.\n candidate - Test builds for the upcoming stable release.\n \
\ beta - Latest builds for the upcoming stable release.\n edge - Experimental\
\ builds for the next major release.\n\nSee the following topic for details and\
\ feedback on this snap:\n\n https:/
I've also heard from Sergio that snapcraft is now using ">" somehow, which is almost certainly not the right thing to do given its manipulation of the string. For example:
>>> yaml.load(""">
... One
...
... Two
...
...
... Three
... """)
'One\nTwo\
The latter seems unrelated to the former, although Sergio mentioned it in the same conversation. But both issues should be looked into.
Can I see the original snapcraft.yaml that generates this ugly output?
As a side note, the switch from | to > was done on https:/ /github. com/snapcore/ snapcraft/ commit/ 4e46b5a18f222d1 f4e3084d642633e 6d25bbd3bd and the reasoning from the store team was to allow for better formatting from the store web front (having the exact opposite effect of what you describe in this bug's description).
snapcraft is only using > when running snapcraft init and we can switch back to | without affecting any existing project.
That said, I do not think this is the reason for that not so nice looking (to not say horrible) output.