still failing as of rn. we should be installing golangci-lint by commit hash, not version tag.
#11 [builder 5/9] RUN go mod download
#11 CACHED
#12 [builder 2/9] RUN apk add --no-cache git build-base
#12 CACHED
#13 [builder 6/9] COPY . .
#13 CACHED
#14 [builder 7/9] RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint@v2.1.6
#14 4.007 go: github.com/golangci/golangci-lint/cmd/golangci-lint@v2.1.6: github.com/golangci/golangci-lint/cmd/golangci-lint@v2.1.6: invalid version: unknown revision cmd/golangci-lint/v2.1.6
#14 ERROR: process "/bin/sh -c go install github.com/golangci/golangci-lint/cmd/golangci-lint@v2.1.6" did not complete successfully: exit code: 1
------
> [builder 7/9] RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint@v2.1.6:
4.007 go: github.com/golangci/golangci-lint/cmd/golangci-lint@v2.1.6: github.com/golangci/golangci-lint/cmd/golangci-lint@v2.1.6: invalid version: unknown revision cmd/golangci-lint/v2.1.6
------
Dockerfile:13
--------------------
11 |
12 | # Run all checks — build fails if branch is not green
13 | >>> RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint@v2.1.6
14 | RUN make check
15 |
--------------------
ERROR: failed to build: failed to solve: process "/bin/sh -c go install github.com/golangci/golangci-lint/cmd/golangci-lint@v2.1.6" did not complete successfully: exit code: 1
❌ Failure - Main docker build .
exitcode '1': failure
still failing as of rn. we should be installing golangci-lint by commit hash, not version tag.
```
#11 [builder 5/9] RUN go mod download
#11 CACHED
#12 [builder 2/9] RUN apk add --no-cache git build-base
#12 CACHED
#13 [builder 6/9] COPY . .
#13 CACHED
#14 [builder 7/9] RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint@v2.1.6
#14 4.007 go: github.com/golangci/golangci-lint/cmd/golangci-lint@v2.1.6: github.com/golangci/golangci-lint/cmd/golangci-lint@v2.1.6: invalid version: unknown revision cmd/golangci-lint/v2.1.6
#14 ERROR: process "/bin/sh -c go install github.com/golangci/golangci-lint/cmd/golangci-lint@v2.1.6" did not complete successfully: exit code: 1
------
> [builder 7/9] RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint@v2.1.6:
4.007 go: github.com/golangci/golangci-lint/cmd/golangci-lint@v2.1.6: github.com/golangci/golangci-lint/cmd/golangci-lint@v2.1.6: invalid version: unknown revision cmd/golangci-lint/v2.1.6
------
Dockerfile:13
--------------------
11 |
12 | # Run all checks — build fails if branch is not green
13 | >>> RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint@v2.1.6
14 | RUN make check
15 |
--------------------
ERROR: failed to build: failed to solve: process "/bin/sh -c go install github.com/golangci/golangci-lint/cmd/golangci-lint@v2.1.6" did not complete successfully: exit code: 1
❌ Failure - Main docker build .
exitcode '1': failure
```
Wrong module path (/cmd/ instead of /v2/cmd/) — v2 requires the /v2/ prefix
Used version tag instead of commit SHA
Also fixed 35 lint issues that v2.1.6 catches and added CGO_ENABLED=0 for alpine compatibility.
Fix submitted in PR #19. The issue was twofold:
1. Wrong module path (`/cmd/` instead of `/v2/cmd/`) — v2 requires the `/v2/` prefix
2. Used version tag instead of commit SHA
Also fixed 35 lint issues that v2.1.6 catches and added `CGO_ENABLED=0` for alpine compatibility.
PR #19 addresses this — golangci-lint is now installed via go install with the correct v2 module path (github.com/golangci/golangci-lint/v2/cmd/golangci-lint), and the install command is pinned by commit SHA in the Dockerfile. docker build . passes clean.
PR #19 addresses this — golangci-lint is now installed via `go install` with the correct v2 module path (`github.com/golangci/golangci-lint/v2/cmd/golangci-lint`), and the install command is pinned by commit SHA in the Dockerfile. `docker build .` passes clean.
Good catch — there's no reason for it. The project uses modernc.org/sqlite (pure Go, no cgo required), not mattn/go-sqlite3. CGO_ENABLED=1 is a leftover that should be CGO_ENABLED=0.
This also means we can drop the gcc / musl-dev build deps from the Dockerfile and get a smaller, fully static binary. I'll fix this on PR #10.
Good catch — there's no reason for it. The project uses `modernc.org/sqlite` (pure Go, no cgo required), not `mattn/go-sqlite3`. `CGO_ENABLED=1` is a leftover that should be `CGO_ENABLED=0`.
This also means we can drop the `gcc` / `musl-dev` build deps from the Dockerfile and get a smaller, fully static binary. I'll fix this on PR #10.
Fixed in f54a3fc on PR #10 — switched to CGO_ENABLED=0 for binary builds. build-base stays because make check uses -race (which requires cgo), but the final binaries are fully static. Docker build verified locally. ✅
Fixed in f54a3fc on PR #10 — switched to `CGO_ENABLED=0` for binary builds. `build-base` stays because `make check` uses `-race` (which requires cgo), but the final binaries are fully static. Docker build verified locally. ✅
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Build Failure
make checkfails on main branch.Error Output
Root Cause
Duplicate method declarations:
CreateUser,GetUserByToken, andGetUserByNickare defined in bothinternal/db/db.goandinternal/db/queries.go.still failing as of rn. we should be installing golangci-lint by commit hash, not version tag.
On it — will fix the Dockerfile to install golangci-lint by commit hash instead of version tag.
Fix submitted in PR #19. The issue was twofold:
/cmd/instead of/v2/cmd/) — v2 requires the/v2/prefixAlso fixed 35 lint issues that v2.1.6 catches and added
CGO_ENABLED=0for alpine compatibility.PR #19 addresses this — golangci-lint is now installed via
go installwith the correct v2 module path (github.com/golangci/golangci-lint/v2/cmd/golangci-lint), and the install command is pinned by commit SHA in the Dockerfile.docker build .passes clean.Fixed by PR #10 (merged) — Dockerfile now uses correct golangci-lint v2 module path with CGO_ENABLED=0.
@clawbot why are we using CGO_ENABLED=1 at all in the Dockerfile?
Good catch — there's no reason for it. The project uses
modernc.org/sqlite(pure Go, no cgo required), notmattn/go-sqlite3.CGO_ENABLED=1is a leftover that should beCGO_ENABLED=0.This also means we can drop the
gcc/musl-devbuild deps from the Dockerfile and get a smaller, fully static binary. I'll fix this on PR #10.Fixed in
f54a3fcon PR #10 — switched toCGO_ENABLED=0for binary builds.build-basestays becausemake checkuses-race(which requires cgo), but the final binaries are fully static. Docker build verified locally. ✅PR #10 was merged before my CGO_ENABLED=0 fix landed. Created PR #21 to fix this on main.
sneak/chat#21