-
Notifications
You must be signed in to change notification settings - Fork 336
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
sdk: Create new Cargo workspace for sdk/ #4685
Conversation
lto = "thin" | ||
|
||
[workspace] | ||
members = [ |
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.
thoughts on making an sdk/crates
dir so everything can just be moved in there and this field can be members = ["crates/*"]
?
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.
Personally, I'm going to get way more annoyed about having to type crates
(or c<TAB>
) every single time I want to open a file in the repo over having to update this field whenever a new crate is added.
But I might be in the minority.
b34e49d
to
56450ad
Compare
f5519d5
to
6c40fe4
Compare
6c40fe4
to
afb3c99
Compare
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.
that’s insane! 🔥 you migrated everything to GitHub Actions!
(will approve again when you fix the conflict!)
#### Problem During the work to extricate the sdk from the rest of the monorepo in #4685, there were a couple of issues with CI. First, the `dummy-for-ci-check` feature doesn't exist in any sdk crate, so the `clippy` and `check` steps were failing when trying to activate the feature. Next, the frozen-abi tests were failing because the sdk doesn't activate `solana-packet`'s frozen-abi feature when its frozen-abi is active. #### Summary of changes Add a `dummy-for-ci-check` to `solana-sdk`, and correctly activate `frozen-abi` on `solana-packet`.
a688edf
to
9e62b32
Compare
@yihau thanks for the quick review on this! I've updated the PR description to make the differences clear -- I hope it's ok that we're not uploading bench and coverage reports just yet. I wanted to figure that out in the new repo once it was ready. |
#### Problem We want to move everything under `sdk/` into a standalone repository, but all of the crates are currently part of the monorepo workspace, which makes the extraction impossible. #### Summary of changes Remove all crates in `sdk/` from the top-level workspace, but keep the local dependency. Create a new `Cargo.toml` for the sdk workspace along with all required dependencies and patches.
#### Problem The monorepo contains a lot of testing steps for all of the packages. Once the sdk lives in its own repos, it will need to run adequate CI, just as before. #### Summary of changes Add all of the steps run over the sdk in the monorepo as scripts in `sdk/scripts`, along with a setup step and workflow file. These steps include: * checking crate ownership (check-crates.sh) * running hack checks (check-hack.sh) * cargo check with nightly toolchain (check-nightly.sh) * clippy (check-clippy.sh) * crate sorting in Cargo.toml (check-sort.sh) * dcou checks (check-dev-context-only-utils.sh) * rustfmt check (check-fmt.sh) * auditing crates (check-audit.sh) * miri tests (test-miri.sh) * frozen-abi tests (test-frozen-abi.sh) * tests with stable toolchain (test-stable.sh) * wasm tests (test-wasm.sh) * coverage tests (test-coverage.sh) * shellcheck (check-shell.sh) * sanity checks (check-porcelain.sh and check-nits.sh) * publish order (order-crates-for-publishing.py) * benches (test-bench.sh) A few differences with the monorepo testing: * coverage reports are not uploaded * bench results are not uploaded * version check is omitted, since the sdk will version crates separately * ssh key check is omitted, since there's no net scripts Future work: * downstream tests into solana-program repos * semver checks * spellchecking
9e62b32
to
784445b
Compare
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.
🪖
Problem
We want to move everything under
sdk/
into a standalone repository, but all of the crates are currently part of the monorepo workspace, which makes the extraction impossible.Summary of changes
Each commit should make the story clear:
f521e84: Remove all crates in
sdk/
from the top-level workspace, but keep the local dependency. Create a newCargo.toml
for the sdk workspace along with all required dependencies and patches69c949d: Remove unused dependencies in the sdk's Cargo.toml
85d31b3: Update the lockfile, automated
5b6c6f6: Re-do CI through a new set of scripts under
sdk/scripts
. This is another monster, and includes the following steps:784445b: Now that the sdk is tested with its own GitHub Actions workflow, don't run its test in normal CI
Important! There are a few differences with the current monorepo testing:
And there is some future work on the CI side:
Note: this builds on #4675 and #4731, leaving in draft until those landThis is good to go!