Skip to content
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

Merged
merged 7 commits into from
Sep 9, 2020

Conversation

raulk
Copy link
Member

@raulk raulk commented Sep 9, 2020

Fixes #3666.

@raulk raulk force-pushed the fix/test-vectors-import-cycle branch from e57b899 to 2a3743f Compare September 9, 2020 13:14
Comment on lines +234 to +241
- 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
Copy link
Member Author

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:

  1. 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 😨 ).
  2. we use statediff just like other non-Go implementations would use it, which makes us even better as a reference implementation ;-)

Copy link
Contributor

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

Comment on lines +270 to +278
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
}
Copy link
Member Author

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.

Comment on lines -42 to -43
github.com/filecoin-project/statediff v0.0.1
github.com/filecoin-project/test-vectors v0.0.0-20200907193218-2c0739eccce6
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋

@raulk raulk requested a review from magik6k September 9, 2020 13:38
@raulk raulk marked this pull request as ready for review September 9, 2020 13:38
Comment on lines +234 to +241
- 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
Copy link
Contributor

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

@magik6k magik6k merged commit a2f1e76 into master Sep 9, 2020
@magik6k magik6k deleted the fix/test-vectors-import-cycle branch September 9, 2020 17:53
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.

iron out the dependency cycles between lotus, test-vectors, and statediff
4 participants