Conversation
🦋 Changeset detectedLatest commit: 4cf7bb8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No dependency changes detected. Learn more about Socket for GitHub. 👍 No dependency changes detected in pull request |
…a new config property `snapcraft` to maintain backward compatibility
03b43d3 to
cef8662
Compare
|
I am really happy to see this being worked on, thanks so much for this. I would like to see it made clear that destructive mode should be discouraged, but available in cases where you can't use lxd or mulitpass. For example, destructive mode should never be used when building locally and in general it's difficult to trust the resulting build even in a docker container. |
|
@kenvandine Great callout. I wonder on what's the best way to approach this then. Practically/ideally, we should have a destructive-mode available for the functional tests that can be run from other OS's => docker container. The e2e test is run on a native linux runner, so maybe we could test a configuration matrix?
Definitely should call that out with the tsdoc guidance w.r.t. destructive mode though. That being said, we could also theoretically mark it as |
|
I think leaving the option is useful, just document is as not recommended. There are cases where people need it, but I think that's pretty rare. |
Adds first-class core24 snap support through a new
snapcraftconfig key, and restructures the snap target into per-core classes so each base gets its own code path.The old
snapkey still works exactly as before — nothing breaks for existing users. The newsnapcraftkey gives you structured access to core18/20/22 (same behavior as before) and core24 (all-new).New config shape
For legacy bases:
{ "snapcraft": { "base": "core22", "core22": { "confinement": "classic", "stagePackages": ["default", "libsecret-1-0"] } } }Pass-through mode for teams that manage their own
snapcraft.yaml:{ "snapcraft": { "base": "custom", "custom": { "yamlPath": "build/my-snapcraft.yaml" } } }core24 specifics
gnomeextension (handles content snaps, GTK theming, GPU). Explicitly setextensions: []to opt out.gnomeextension is incompatible with--destructive-mode. SettinguseDestructiveMode: truewhile includinggnomeinextensionsthrows anInvalidConfigurationErrorwith a clear message explaining why and what to do instead.allowNativeWayland: falseto disable (setsDISABLE_WAYLAND=1).organizemappings are auto-generated at build time from the actual app directory, so helper binaries land underapp/inside the snap regardless of what Electron ships.Implementation changes
The old monolithic
snap.ts(396 lines) is gone. In its place:snap/SnapTarget.tsSnapTarget(the build entry point) + abstractSnapCore<T>snap/coreLegacy.tssnap.tssnap/core24.tssnap/coreCustom.tssnapcraft.yamlsnap/snapcraftBuilder.tssnap/snapcraft.d.tsLinuxTargetHelper.getSnapCore()readssnapcraft.baseand returns the right implementation.Tests
A new
test-snap (core*)matrix job replaces the previoustest-linux-nativestub (which wasif: false). It runs four parallel jobs, one per core:ghcr.io/canonical/snapcraft:7_core22(Snapcraft 7 / Jammy)ghcr.io/canonical/snapcraft:8_core24(Snapcraft 8 / Noble)Both use
--destructive-mode+SNAPCRAFT_BUILD_ENVIRONMENT=hostso no LXD or Multipass daemon is required in CI.The
snapHeavyTest.tssuite also has install+launch tests (extract withunsquashfs, assert snap structure, run binary with--version) that run on native Linux CI runners withsquashfs-toolsavailable, skipped inside Docker.The existing
snapTest.tsunit tests still run and cover all the descriptor-level assertions (plugs, slots, extensions, compression, etc.) through snapshot testing.Breaking changes
None for
snapusers. Thesnapcraftkey is additive.