ethereum-optimism / optimistic-specs

Optimistic: Bedrock, is a protocol that strives to be an extremely simple optimistic rollup that maintains 1:1 compatibility with Ethereum
MIT License
168 stars 36 forks source link

Adopt go.work, rename modules to prep for monorepo #414

Closed protolambda closed 2 years ago

protolambda commented 2 years ago

This PR:

protolambda commented 2 years ago

Stuck on a go issue:

../../../go/pkg/mod/github.com/btcsuite/btcd@v0.22.0-beta/chaincfg/genesis.go:10:2: ambiguous import: found package github.com/btcsuite/btcd/chaincfg/chainhash in multiple modules:
        github.com/btcsuite/btcd v0.22.0-beta (/home/proto/go/pkg/mod/github.com/btcsuite/btcd@v0.22.0-beta/chaincfg/chainhash)
        github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0 (/home/proto/go/pkg/mod/github.com/btcsuite/btcd/chaincfg/chainhash@v1.0.0)

Which I think causes a build issue which the linting tooling can't handle (but go itself can somehow...):

golangci-lint run -E asciicheck,goimports,misspell --fix
WARN [runner] Can't run linter goanalysis_metalinter: buildir: failed to load package : could not load export data: no export data for "github.com/btcsuite/btcd/chaincfg/chainhash" 
ERRO Running error: 1 error occurred:
        * can't run linter goanalysis_metalinter: buildir: failed to load package : could not load export data: no export data for "github.com/btcsuite/btcd/chaincfg/chainhash"
protolambda commented 2 years ago

See https://github.com/btcsuite/btcd/issues/1839 Fixed by upgrading to github.com/btcsuite/btcd v0.22.1

protolambda commented 2 years ago

Rebased to resolve merge conflicts. Edit: and force-pushed again to fix the opnode > op-node change in the new fuzz makefile target.

protolambda commented 2 years ago

Deleted code cov comment since it wasn't updating anymore. Coverage is stable, no changes to actual code, and we merge all the coverage reports of different modules by pushing them all to codecov. You can find the coverage diff here: https://app.codecov.io/gh/ethereum-optimism/optimistic-specs/compare/main...go-work (some renames, basically 0 coverage difference)

protolambda commented 2 years ago

I can help fix this merge conflict with a rebase in 4 hours from now. Basically need to rebase on main, drop all the old file moves + import rewrites, and redo those, then fix up some go imports, while preserving the docker and ci config fixes.