snapcraft first run doesn't verify parts in parts after keyword on core22

Bug #2033882 reported by Guillaume Beuzeboc
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Committed
Medium
Claudio Matsuoka

Bug Description

When listing parts in the after keyword of a part, if the listed part doesn't exist, no error will show.

In core20 it was showing an error but not in core22.

I believe it should show an error to help developers with potential typos.

Example to reproduce:
snapcraft.yaml:

name: my-snap-name
base: core22
version: '0.1'
summary: Single-line elevator pitch
description: |
  This is my-snap's description.

grade: devel
confinement: devmode

parts:
  my-part:
    plugin: nil
    override-build: |
            echo "hello"
  my-part2:
    after: [trololo]
    plugin: nil
    override-build: |
            echo "hello"

The first build runs fine. The second build properly fails.
While the same example in core20 always gives:

Failed to get part information: Cannot find the definition for part 'trololo', required by part 'my-part2'.
Remote parts are not supported with bases, so make sure that this part is defined in the `snapcraft.yaml`.

Changed in snapcraft:
status: New → Confirmed
status: Confirmed → Fix Committed
Changed in snapcraft:
assignee: nobody → Claudio Matsuoka (cmatsuoka)
importance: Undecided → Medium
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.