Example use of `after` without remote parts

I’m trying to find a snap that requires the use of after without using remote parts. Any suggestions?

Here’s an example: https://github.com/CanonicalBootStack/snap-grafana/blob/master/snapcraft.yaml#L47

It’s not immediately obvious to me why this is necessary. Does grafana-ui require grafana in order to build?

Sorry I thought you just wanted an example of using it without remote parts, I don’t remember all the nitty gritty details of why that ordering is, but here’s a simpler example: https://github.com/anonymouse64/edgex-influx-proxy/blob/master/snap/snapcraft.yaml

Here, the edgex-influx-proxy part must be built after the go part because the go part installs files into $SNAPCRAFT_STAGE for the edgex-influx-proxy part to use when it builds things (and note this snap is meant to be built from inside a docker container, so it can’t just use build-snaps and the go snap)

1 Like

Here are some more examples:


The utils part installs some utilities to $SNAPCRAFT_STAGE (along with some build-packages to support them) that are used to build the other parts.

The mysql part requires headers provided by the boost part.

I’m sure you can find other examples where a snap builds a library that is a dependency of the main app: the library needs to be available to build things that depend on it, so the two parts need to be explicitly ordered.