Skip to content

Split Go-specific targets out of common.mk into go.mk (non-breaking, after v3.0.0) #39

Open

Description

@dermorz

Context

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

  1. Move the Go targets and the tools.lock rule into go.mk.
  2. 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.
  3. 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.
  • Release notes flag this as breaking.

Activity

  1. added this to the v3.0.0 milestone on Sep 24, 2026
  2. added theissue type on Sep 25, 2026
  3. removed this from the v3.0.0 milestone on Oct 5, 2026
  4. dermorz commented on Oct 5, 2026

    @dermorz
    ContributorAuthor

    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:

    1. Move mod, golangci-lint and envtest-binaries-sideload to go.mk; keep tools.lock and its pattern rule in common.mk.
    2. 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.
  5. 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageIssue that has not been reviewed

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions