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

Disable auto-generation of wallet contract by default #10436

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

staffik
Copy link
Contributor

@staffik staffik commented Jan 16, 2024

In some circumstances, runtime/near-wallet-contract/build.rs is triggered and it regenerates the Wallet Contract WASM file for unrelated PRs: #10422 (comment).
The Wallet Contract will be generated differently (#10269 (comment)), but for now I would like to include this tiny PR to stops auto-generating the WASM file by default.

To test that the WASM file is not auto-regenerated, add a space to runtime/near-wallet-contract/wallet-contract/src/lib.rs and run cargo build --features nightly.

@staffik staffik requested a review from a team as a code owner January 16, 2024 10:28
@staffik staffik requested a review from Longarithm January 16, 2024 10:28
@staffik staffik force-pushed the build-wallet-contract-flag branch from 13c1993 to 2271924 Compare January 16, 2024 10:28
@staffik staffik requested review from birchmd and nagisa January 16, 2024 10:29
Copy link

codecov bot commented Jan 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5831e6a) 71.99% compared to head (2271924) 71.99%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #10436   +/-   ##
=======================================
  Coverage   71.99%   71.99%           
=======================================
  Files         720      720           
  Lines      144954   144954           
  Branches   144954   144954           
=======================================
+ Hits       104360   104361    +1     
+ Misses      35811    35805    -6     
- Partials     4783     4788    +5     
Flag Coverage Δ
backward-compatibility 0.08% <ø> (ø)
db-migration 0.08% <ø> (ø)
genesis-check 1.26% <ø> (ø)
integration-tests 36.72% <ø> (-0.09%) ⬇️
linux 71.51% <ø> (-0.01%) ⬇️
linux-nightly 71.55% <ø> (-0.01%) ⬇️
macos 54.84% <ø> (+1.09%) ⬆️
pytests 1.48% <ø> (ø)
sanity-checks 1.27% <ø> (ø)
unittests 68.11% <ø> (ø)
upgradability 0.13% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nagisa
Copy link
Collaborator

nagisa commented Jan 16, 2024

run cargo build --features nightly.

Sounds like you’ll need --features nightly,build_wallet_contract no?

@staffik
Copy link
Contributor Author

staffik commented Jan 16, 2024

run cargo build --features nightly.

Sounds like you’ll need --features nightly,build_wallet_contract no?

Yes, in order to generate the file. Just cargo build --features nightly to see that it is not generated.

@staffik staffik added this pull request to the merge queue Jan 16, 2024
Merged via the queue into master with commit 31cc86c Jan 16, 2024
21 checks passed
@staffik staffik deleted the build-wallet-contract-flag branch January 16, 2024 13:56
github-merge-queue bot pushed a commit that referenced this pull request Jan 31, 2024
Looks like #10436 is not enough,
because the WASM file is still generated if someone manually run tests
with `--all-features` flag, which triggers `build_wallet_contract` too.
To make sure it does not happen at all, I would disable the Wallect
Contract build completely. We currently do not use it anyway.
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.

3 participants