canonical / craft-application

The basis for *craft applications
https://canonical-craft-application.readthedocs-hosted.com/en/latest
GNU Lesser General Public License v3.0
7 stars 12 forks source link

Provide a better error message when loading a multi-document yaml #485

Open lengau opened 1 month ago

lengau commented 1 month ago

What needs to get done

Right now the workflow when reading a multi-document yaml file returns an internal error:

$ charmcraft pack
charmcraft internal error: ComposerError('expected a single document in the stream', <yaml.error.Mark object at 0x73a1c3d77970>, 'but found another document', <yaml.error.Mark object at 0x73a1c3ce0340>)                                           
Full execution log: '/home/lengau/.local/state/charmcraft/log/charmcraft-20240920-152105.956862.log' 

This should be converted to an error message that we don't support multi-document YAML files.

Why it needs to get done

Strange ux. See: https://github.com/canonical/charmcraft/issues/214

syncronize-issues-to-jira[bot] commented 1 month ago

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-3411.

This message was autogenerated