near / cargo-near

Cargo extension for building Rust smart contracts on NEAR
Apache License 2.0
36 stars 17 forks source link

chore!: remove unsafe `std::env::set_var` #228

Closed dj8yfo closed 1 month ago

dj8yfo commented 2 months ago

api example for build scripts - build.rs

this has been extensively tested on following cases:

sample-crate

  1. https://github.com/dj8yfo/sample_no_workspace/tree/test_remove_unsafe_env_set_var-no-docker => sample-crate-104.testnet

  2. https://github.com/dj8yfo/sample_no_workspace/tree/32b06ab1be4bfd49cf54e6cda4e9d8481215195b => sample-crate-105.testnet

factory-rust

  1. ok (same bs / image) https://github.com/dj8yfo/factory-rust/tree/c5a970b4fb9436d2d9009035edbd1017e7f31a87 => repro-fct-76.testnet , ...

  2. fail (new bs / old image) https://github.com/dj8yfo/factory-rust/tree/f3b9c74d4d759c32274554d598c5c91310e0bf47 => repro-fct-77.testnet , ... fails reproducibility verification, across breaking change boundary (builder version cargo-near-build 0.2.0 -> builder environment version 0.6.4)

  3. fail (old bs / new image) https://github.com/dj8yfo/factory-rust/tree/386f8ce9e0d7c8afcc931afb6dc64d564870adaf => repro-fct-78.testnet , ... fails reproducibility verification, across breaking change boundary (builder version cargo-near-build 0.1.0 -> builder environment version cargo-near-build 0.2.0)

neardevhub

  1. https://github.com/dj8yfo/neardevhub-contract/tree/e1882a5149168c38841205ecc8370529bf2d3ecb => community.devhub-unse.testnet

  2. https://github.com/dj8yfo/neardevhub-contract/tree/e1882a5149168c38841205ecc8370529bf2d3ecb => community.devhub-unsf.testnet

dj8yfo commented 2 months ago

@race-of-sloths ping

race-of-sloths commented 2 months ago

@dj8yfo Thank you for your contribution! Your pull request is now a part of the Race of Sloths!

[

<source media="(prefers-color-scheme: light)" srcset="https://badge.race-of-sloths.com/dj8yfo?type=bot&pr=near/cargo-near/228&theme=light">
<img alt="Shows profile picture for the author of the PR" src="https://badge.race-of-sloths.com/dj8yfo?type=bot&pr=near/cargo-near/228&theme=white">

](https://race-of-sloths.com/profile/dj8yfo)

Current status: executed | Reviewer | Score | |--------|--------| | @frol | 13 | Your contribution is much appreciated with a final score of 13! You have received 143 (130 base + 10% lifetime bonus) Sloth points for this contribution We would appreciate your feedback or contribution idea that you can submit [here](https://github.com/NEAR-DevHub/race-of-sloths/issues/new/choose)
What is the Race of Sloths

Race of Sloths is a friendly competition where you can participate in challenges and compete with other open-source contributors within your normal workflow For contributors: - Tag @race-of-sloths inside your pull requests - Wait for the maintainer to review and score your pull request - Check out your position in the [Leaderboard](https://race-of-sloths.com/leaderboard) - Keep weekly and monthly streaks to reach higher positions - Boast your contributions with a dynamic picture of your [Profile](https://race-of-sloths.com/profile/dj8yfo) For maintainers: - Score pull requests that participate in the Race of Sloths - Engage contributors with fair scoring and fast responses so they keep their streaks - Promote the Race to the point where the Race starts promoting you - Grow the community of your contributors Feel free to check [our website](https://race-of-sloths.com) for additional details!

Bot commands - For contributors - **Include a PR:** `@race-of-sloths include` to enter the Race with your PR - For maintainers: - **Invite contributor** `@race-of-sloths invite` to invite the contributor to participate in a race or include it, if it's already a runner. - **Assign points:** `@race-of-sloths score [1/2/3/5/8/13]` to award points based on your assessment. - **Reject this PR:** `@race-of-sloths exclude` to send this PR back to the drawing board. - **Exclude repo:** `@race-of-sloths pause` to stop bot activity in this repo until `@race-of-sloths unpause` command is called
race-of-sloths-bot commented 1 month ago

@dj8yfo Thank you for your contribution! Your pull request is now a part of the Race of Sloths!

[

<source media="(prefers-color-scheme: light)" srcset="https://badge.race-of-sloths.com/dj8yfo?type=bot&pr=near/cargo-near/228&theme=light">
<img alt="Shows profile picture for the author of the PR" src="https://badge.race-of-sloths.com/dj8yfo?type=bot&pr=near/cargo-near/228&theme=white">

](https://race-of-sloths.com/profile/dj8yfo)

Current status: waiting for scoring We're waiting for maintainer to score this pull request with `@race-of-sloths score [0,1,2,3,5,8,13]` command. Alternatively, autoscoring [1,2] will be applied for this pull request
What is the Race of Sloths

Race of Sloths is a friendly competition where you can participate in challenges and compete with other open-source contributors within your normal workflow For contributors: - Tag @race-of-sloths inside your pull requests - Wait for the maintainer to review and score your pull request - Check out your position in the [Leaderboard](https://race-of-sloths.com/leaderboard) - Keep weekly and monthly streaks to reach higher positions - Boast your contributions with a dynamic picture of your [Profile](https://race-of-sloths.com/profile/dj8yfo) For maintainers: - Score pull requests that participate in the Race of Sloths - Engage contributors with fair scoring and fast responses so they keep their streaks - Promote the Race to the point where the Race starts promoting you - Grow the community of your contributors Feel free to check [our website](https://race-of-sloths.com) for additional details!

Bot commands - For contributors - **Include a PR:** `@race-of-sloths include` to enter the Race with your PR - For maintainers: - **Invite contributor** `@race-of-sloths invite` to invite the contributor to participate in a race or include it, if it's already a runner. - **Assign points:** `@race-of-sloths score [1/2/3/5/8/13]` to award points based on your assessment. - **Reject this PR:** `@race-of-sloths exclude` to send this PR back to the drawing board. - **Exclude repo:** `@race-of-sloths pause` to stop bot activity in this repo until `@race-of-sloths unpause` command is called