Ideally, I think they should - yes. We’ve not been able to for a few reasons - conflicting opinions, and because the doc set is too large (450+ pages) and we have nothing to make the resultant ToC more manageable, such as folding. This is something we’re finally looking into, and I hope we can improve the navigation in the near future.
I will add this page, though, as it’s important (thanks!) - it’s the way I build snaps, and I’m sure its the same for many people.
If you’re looking for collapsible/expandable docs, check out the current format for online docs at Yocto Project:
It’s based on Sphinx and, unhumbly, I was one of the people who helped set it up in the early days, and I still work on those docs. The best part: foldable ToC.
I was unsure about whether LXD should be installed via snap or whether installing via .deb was adequate, and Oliver G explained:
“the deb just installs the snap … (there is no actual deb any more)
…
I’d go directly for the snap instead so you dont have that transitional
package cruft in the deb database …”
Perhaps that clarification could be added to this page.
There’s been some improvements to how snapcraft interfaces with providers that I’d like to document. Notably:
core22 snaps use lxd by default when building on linux systems
The default provider can be configured with snap set provider=<provider>
snapcraft will ask the user if it can install lxd or multipass
I believe this page is the right place, but rather than just focusing on lxd, I’d like to broaden it to talking about lxd, multipass, and how to configure snapcraft to choose one or the other.
Any concerns with me renaming this page from “Build on LXD” to something like “Building with LXD and Multipass”?
Updated! I don’t have permissions to rename the page. Can you rename it to “Building with LXD and Multipass”? Or if that is too verbose, then “Build Providers”?
Also, I think this page should be moved in the documentation’s navigation menu to sit next to the “Build Options” section.
I’ve renamed it and moved it in the navigation. I also set up a redirect for the old URL. Thanks so much for making those changes and the name change/location suggestions.
Does “–provider” even work anymore? I just tried it and got:
$ snapcraft --provider=host
Option --provider is not supported.
Full execution log: ‘/home/rpjday/.local/state/snapcraft/log/snapcraft-20230618-064154.748184.log’
$
And “snapcraft build --help” doesn’t list --provider as a valid option.
Is this when using core22 ? I get the same error when trying --provider with a core22 build, but we do try to document this above with the base distinctions (and you’re right about the help output).
Snapcraft 7 deprecated the --provider option. It is not supported for core22 snaps. Although it still works for core18|20 snaps, it is no longer shown in help messages.