docs: Fix broken go install instructions (replace directive) - #26
Open
jgmcalpine wants to merge 2 commits into
Open
docs: Fix broken go install instructions (replace directive)#26jgmcalpine wants to merge 2 commits into
jgmcalpine wants to merge 2 commits into
Conversation
go.mod requires go >= 1.25.0; the example's golang:1.22-alpine base predates that and fails to build. Also pins the CI example's Go version via actions/setup-go reading go.mod, so it can't drift the same way again.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
go install github.com/lightninglabs/lnget/cmd/lnget@latestfails on a clean machine:(
go version go1.25.6 darwin/arm64, macOS/Linux)Root cause:
go.modcontains:which its own comment notes is required for
lnd v0.20.0-beta's custom protobuf (UseHexForBytes) — a real dependency, not something to remove.go install pkg@versiondoesn't honorreplacedirectives for remote installs, so this can't work as currently documented. I didn't touchgo.modsince the replace looks intentional and necessary; happy to help if there's a preferred way to surface this, but kept this PR scoped to docs.Fix: updated all four places I found this instruction to build from a local clone instead, which I verified works.
Testing: this is a docs-only change — no
.gofiles touched, somake tidy-module-check/make unit/make lintproduce no different output. I did verify the new instructions themselves work on a clean clone.While testing, I also found the Dockerfile's
golang:1.22-alpinebase predatesgo.mod's currentgo >= 1.25.0requirement — bumped togolang:1.25-alpine. Since this is the kind of thing that goes stale again asgo.modchanges, I also added an explicitactions/setup-gostep (reading the version fromgo.mod) to the GitHub Actions example, which previously had no version pin and was relying on the runner's default.One observation, not part of this PR: the broken instruction was duplicated across all three files, which suggests drift risk if it needs to change again, it might be worth a single canonical install snippet the others reference. Happy to take a pass at that separately if useful.
I hit this while building an L402 demo against this tool: [https://github.com/jgmcalpine/headless-records-l402-demo], happy to link it if useful context.