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

Refactor Bonsai as workspace and use Foundry as external dependency #810

Merged
merged 10 commits into from
Aug 25, 2023

Conversation

nategraf
Copy link
Contributor

@nategraf nategraf commented Aug 23, 2023

Currently on main the Foundry tools, including forge are declared as build dependencies in bonsai/ethereum/Cargo.toml and so Foundry is built as part of building and testing the risc0 repo.
This turns out to be problematic, with the largest issue being dependency conflicts that keep breaking builds on different developer machines.
Foundry CLI is not meant to be imported as a Rust dependency, and it is becoming clear the that it should not be used as such.

This PR first refactors the build for bonsai/ethereum contracts to call forge as a subprocess rather than building and running it in-process.
If this is done alone, a consequence is that building risc0 will require installing the Foundry tools, even if the developer has no interest in Ethereum integration or Bonsai.
In order to address this, the bonsai directory is refactored as its own workspace.

@nategraf nategraf marked this pull request as ready for review August 24, 2023 16:34
@nategraf nategraf requested a review from SchmErik August 24, 2023 16:35
Copy link
Contributor

@SchmErik SchmErik left a comment

Choose a reason for hiding this comment

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

not sure what's going on exactly but disabling the test seems to be causing CI to fail

foundry:
test:
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if this rename is the culprit for stalled jobs

@flaub flaub enabled auto-merge (squash) August 25, 2023 09:47
@flaub flaub merged commit 0379f7f into main Aug 25, 2023
17 of 20 checks passed
@flaub flaub deleted the victor/refactor-bonsai-workspace branch August 25, 2023 09:50
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.

None yet

3 participants