-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Bump patched ntapi from v0.3.6 to v0.3.7 #31981
Conversation
# the patch-related configs are needed for rust 1.69+ on Windows; see Cargo.toml | ||
# shellcheck disable=SC2086 # Don't want to double quote $rust_version | ||
"$cargo" $maybeRustVersion \ | ||
--config 'patch.crates-io.ntapi.git="https://github.com/solana-labs/ntapi"' \ | ||
--config 'patch.crates-io.ntapi.rev="5980bbab2e0501a8100eb88c12222d664ccb3a0a"' \ | ||
install spl-token-cli --root "$installDir" | ||
--config 'patch.crates-io.ntapi.rev="97ede981a1777883ff86d142b75024b023f04fad"' \ | ||
install --locked spl-token-cli --root "$installDir" |
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.
@yihau as you suggested at solana-labs/solana-program-library#4471 (comment), we can switch from building to downloading some existing spl tarball from somewhere. seems solang is taking this approach as shown below this file. I have no particular preference; but seeing the below code, needs some work for factoring the below download logic, etc (including testing on Windows). so, moar effort, imo.
So, overall, i think [patch]-ing
is acceptable workaround for now. (after all, this won't be needed, once tokio is upgraded).
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.
also, this is a bit too theoretical. but this bundled spl-token
binary is used rather widely across various integrations. they seldom use cargo install ...
. so, i think using the same monorepo-pinned rust version is conceptually easier to reason about. admittedly, it's rare for rust to expose quite visible runtime/compile differences between versions. but this is possibility.
Also, it's more easy to ship new binary once rust found to contain critical security vuln (this again very unlikely)
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.
sure. let's do this!
Codecov Report
@@ Coverage Diff @@
## master #31981 +/- ##
=========================================
- Coverage 81.9% 81.9% -0.1%
=========================================
Files 760 760
Lines 207407 207407
=========================================
- Hits 169958 169950 -8
- Misses 37449 37457 +8 |
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.
🪖
* Shift crossbeam comment for upcoming 2nd patch... (#31963) * Patch ntapi to restore windows build (#31961) * Patch ntapi to restore windows build * Update Cargo.lock... * Add comment for justification of this patching MSxDOS/ntapi#11 MSxDOS/ntapi#12 * Revert "ci: stop windows building on master temporarily (#31353)" This reverts commit 2dcdfff. * Use solana-labs fork * Ugh.. * Patch ntapi more thoroughly (#31970) * Patch spl-token-cli build as well... * Patch sbf/Cargo.toml for consistency * Remove --locked for cli-arg based patch... (#31971) * Bump patched ntapi from v0.3.6 to v0.3.7 (#31981) * Revert "ci: stop windows build (#31893)" This reverts commit 30f9e43.
Problem
the solana git repo and published spl crate are using different versions of
ntapi
, which is troubling consistent[patch]
-ing. the repo had been pinning tov0.3.6
viaCargo.lock
. but the published spl crate is specifyingv0.3.x
and resolved to latest one:v0.3.7
Summary of Changes
Just use same version, restoring
--locked
.so, this effectively bumps monorepo's ntapi from v0.3.6 to v0.3.7, which seems to contain only small changes:
MSxDOS/ntapi@cbea31e...3a0063a according to:
new patch commit: solana-labs/ntapi@97ede98 :
so, hopefully, this marks the end of window build restoration journey... this and all previous prs will be backported as-is.