Skip to content

Migration: the forge backend implies the forge

Spec 0195. Until this change a project's forge was three separate answers that could disagree: a --git-backend that only defaulted the host, five forge checkboxes in --features, and a release source decided by whether the host name contained gitlab. A default project enabled update and no forge, so it could not build its updater.

Flags

before after
--git-backend github --forge-backend github (also gitlab, gitea, codeberg, bitbucket). No alias.
--features ...,github refused. The backend implies its forge; --forge-credentials github enables a further forge for its credential wizard and adapter only.
--host chose the backend by substring --host is the host only, for a self-managed instance.
(none) --no-forge --module <path> for a project that is not hosted on a forge.
(none) --release-channel forge when update is enabled. The direct value and its --release-* settings were offered in the first cut and withdrawn before v0.43.0, never having reached a generated tool; a static channel is being designed under #90.

Manifest

New fields, all derived and written back by the first regenerate on a manifest that predates them:

  • release_source.backend: from the single enabled forge feature, else the release type, else the host substring. Two enabled forges resolve through the release type and are refused when it names neither.
  • the backend's forge feature, when the manifest enables no forge at all (a scaffold from before forge features existed named its forge only as the release type). Without it cmd/<name>/forge.go linked nothing and the tool could not update; a manifest that already enables a forge is left as it is.
  • properties.module_path: <host>/<org>/<repo> for a hosted project.
  • properties.forge_credentials: forges enabled beyond the backend.
  • release_source.direct: the direct source's settings when the type is direct. Loaded but never rendered; the channel is withdrawn (see above).

release_source.type accepts every backend and direct; Gitea, Codeberg and Bitbucket projects get no CI files, because no skeleton exists for them yet.

Generated tool

A default project now enables its backend's forge feature, links its adapter in cmd/<name>/forge.go, and can check for updates. doctor gains a "Release source" check that fails when the release source type has no registered provider, whatever the forge features say.