Keep resolved defs in path prefixes and emit them in save-analysis#54145
Keep resolved defs in path prefixes and emit them in save-analysis#54145bors merged 10 commits intorust-lang:masterfrom
Conversation
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
|
r? @petrochenkov cc @alexcrichton @nikomatsakis Could you add support in stability checking, for looking at these |
src/libsyntax/parse/parser.rs
Outdated
|
CI is failing + this needs a perf run (new fields in path segments + a lot more node IDs). |
src/librustc_resolve/lib.rs
Outdated
There was a problem hiding this comment.
Resolve code is a lot uglier now due to these &[(Ident, Option<NodeId>)] things, but hopefully this can be refactored later.
There was a problem hiding this comment.
Maybe a resolve-specific PathSegment struct would be better?
|
Long-term we might instead want nested |
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
|
I've addressed reviewer comments, but looks like we're still failing CI. I'm away for a few days and will investigate when I get back |
|
☔ The latest upstream changes (presumably #54086) made this pull request unmergeable. Please resolve the merge conflicts. |
721229b to
404c55c
Compare
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
|
☔ The latest upstream changes (presumably #54389) made this pull request unmergeable. Please resolve the merge conflicts. |
src/librustc/hir/map/mod.rs
Outdated
There was a problem hiding this comment.
You should probably implement this, to avoid cascading issues.
src/librustc/hir/mod.rs
Outdated
There was a problem hiding this comment.
Any reason these are Option? I'd say fix and/or document them.
There was a problem hiding this comment.
We don't use them for synthesized path segments. I've added docs.
|
Still needs a rebase, ICE fix, and @rust-timer run. |
|
Insufficient permissions to issue commands to rust-timer. |
404c55c to
81ee74b
Compare
|
Rebased and ICE fixed. How do I do a rust-timer run? I collected data locally but couldn't run the site. |
|
📌 Commit 6dd5bb1 has been approved by |
Keep resolved defs in path prefixes and emit them in save-analysis Closes rust-dev-tools/rls-analysis#109 r? @eddyb or @petrochenkov
|
☀️ Test successful - status-appveyor, status-travis |
Tested on commit rust-lang/rust@7b0735a. Direct link to PR: <rust-lang/rust#54145> 💔 rls on windows: test-pass → test-fail (cc @nrc, @rust-lang/infra). 💔 rls on linux: test-pass → test-fail (cc @nrc, @rust-lang/infra).
|
The RLS test failures: |
save-analysis: bug fix and optimisation. The first commit fixes a bug in name resolution and save-analysis (introduced in #54145) and removes an unused parameter. This fixes the RLS tests, which are currently blocking distribution of the RLS. The second commit removes macro uses from save-analysis data, since these are never used, they just take up space. r? @petrochenkov
save-analysis: bug fix and optimisation. The first commit fixes a bug in name resolution and save-analysis (introduced in #54145) and removes an unused parameter. This fixes the RLS tests, which are currently blocking distribution of the RLS. The second commit removes macro uses from save-analysis data, since these are never used, they just take up space. r? @petrochenkov
Give each PathSegment a NodeId Store a resolved def on hir::PathSegment save-analysis: remove hacky, unnecessary code now that we have spans for every ident dump data for prefix path segments dump refs for path segments in save-analysis Requires adding path segments to the hir map Fix tests and rustdoc save-analysis: handle missing field names FIxes rust-lang/rls#1031 rebasing and reviewer changes Primarily refactoring `(Ident, Option<NodeId>)` to `Segment` Fix tests and assertions; add some comments more reviewer changes
beta backport rollup Backports of some beta-approved PRs - [x] #55385: NLL: cast causes failure to promote to static - [x] #56043: remove "approx env bounds" if we already know from trait - [x] #56003: do not propagate inferred bounds on trait objects if they involve `Self` - [x] #55852: Rewrite `...` as `..=` as a `MachineApplicable` 2018 idiom lint - [x] #55804: rustdoc: don't inline `pub use some_crate` unless directly asked to - [x] #56059: Increase `Duration` approximate equal threshold to 1us - [x] Keep resolved defs in path prefixes and emit them in save-analysis #54145 - [x] Adjust Ids of path segments in visibility modifiers #55487 - [x] save-analysis: bug fix and optimisation. #55521 - [x] save-analysis: be even more aggressive about ignorning macro-generated defs #55936 - [x] save-analysis: fallback to using path id #56060 - [x] save-analysis: Don't panic for macro-generated use globs #55879 - [x] Add temporary renames to manifests for rustfmt/clippy #56081 - [x] Revert #51601 #56049 - [x] Fix stability hole with `static _` #55983 - [x] #56077 - [x] Fix Rustdoc ICE when checking blanket impls #55258 - [x] Updated RELEASES.md for 1.31.0 #55678 - [x] ~~#56061~~ #56111 - [x] Stabilize `extern_crate_item_prelude` #56032 Still running tests locally, and I plan to backport @nrc's other PRs too (cc @petrochenkov -- thanks for the advice)
Closes rust-dev-tools/rls-analysis#109
r? @eddyb or @petrochenkov