-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Rolling up some more PRs #13397
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
Closed
Closed
Rolling up some more PRs #13397
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This separate crate cache is one factor which is causing libstd to be loaded twice during normal compilation. The crates loaded for syntax extensions have a separate cache than the crates loaded for linking, so all crates are loaded once per #[phase] they're tagged with. This removes the cache and instead uses the CStore structure itself as the cache for loaded crates. This should allow crates loaded during the syntax phase to be shared with the crates loaded during the link phase.
When linking, all crates in the local CStore are used to link the final product. With #[phase(syntax)], crates want to be omitted from this linkage phase, and this was achieved by dumping the entire CStore after loading crates. This causes crates like the standard library to get loaded twice. This loading process is a fairly expensive operation when dealing with decompressing metadata. This commit alters the loading process to never register syntax crates in CStore. Instead, only phase(link) crates ever make their way into the map of crates. The CrateLoader trait was altered to return everything in one method instead of having separate methods for finding information.
This is an optimization which is quite impactful for compiling small crates. Reading libstd's metadata takes about 50ms, and a hello world before this change took about 100ms (this change halves that time). Recent changes made it such that this optimization wasn't performed, but I think it's a better idea do to this for now. See rust-lang#10786 for tracking this issue.
Few places where previous version of tidy script cannot find XXX: * inside one-line comment preceding by a few spaces; * inside multiline comments (now it finds it if multiline comment starts on the same line with XXX). Change occurences of XXX found by new tidy script.
Apparently windows doesn't like reading from stdin with a large buffer size, and it also apparently is ok with a smaller buffer size. This changes the reader returned by stdin() to return an 8k buffered reader for stdin rather than a 64k buffered reader. Apparently libuv has run into this before, taking a peek at their code, with a specific comment in their console code saying that "ReadConsole can't handle big buffers", which I presume is related to invoking ReadFile as if it were a file descriptor. Closes rust-lang#13304
Closes rust-lang#11881. This code has been copied from the original issue and updated for modern Rust APIs.
Closes rust-lang#13394 (sync: remove unsafe and add Send+Share to Deref (enabled by autoderef vtables)) Closes rust-lang#13389 (Made libflate functions return Options instead of outright failing) Closes rust-lang#13388 (doc: Document flavorful variations of paths) Closes rust-lang#13387 (Register new snapshots) Closes rust-lang#13386 (std: Add more docs for ptr mod) Closes rust-lang#13384 (Tweak crate loading to load less metadata) Closes rust-lang#13382 (fix ~ZeroSizeType rvalues) Closes rust-lang#13378 (Update tidy script, replace XXX with FIXME) Closes rust-lang#13377 (std: User a smaller stdin buffer on windows) Closes rust-lang#13369 (Fix spelling errors in comments.) Closes rust-lang#13314 (Made 'make install' include libs for additional targets) Closes rust-lang#13278 (std: make vec!() macro handle a trailing comma) Closes rust-lang#13276 (Add test for rust-lang#11881)
bors
added a commit
that referenced
this pull request
Apr 8, 2014
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Oct 18, 2022
fix link in syntax.md
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.