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

Fix HashMap/HashSet LLDB pretty-printer on Rust <= 1.51 #83906

Conversation

artemmukhin
Copy link
Contributor

@artemmukhin artemmukhin commented Apr 5, 2021

The pretty-printer was broken in #77566 after updating to Rust 1.52.
Now it is compatible with older Rust versions as well.

Fixes #83891

The pretty-printer was broken in rust-lang#77566
after updating to Rust 1.52. Now it is compatible with older Rust versions as well
@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 5, 2021
@ehuss
Copy link
Contributor

ehuss commented Apr 5, 2021

cc @pnkfelix

Thanks for taking a look. However, I don't think this solves #83891 (at least it still fails for me).

That is, running this version of rust-lldb against the latest master, the pretty-std-collections test fails to print a hashmap. #83891 isn't about running against older versions, it is about running against master.

I'm also a bit confused or uncertain about why there is any backwards-compatibility code in this file. My understanding is that rust-lldb is tied to each release, so it is not clear when it would ever be used against an older version.

@artemmukhin
Copy link
Contributor Author

@ehuss Oh, I got it. Originally, I saw Rust 1.50 mention in the issue and thought it is related to backward compatibility.

As for pretty-printers backward compatibility in general, I keep IntelliJ Rust pretty-printers compatible with older Rust versions in order to maintain debugging of Rust code built against any supported (more or less recent) toolchain version. I supposed it might be useful when using rust-lldb from the default toolchain to debug Rust code built against an older toolchain version so I left all backcompat code when merging our pretty-printers to rustc. If backward compatibility is redundant, we can easily drop the irrelevant code.

@artemmukhin artemmukhin closed this Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lldb debuginfo test failure, hash_set/hash_map of size 0 instead of expected size 4?
4 participants