I’ve just given the Snapcraft for Windows preview a quick go, and generally I’ve got to say it’s quite nice, but I just thought I’d give some generalised feedback to hopefully be helpful.
Building locally with Multipass works fine but I think could have some improvements.
Firstly, Multipass isn’t installed implicitly by running snapcraft
itself, maybe there’s some scope to rely on winget
and attempt winget install Canonical.Multipass
going forward ( Winget will be rolling out as a standard Windows component in the next few weeks ).
Manual Multipass installation aside, there was a need to also run multipass set local.privileged-mounts=true
which wasn’t spelled out, the build process will reference it and it’s Googlable enough to fix, but presumably snapcraft
could check this variable upfront and be more explicit about needing it rather than finding out half way during the build itself.
Finally, one of my snaps uses the dump plugin and an executable bash file. This gets copied over to the Multipass side without the executable bit, which means that the resulting snap fails to build. While some overrides to mark it as executable specifically could be helpful here, it’d be nice if this just worked magically like it does being built on Linux natively.
Remote-build works as expected, aside from the small problem of it outputs some characters that didn’t render in Windows Terminal (as in the new modern Windows Terminal app).
The metrics command mostly works as expected. There appears to be a lot of conditions where the command will error and crash complaining about not having exclusive access to a temporary file, which can be triggered by viewing some long metrics that are piped to more
, such as users by country, or specifying --start
and --end
ranges.
Some commands like snapcraft create-key
could probably have their errors changed to something more suitable. They currently print that the snapd
snap isn’t installed which is unlikely to ever be an appropriate solution for Windows.
Ultimately, I think this is in a good position. Although I’m happy to help out around here with some snaps on the side, I’m a Windows exclusive user for the most part (The nephews need their Fortnite and Roblox!), so for me in particular, the combination of Multipass/Snapcraft/Winget brings a lot of nerdy joy, and when I get around to setting up my environment again for Windows 11, the Windows release of snapcraft might help replace my current flow of having to mess with HyperV VM’s manually. A cloud-init
file to make Multipass have RDP by default for testing might be all that remains from me avoiding using HyperV directly itself, which would be ideal because it appears that Microsoft are moving away from desktop use of HyperV directly to focus on WSLg. (e.g, by deprecating their support for enhanced sessions).