wrong error when a part depends on a part with underscore
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
New
|
Undecided
|
Unassigned |
Bug Description
I got into a weird situation where snapcraft tells me that a valid part name is invalid. After scratching my head for a while, I found that the invalid part name is a dependency. This misleading error is not fun.
To reproduce, write a snapcraft.yaml with the following parts:
parts:
test-valid-part:
plugin: nil
after: [test_invalid_part]
test_
# See 'snapcraft plugins'
plugin: nil
Run snapcraft:
$ snapcraft
Issues while validating snapcraft.yaml: The 'parts' property does not match the required schema: 'test-valid-part' is not a valid part name. Part names consist of lower-case alphanumeric characters, hyphens, plus signs, and forward slashes. As a special case, 'plugins' is also not a valid part name.
Notice that the error refers to the valid part.