wrong error when a part depends on a part with underscore

Bug #1741140 reported by Leo Arias
10
This bug affects 2 people
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_invalid_part:
    # 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.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.