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

Add post to call for testing of Cargo's -Z sparse-registry #990

Merged
merged 1 commit into from
Jun 22, 2022

Conversation

arlosi
Copy link
Contributor

@arlosi arlosi commented Jun 16, 2022

We've recently landed all the components necessary to test accessing crates.io over http in Cargo. This blog post should help get more testing of the feature.

Copy link

@Eh2406 Eh2406 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good thank you!
We should get Cargo and crates.io approval.

posts/inside-rust/2022-06-16-http-registry-testing.md Outdated Show resolved Hide resolved
@Mark-Simulacrum
Copy link
Member

This should probably go on the main blog, as it's explicitly written with an external audience in mind -- we want the general Rust user population to test, right?

@eminence
Copy link

Maybe also include a link to https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#http-registry (which has links to the RFC and tracking issue) ?

@arlosi
Copy link
Contributor Author

arlosi commented Jun 16, 2022

This should probably go on the main blog

Makes sense. The other recent crates.io-related post was on the main blog: https://blog.rust-lang.org/2022/02/14/crates-io-snapshot-branches.html I'll move it.

@jsha
Copy link

jsha commented Jun 16, 2022

Some feedback as a potential tester: I'd like to turn this on in CI for my projects. But in CI (GitHub Actions), I use the "matrix" feature to select different versions (stable, beta, nightly, MSRV). I'm currently trying to figure out a tidy way to add -Zhttp-registry to my cargo invocations only when building with nightly. I suspect others will be in the same boat. I'll probably figure out a way to do this with shell scripting, but if there's a handy one-liner it might be useful to share in this post.

@Eh2406
Copy link

Eh2406 commented Jun 16, 2022

From some quick testing if you set it as an environment variable CARGO_UNSTABLE_HTTP_REGISTRY=true then nightly uses the new behavior and cargo stable does not complain. This is a significant enough improvement I would recommend it as the way to test.

env is more ergonomic then .cargo/config.toml then -Zhttp-registry IMO.

posts/2022-06-16-http-registry-testing.md Outdated Show resolved Hide resolved
posts/2022-06-16-http-registry-testing.md Outdated Show resolved Hide resolved
posts/2022-06-16-http-registry-testing.md Outdated Show resolved Hide resolved
posts/2022-06-16-http-registry-testing.md Outdated Show resolved Hide resolved
posts/2022-06-16-http-registry-testing.md Outdated Show resolved Hide resolved
posts/2022-06-16-http-registry-testing.md Outdated Show resolved Hide resolved
Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

Might not be needed, but do we want to collect data? For power users, we may provide a simple guide in order to collect a more structural data for further performance/bug analysis.

@jsha
Copy link

jsha commented Jun 16, 2022

From some quick testing if you set it as an environment variable CARGO_UNSTABLE_HTTP_REGISTRY=true then nightly uses the new behavior and cargo stable does not complain.

Great trick, thanks! I incorporated it in rustls/rustls-ffi#266, and now my nightly job is ~2 min vs ~4 min for stable.

@Eh2406
Copy link

Eh2406 commented Jun 17, 2022

If this is going to be a big deal blog post, we should probably provide a timeline and thank the people involved. This has been in the works for over 2.5 years. @kornelski worked very hard on the RFC and initial performance proof of concept. @jonhoo did the first impl for Cargo, and dealt with over 160 comments on his PR. @arlosi has already made 5 significant PR's to Cargo to get us here, and also did mager work on the crates.io implementation, and worked tirelessly to push this over the finish line! Also thanks to the crates.io and infra teams, this couldn't have been done without your help!
(I know I am forgetting people, please remind me!)

@kornelski
Copy link

kornelski commented Jun 17, 2022

🚲🏠 Is it possible to call the new index, and all options related to it, a sparse index? There's git over HTTP. And if ever this index format is replaced, the next one may use HTTP transport too, so http-registry is a generic name.

posts/2022-06-16-http-registry-testing.md Outdated Show resolved Hide resolved
posts/2022-06-16-http-registry-testing.md Outdated Show resolved Hide resolved
posts/2022-06-16-http-registry-testing.md Outdated Show resolved Hide resolved
posts/2022-06-16-http-registry-testing.md Outdated Show resolved Hide resolved
@arlosi arlosi changed the title Add post to call for testing of Cargo's -Zhttp-registry Add post to call for testing of Cargo's -Z sparse-registry Jun 17, 2022
@arlosi
Copy link
Contributor Author

arlosi commented Jun 17, 2022

@jsha, the name of the unstable flag is changing, so going forward you'll want to use CARGO_UNSTABLE_SPARSE_REGISTRY=true
cc rustls/rustls-ffi#266

@arlosi
Copy link
Contributor Author

arlosi commented Jun 20, 2022

nightly-2022-06-20 has the renamed flag 🎉. I've updated the post with the new nightly date.

@Eh2406
Copy link

Eh2406 commented Jun 21, 2022

I think this is looking good. Thank you!
What are the next steps? How do we get this published?

@arlosi
Copy link
Contributor Author

arlosi commented Jun 21, 2022

Should I go ahead and publish this to the internals forum?

Then we can start getting initial feedback, and I can update the [internals] link in the post.

@Eh2406
Copy link

Eh2406 commented Jun 21, 2022

I updated the testing instructions in the tracking issue to include the more articulate form you created for this blog post. I think were ready for an internals post!

@arlosi
Copy link
Contributor Author

arlosi commented Jun 21, 2022

Copy link
Member

@joshtriplett joshtriplett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. We should wait to merge this until we're ready for the influx of testing, but I'm happy to merge this at any time.

Copy link
Member

@rylev rylev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. The date of the post needs to be changed to reflect today (or whatever date you want to publish). Once that's done, we can merge.

@arlosi
Copy link
Contributor Author

arlosi commented Jun 22, 2022

Thanks everyone for all the review and getting this post ready! @rylev date is updated to today.

Copy link
Member

@rylev rylev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@rylev
Copy link
Member

rylev commented Jun 22, 2022

@arlosi @joshtriplett I just wanted to triple check that you are ready for the feedback, and so you would like this to be merged.

@Eh2406
Copy link

Eh2406 commented Jun 22, 2022

Feedback on internals is suggesting that the version date is confusing given that the cargo and rustc dates do not match.

@arlosi
Copy link
Contributor Author

arlosi commented Jun 22, 2022

Let's wait until we do another Cargo update in the rust repo. Then we can give a nightly date that works for both rustup and cargo.

Edit decided to update the post instead.

@Eh2406
Copy link

Eh2406 commented Jun 22, 2022

I think we are ready!

Copy link

@Eh2406 Eh2406 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The longer we leave this open, the more things we will find to tinker with.
However, this is more than good enough to release.

@arlosi
Copy link
Contributor Author

arlosi commented Jun 22, 2022

Agreed. I think we're good to release.

@joshtriplett joshtriplett merged commit 32684fd into rust-lang:master Jun 22, 2022
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.