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
While the error message here is bad, craft-parts doesn't need to handle grammar. I believe the grammar isn't being properly processed in the expand-extensions command.
The following part definition:
parts:
my-part:
plugin: nilstage-packages:
- on amd64:
- sl
- nanoprime:
- on amd64:
- usr/lib/*/libvpl.so.*
- usr/bin
results in this yaml_data_for_arch object in ExpandExtensionsCommand.run():
We should probably keep this bug around though, since this YAML:
parts:
my-part:
plugin: nil# prime:# - on amd64:# - usr/lib/*/libvpl.so.*stage-packages:
- on amd64:
- sl
outputs a good error message:
python -m craft_parts --dry-run
Error: invalid parts specification: Part 'my-part' validation failed.
- Input should be a valid string in field 'stage-packages[0]'
Review part 'my-part' and make sure it's correct.
while uncommenting the prime keyword gets us a traceback.
Bug Description
Craft-parts assumes
prime
andstage
entries are strings. This is not true if advanced grammar is used.Craft-parts needs to be able to unmarshal parts with advanced grammar. The problematic code is here).
To Reproduce
See a snapcraft reproducer in https://bugs.launchpad.net/snapcraft/+bug/2083964
part yaml
Relevant log output
The text was updated successfully, but these errors were encountered: