-
Notifications
You must be signed in to change notification settings - Fork 13k
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
[Experiment] set .cargo/registry/src as readonly #98370
Conversation
@bors try |
⌛ Trying commit cd01cbd8c49aec8aca4ef6012727cb2d670de09e with merge 665f4256561629ddbc1123adf44c84e656ad9db0... |
💔 Test failed - checks-actions |
This comment was marked as outdated.
This comment was marked as outdated.
cd01cbd
to
c012e6c
Compare
This comment was marked as outdated.
This comment was marked as outdated.
@bors try |
⌛ Trying commit c012e6c26e60d903253621afabca19e1b1f5a87a with merge 56723e30e40b52b73b9722d31caeec71c84a0ed4... |
I don't think there's an existing way to do this: https://github.com/rust-lang/crater/blob/master/docs/bot-usage.md#available-experiment-modes. |
☀️ Try build successful - checks-actions |
Thanks for the info! I am fine with check-only mode first. Let me check if I get the permission. @craterbot run mode=check-only crates=top-100 |
🔒 Error: you're not allowed to interact with this bot. 🔑 If you are a member of the Rust team and need access, add yourself to the whitelist. |
Okay, no 😞 |
@craterbot run mode=check-only crates=top-100 |
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
@craterbot cancel @craterbot run mode=check-only crates=top-100 p=1 (this is fast to run, no need to wait a week) |
🚨 Error: failed to parse the command 🆘 If you have any trouble with Crater please ping |
@craterbot abort name=pr-98370 @craterbot run mode=check-only crates=top-100 p=1 (this is fast to run, no need to wait a week) |
🗑️ Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
@craterbot run mode=check-only crates=top-100 p=1 (this is fast to run, no need to wait a week) |
🚨 Error: failed to parse the command 🆘 If you have any trouble with Crater please ping |
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🎉 Experiment
|
I haven't had a chance to look at this, but I just wanted to quickly mention that you can implement whatever logic you want inside your cargo fork. Like in ehuss/cargo@e96bdb0...6901690 is an example of how I did something similar. It has an environment variable so that the "outer" Also, I also wanted to mention that I think crater prefetches all dependencies, so this may not work as expected. Sorry, I forgot about that when we were discussing this earlier. I'm also not certain how CARGO_HOME gets mounted in the docker container, and whether or not you can actually modify CARGO_HOME. (Sorry, I have forgotten a lot of how rustwide works.) Also, just looking at the diff, it looks like the |
c012e6c
to
d0371b8
Compare
Oops. My fault. Thanks for the tip ehuss. Updated here weihanglo/cargo@fa889b3 @bors try |
⌛ Trying commit d0371b8 with merge caa9a0ab7f12e74ec4868e297b789e6c6860d50a... |
☀️ Try build successful - checks-actions |
Me again. @jyn514 could you help run the same crater command again please 🙏🏾 |
@craterbot run mode=check-only crates=top-100 p=1 |
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🎉 Experiment
|
Looks like @ehuss was right:
On the bright side I think this means that anything Crater is compiling isn't writing to the registry? |
I would rephrase this to any successful compilation in Crater won't be writing to the registry. You can probably download a full-run's results e.g., https://crater-reports.s3.amazonaws.com/pr-99217/logs-archives/all.tar.gz and grep those logs for Read-only filesystem to try to get an idea of the percentage of crates we fail to run due to this issue (at least at cargo check time). |
Going to close this now. Will revisit if I have more time on it. |
Need a crater run on
check
mode to see how readonly registry sources break stuff.This does not take into account the case which I mentioned earlier, so failure cases may be far less than expected. I will appreciate if anyone gives a hint about how to make crater run
cargo c && rm -rf ~/.cargo/registry/src
&&cargo c
:)Still, changing the permission bits causes
build.rs
not able to run some executables1, or makes.cargo-ok
not able to write2. So, let's see how far it goes.r? @ghost
Footnotes
https://github.com/rust-lang/cargo/pull/9131 ↩
https://github.com/rust-lang/cargo/blob/c9d8c28cba959c347271eaf31c9abfbb74c690bd/src/cargo/sources/registry/mod.rs#L657-L664 ↩