chore: february 2026 dependency updates + CI fixes#101
Conversation
|
This PR should fix #99 build failures. |
WalkthroughThe changes introduce version pinning for build tools across the CI workflow and Makefile, update Go dependencies to newer versions, and add new make targets for managing and verifying tool versions. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@makefile`:
- Around line 246-256: The "Running golangci-lint...Done!" echo in the Makefile
prints unconditionally even when golangci-lint isn't installed; in the lint and
align targets, move or duplicate the echo so it only runs inside the if-branch
that checks command -v golangci-lint (the block that evaluates $$INSTALLED and
runs golangci-lint run --fix), or suppress it in the else branch—ensure the
success message (the string "Running golangci-lint...Done!") is emitted only
after the if branch confirms golangci-lint is present and the run completes.
- Around line 276-282: Replace the golangci-lint installation line in the
install-deps target: instead of using "go install" for golangci-lint, invoke the
official binary installer script fetched from golangci-lint (using curl/wget)
and pass the version from the GOLANGCI_LINT_VERSION variable and the desired
install directory (use GOBIN or GOPATH/bin) so the binary is placed on PATH;
keep the betteralign go install line unchanged. Update the Makefile target name
install-deps and the related echo lines to reflect this change and ensure any
failure from the installer aborts the Makefile run.
🧹 Nitpick comments (1)
makefile (1)
246-256: Version-check logic is duplicated across three targets.The shell blocks for checking golangci-lint and betteralign versions are near-identical in
lint,align, andcheck-deps. This is a fair amount of duplication, though factoring shell logic in Makefiles is admittedly awkward. Consider extracting helper scripts or usingdefine/callif this grows further.Also applies to: 262-272, 285-306
| @if command -v golangci-lint > /dev/null 2>&1; then \ | ||
| INSTALLED=$$(golangci-lint --version 2>/dev/null | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+' | head -1); \ | ||
| if [ "$$INSTALLED" = "$(GOLANGCI_LINT_VERSION)" ]; then \ | ||
| printf " Version: %s \033[32m(verified)\033[0m\n" "$$INSTALLED"; \ | ||
| else \ | ||
| printf " Version: %s [require: %s \033[31m(pinned)\033[0m]\n" "$$INSTALLED" "$(GOLANGCI_LINT_VERSION)"; \ | ||
| fi; \ | ||
| golangci-lint run --fix; \ | ||
| else \ | ||
| echo "golangci-lint not installed. Run 'make install-deps' or 'make check-deps' for more info."; \ | ||
| fi |
There was a problem hiding this comment.
Lint target prints "Done!" even when golangci-lint is not installed.
Line 257 (@echo "Running golangci-lint...Done!") executes unconditionally, so it prints the success message even when the tool isn't found and the else branch runs. The same applies to the align target at line 273.
Suggested fix
Move the "Done!" echo inside the if block, or suppress it in the else branch. For example:
`@if` command -v golangci-lint > /dev/null 2>&1; then \
...
golangci-lint run --fix; \
+ echo "Running golangci-lint...Done!"; \
else \
echo "golangci-lint not installed. Run 'make install-deps' or 'make check-deps' for more info."; \
fi
- `@echo` "Running golangci-lint...Done!"🤖 Prompt for AI Agents
In `@makefile` around lines 246 - 256, The "Running golangci-lint...Done!" echo in
the Makefile prints unconditionally even when golangci-lint isn't installed; in
the lint and align targets, move or duplicate the echo so it only runs inside
the if-branch that checks command -v golangci-lint (the block that evaluates
$$INSTALLED and runs golangci-lint run --fix), or suppress it in the else
branch—ensure the success message (the string "Running golangci-lint...Done!")
is emitted only after the if branch confirms golangci-lint is present and the
run completes.
| install-deps: | ||
| @echo "Installing dependencies..." | ||
| @echo " Installing golangci-lint $(GOLANGCI_LINT_VERSION)..." | ||
| @go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION) | ||
| @echo " Installing betteralign $(BETTERALIGN_VERSION)..." | ||
| @go install github.com/dkorunic/betteralign/cmd/betteralign@$(BETTERALIGN_VERSION) | ||
| @echo "Dependencies installed successfully!" |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
golangci-lint official installation recommendations 2025 2026
💡 Result:
Official golangci-lint install guidance (current docs updated 2026-02-11):
- Prefer official prebuilt binaries (recommended): use the official installer script and pin a version (example shown in docs:
curl -sSfL https://golangci-lint.run/install.sh | sh -s -- ... v2.9.0). This is the primary “recommended” path; building from source is explicitly discouraged. [1] - Avoid
go install/ tools-pattern installs for normal use: the docs warn these “aren’t guaranteed to work” and recommend binary installation instead. [1] - CI: keep builds reproducible by pinning a specific golangci-lint version from releases (don’t rely on floating/latest implicitly). [2]
- GitHub Actions CI: use the official
golangci/golangci-lint-action; its default install mode is binary, and it notesgoinstallis not recommended. [2] [3]
Sources:
[1] golangci-lint “Local Installation” docs (golangci-lint.run)
[2] golangci-lint “CI Installation” docs (golangci-lint.run)
[3] golangci/golangci-lint-action README (github.com)
Citations:
- 1: https://golangci-lint.run/docs/welcome/install/local/
- 2: https://golangci-lint.run/docs/welcome/install/ci/
- 3: https://github.com/golangci/golangci-lint-action
Replace go install for golangci-lint with the official binary installer script.
The golangci-lint project explicitly recommends against installing via go install, as the method "isn't guaranteed to work" and can lead to build issues. Use their official binary installer instead:
Suggested installation method
install-deps:
`@echo` "Installing dependencies..."
`@echo` " Installing golangci-lint $(GOLANGCI_LINT_VERSION)..."
- `@go` install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION)
+ `@curl` -sSfL https://golangci-lint.run/install.sh | sh -s -- -b $$(go env GOPATH)/bin v$(GOLANGCI_LINT_VERSION)
`@echo` " Installing betteralign $(BETTERALIGN_VERSION)..."
`@go` install github.com/dkorunic/betteralign/cmd/betteralign@$(BETTERALIGN_VERSION)
`@echo` "Dependencies installed successfully!"🤖 Prompt for AI Agents
In `@makefile` around lines 276 - 282, Replace the golangci-lint installation line
in the install-deps target: instead of using "go install" for golangci-lint,
invoke the official binary installer script fetched from golangci-lint (using
curl/wget) and pass the version from the GOLANGCI_LINT_VERSION variable and the
desired install directory (use GOBIN or GOPATH/bin) so the binary is placed on
PATH; keep the betteralign go install line unchanged. Update the Makefile target
name install-deps and the related echo lines to reflect this change and ensure
any failure from the installer aborts the Makefile run.
This PR updates the libraries used by Olla to the latest and also pins the version of betteralign as newer releases need go1.25+ (which we won't move to yet).
Summary by CodeRabbit
Chores