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: Deduplicate crate graph #18806

Merged
merged 8 commits into from
Jan 3, 2025
Merged

Conversation

LHolten
Copy link
Contributor

@LHolten LHolten commented Dec 31, 2024

See the discussion in #18804

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 31, 2024
@LHolten
Copy link
Contributor Author

LHolten commented Dec 31, 2024

Maybe the deduplication test should be brought back too?

@Veykril
Copy link
Member

Veykril commented Dec 31, 2024

Yes they should

@rustbot

This comment has been minimized.

@rustbot rustbot added has-merge-commits S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 31, 2024
@LHolten LHolten force-pushed the deduplicate-crate-graph branch from c63167a to 1df0d0a Compare December 31, 2024 14:42
@rustbot rustbot removed has-merge-commits S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 31, 2024
@LHolten LHolten force-pushed the deduplicate-crate-graph branch from 1df0d0a to 947dfdc Compare December 31, 2024 14:49
@LHolten
Copy link
Contributor Author

LHolten commented Dec 31, 2024

Brought back the tests

@LHolten
Copy link
Contributor Author

LHolten commented Jan 1, 2025

@Veykril What do you think of just making the CrateGraph::extend method sort the dependencies automatically?
That way it is hard to misuse the CrateGraph api and thus the tests in the rust-analyzer/tests/crate_graph are not really needed, so we can then remove those.

@Veykril
Copy link
Member

Veykril commented Jan 2, 2025

Yes that should be fine. I just realized these tests will be gone soon enough anyways as we are currently doing a big rewrite that includes splitting the crate graph up into smaller parts.

@Veykril Veykril added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 2, 2025
@LHolten
Copy link
Contributor Author

LHolten commented Jan 2, 2025

Done

@filipwiech
Copy link

@rustbot ready

Drive-by question: back when the crate deduplication was originally introduced, I think it promised potential memory usage improvements in r-a. Is it still the case, or has the design changed since then? Sorry for a layman's inquiry. 🙂

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 3, 2025
@Veykril
Copy link
Member

Veykril commented Jan 3, 2025

That is the case (for multi cargo workspace projects)

@Veykril Veykril added this pull request to the merge queue Jan 3, 2025
@filipwiech
Copy link

filipwiech commented Jan 3, 2025

That is the case

Nice, thanks! 👍

(for multi cargo workspace projects)

Ah, yes, now I remember, thank you. 🙂

Merged via the queue into rust-lang:master with commit a440fcb Jan 3, 2025
9 checks passed
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.

4 participants