Skip to content

internal: bump dashmap #19445

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

Open
davidbarsky opened this issue Mar 24, 2025 · 3 comments
Open

internal: bump dashmap #19445

davidbarsky opened this issue Mar 24, 2025 · 3 comments

Comments

@davidbarsky
Copy link
Contributor

We should bump dashmap to 7.0.0-rc2 (or whatever the latest version is) in both rust-analyzer and Salsa. This bump would allow us to remove the our dependency on hashbrown's raw API and use hashbrown::HashTable—via Dashmap—directly.

When I gave this a spin last week, the new entry API on HashTable—and, by extension—Dashmap requires some slight adjustments to [define_symbols](https://github.com/rust-lang/rust-analyzer/blob/3ed13b4a917d8028de0808a26ef14eb0abb01035/crates/intern/src/symbol/symbols.rs#L14), but I got distracted by some other stuff before I could finish.

(The 6.0.0 series has some nice performance improvements that'd be nice to take advantage of.)

Originally posted by @davidbarsky in #19430 (comment)

@davidbarsky
Copy link
Contributor Author

I was noodling with updating dashmap earlier today in between meetings (work onsite this week) and it seems like the primary impact of updating to a new version of DashMap is that DashMap::shards now returns a hashbrown::HashTable, whereas previously, it returned a hashbrown::HashMap. I think that's going to have some implications on intern::Interned. I'll pause this work for now as @jackh726 asked us to avoid touching the intern crate in order to make his port to the new trait solver easier.

(I imagine there's now some larger design questions about the intern crate post-new Salsa, too.)

@Veykril
Copy link
Member

Veykril commented Mar 25, 2025

(I imagine there's now some larger design questions about the intern crate post-new Salsa, too.)

I'd expect it to be mostly gone once we moved to salsa proper. Exception being symbol interning which I think we want to keep as is.

@davidbarsky
Copy link
Contributor Author

(I imagine there's now some larger design questions about the intern crate post-new Salsa, too.)

I'd expect it to be mostly gone once we moved to salsa proper. Exception being symbol interning which I think we want to keep as is.

Gotcha. For symbol interning, I'm guessing you're referring to the define_symbols macro, right? The comment on the macro says that these could be const after some transition period; is now an appropriate transition period?

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

No branches or pull requests

2 participants