-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
resolve lotus, test-vectors, statediff dependency cycle #3688
Conversation
e57b899
to
2a3743f
Compare
- run: | ||
name: install statediff globally | ||
command: | | ||
mkdir -p /tmp/statediff | ||
git clone https://github.com/filecoin-project/statediff.git /tmp/statediff | ||
cd /tmp/statediff | ||
go generate ./... | ||
go install ./cmd/statediff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We now run statediff as a binary. This has two advantages:
- allows us to drop the go dependency, and thus mitigate the risk of dependency contagion (e.g. if statediff uses a newer version of go-state-types than Lotus, minimal version selection would've inadvertently chosen the newer one 😨 ).
- we use statediff just like other non-Go implementations would use it, which makes us even better as a reference implementation ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filecoin-project/statediff#15 will allow removal of the go generate
if err := exec.Command("statediff", "--help").Run(); err != nil { | ||
t.Log("could not dump 3-way state tree diff upon test failure: statediff command not found") | ||
t.Log("install statediff with:") | ||
t.Log("$ git clone https://github.com/filecoin-project/statediff.git") | ||
t.Log("$ cd statediff") | ||
t.Log("$ go generate ./...") | ||
t.Log("$ go install ./cmd/statediff") | ||
return | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If statediff is not available, we simply skip it and log instructions.
github.com/filecoin-project/statediff v0.0.1 | ||
github.com/filecoin-project/test-vectors v0.0.0-20200907193218-2c0739eccce6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋
- run: | ||
name: install statediff globally | ||
command: | | ||
mkdir -p /tmp/statediff | ||
git clone https://github.com/filecoin-project/statediff.git /tmp/statediff | ||
cd /tmp/statediff | ||
go generate ./... | ||
go install ./cmd/statediff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filecoin-project/statediff#15 will allow removal of the go generate
Fixes #3666.