Reported error message building base: core18 with newer snapcrafts is wrong
Metadata
Current evaluation
Closed without resolution. A maintainer noted the error applies to any unsupported base like core17 and suggested improving the message to clarify base incompatibility instead of blaming the plugin.
Suggested action: —
No scores available.
Issue body
### Bug Description
`snapcraft` on `latest/` recently removed support for core18 bases. When building such a snap with these releases of `snapcraft` I would expect an error very early on during builds. However, the error instead occurs somewhere else and incorrectly attributes build failures to the plugin I've chosen, rather than the base. This is, of course, not true; the (for example) nil plugin *is* supported by `base: core18` snaps, I'm just not using a version of `snapcraft` which supports building such snaps.
### To Reproduce
```
snap install --channel=latest/edge snapcraft
mkdir test-snap && cd test-snap
snapcraft init
sed -i 's/core22/core18/' snap/snapcraft.yaml
snapcraft --use-lxd
```
### Environment
Running at least snapcraft rev 9410, but any sufficiently recent release beyond 7.4.3 will probably exhibit this behavior -- using 7.x risks still works.
Running on Ubuntu 23.04 using LXD as the build provider.
### snapcraft.yaml
```shell
name: my-snap-name # you probably want to 'snapcraft register <name>'
base: core18 # the base snap is the execution environment for this snap
version: '0.1' # just for humans, typically '1.2+git' or '1.3.2'
summary: Single-line elevator pitch for your amazing snap # 79 char long summary
description: |
This is my-snap's description. You have a paragraph or two to tell the
most important story about your snap. Keep it under 100 words though,
we live in tweetspace and your description wants to look good in the snap
store.
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots
parts:
my-part:
# See 'snapcraft plugins'
plugin: nil
```
### Relevant log output
```shell
dilyn@Ares:~/tt -> snapcraft --use-lxd
Starting Snapcraft 7.4.1.post31+gitf5b2f2e0
Logging execution to '/home/dilyn/.local/state/snapcraft/log/snapcraft-20230629-214349.990383.log'
Launching a container.
Waiting for container to be ready
Waiting for network to be ready...
snap "core18" has no updates available
The plugin 'nil' does not support snaps using base 'core18'.
Run the same command again with --debug to shell into the environment if you wish to introspect this failure.
```
```
### Additional context
_No response_
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. A maintainer noted the error applies to any unsupported base like core17 and suggested improving the message to clarify base incompatibility instead of blaming the plugin. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without a fix. The report highlighted a misleading error when building core18 snaps with newer snapcraft. A maintainer suggested improving the message to clearly indicate base incompatibility. | |
| qwen/qwen3.6-35b-a3b | — | — | Abandoned without a fix. A maintainer acknowledged the misleading error when building core18 snaps with newer snapcraft and suggested improving the message to clarify base deprecation rather than blaming the plugin. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without a fix. The misleading error message for unsupported core18 bases remains unchanged, though maintainers acknowledged the feedback and noted the error could be improved. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without a fix. A maintainer noted the error matches core17 failures and suggested improving the message to clarify that newer snapcraft versions no longer support core18 bases. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1830389 misleading warning when building base: core18 snap with 16.04 snapcore/snapcraft docker | snapcraft (launchpad) | closed | Closed as stale. Snapcraft Dockerfiles have changed and migrated to rocks, rendering the original warning context obsolete. No code changes were made. | |
| #1862256 snapcraft should complain loudly when building base: core20 snap on i386 | snapcraft (launchpad) | closed | Closed as superseded. Improved architecture parsing in snapcraft now correctly rejects unsupported base-architecture combinations, addressing the original request without requiring explicit i386 core20 checks. | |
| #1813637 maven plugin crashes with base core18 | snapcraft (launchpad) | closed | Closed without resolution due to inactivity. The maven plugin caused an IndexError when building with base core18 in snapcraft 3.0.1, while core16 worked. No fix was provided. | |
| #1857019 cannot build snapd snap with build-base: core w/o base: core | snapcraft (launchpad) | closed | Closed without resolution or comments. The snapcraft TypeError when using build-base: core without base: core remains unresolved. | |
| #1826611 Running snapcraft 3 w/ core18 base in docker incorrectly reports missing lib deps | snapcraft (launchpad) | closed | Closed as stale. Snapcraft resolved the issue by updating its Dockerfiles and migrating to OCI rocks for builds, eliminating the incorrect core18 dependency warnings in Docker. | |
| #1839604 build-base seems broken | snapcraft (launchpad) | open | Seven-year-old question about snapcraft rejecting 'base: bare' with 'build-base: core18' via a confusing validation error. No maintainer response; validation was rewritten in snapcraft 8.x, where build-base is now required for bare bases, so the reported combination is now valid. |