Skip to content

build: add local Go workspace#1

Open
CharlieLZ wants to merge 1 commit into
BitgesellOfficial:bglfrom
CharlieLZ:charlielz/local-go-workspace
Open

build: add local Go workspace#1
CharlieLZ wants to merge 1 commit into
BitgesellOfficial:bglfrom
CharlieLZ:charlielz/local-go-workspace

Conversation

@CharlieLZ
Copy link
Copy Markdown

Summary

  • Add a committed go.work so local Go commands use the vendored keep-common module already present in this repository.
  • Route github.com/btcsuite/btcd to the vendored ./btcd tree for normal local checkouts instead of requiring the Docker-only ../btcd sibling path.
  • Include go.work.sum generated by the verified workspace run.

Why

A standard clone currently cannot run even focused Go tests because the root go.mod replacement expects ../btcd, a path created by the Dockerfile but not by a normal checkout. The repository already contains ./btcd and ./keep-common; this workspace makes those local modules usable without changing production code.

RED before this change:

go test ./config
# github.com/keep-network/keep-core/config
pkg/bitcoin/block.go:7:2: github.com/btcsuite/btcd@v0.23.1: replacement directory ../btcd does not exist
config/config.go:21:2: missing go.sum entry for module providing package github.com/keep-network/keep-common/pkg/chain/ethereum

Verification

  • go test ./config now passes.
  • go test ./cmd ./config passes.
  • git diff --cached --check passes before commit.

Bounty context

Submitted for Bitgesell improvement bounty: BitgesellOfficial/bitgesell#81

Payment details can be provided if accepted or requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant