canonical / canonical/craft-application
Properly represent multi-line yaml strings
- Dominant language
- Python
- Stars
- 14
- Forks
- 29
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 12
Description
### What needs to get done
Add multi-line string representer to be used when marshaling yaml fields such as description and scriptlets. The representer is currently [defined in Snapcraft](https://github.com/canonical/snapcraft/blob/8a9a5c21229f68a5e0daa7c89d609d7d29006477/snapcraft/meta/snap_yaml.py#L487) but it's not being invoked since https://github.com/canonical/snapcraft/commit/e75d0e93bcbf019a8dbd17caf4842e23788ab53a.
### Why it needs to get done
Multi-line fields formatting is not correct in generated yaml data if the representer is not used.
Contributor guide
Research direction
Start by reading the linked Snapcraft representer in snapcraft/meta/snap_yaml.py and the cited commit, then trace where craft-application marshals YAML fields. Done means generated YAML preserves the intended formatting for multi-line fields such as descriptions and scriptlets, with verification added where the repository's existing tests cover marshaling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100