You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Split Go-specific targets out of common.mk into go.mk (non-breaking, after v3.0.0) #39
common.mk is meant to be language-agnostic, but three targets are Go-specific: mod, golangci-lint and envtest-binaries-sideload, plus the tools.lock pattern rule. A non-Go repo (e.g. a Rust one) gets them anyway.
Part of centralizing shared CI/build config in dev-kit: common.mk works for any repo, language modules are opt-in.
What needs to be solved
Move the Go targets and the tools.lock rule into go.mk.
go.mk is fetched and pinned the same way as common.mk (by DEV_KIT_VERSION), and update-common-mk-bootstrap writes the bootstrap for both.
Document the migration: Go repos add the go.mk include.
Acceptance criteria
common.mk contains no Go-specific target or variable.
A Go consumer (Solar) runs make mod golangci-lint with go.mk included, and gets a clear error without it.
A repo including only common.mk runs make help and make scan without Go installed.
Postponed past v3.0.0 — dev-kit 3.0 doesn't need the split, including for repos without Go code:
Since feat: moved common linting configs and setups to dev-kit #34, common.mk already adapts to repos without a go.mod: lint only adds golangci-lint when there is one, .golangci.yml is only fetched then, and TREEFMT_ARGS is derived. OS/ARCH fall back to uname when go is missing. ocm-components runs on common.mk today.
The tools.lock rule doesn't belong in go.mk: it's a tool installer, not Go support. ocm-components has no Go code but installs the ocm CLI through it (ocm ocm.software/ocm@v0.49.0), so moving it would force go.mk on exactly the repos the split is meant for.
When this is picked up (e.g. for the first repo with no Go at all, like knot), it can be non-breaking:
Move mod, golangci-lint and envtest-binaries-sideload to go.mk; keep tools.lock and its pattern rule in common.mk.
common.mk fetches and includes go.mk itself when a go.mod exists, pinned by DEV_KIT_VERSION like the shared configs. Consumers change nothing, so no major release and no migration round.
changed the title [-]Split Go-specific targets out of common.mk into go.mk[/-][+]Split Go-specific targets out of common.mk into go.mk (non-breaking, after v3.0.0)[/+]on Oct 5, 2026
Activity
dermorz commentedon Oct 5, 2026
Postponed past v3.0.0 — dev-kit 3.0 doesn't need the split, including for repos without Go code:
common.mkalready adapts to repos without ago.mod:lintonly addsgolangci-lintwhen there is one,.golangci.ymlis only fetched then, andTREEFMT_ARGSis derived.OS/ARCHfall back tounamewhengois missing. ocm-components runs oncommon.mktoday.tools.lockrule doesn't belong ingo.mk: it's a tool installer, not Go support. ocm-components has no Go code but installs theocmCLI through it (ocm ocm.software/ocm@v0.49.0), so moving it would forcego.mkon exactly the repos the split is meant for.When this is picked up (e.g. for the first repo with no Go at all, like knot), it can be non-breaking:
mod,golangci-lintandenvtest-binaries-sideloadtogo.mk; keeptools.lockand its pattern rule incommon.mk.common.mkfetches and includesgo.mkitself when ago.modexists, pinned byDEV_KIT_VERSIONlike the shared configs. Consumers change nothing, so no major release and no migration round.[-]Split Go-specific targets out of common.mk into go.mk[/-][+]Split Go-specific targets out of common.mk into go.mk (non-breaking, after v3.0.0)[/+]feat!: make governance workflows reusable (#41)