Skip to content

feat(project-model): provide flag for no deps #19519

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

Merged
merged 1 commit into from
Apr 4, 2025

Conversation

snprajwal
Copy link
Contributor

@snprajwal snprajwal commented Apr 4, 2025

A Cargo project can now be built without any dependency metadata being fetched. This classifies as a breaking change for the ra_ap_project_model public API, since we introduce a new field into the config struct, and a new configuration option for the analyzer.

Fixes #19518

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 4, 2025
@snprajwal snprajwal force-pushed the project-control-no-deps branch 2 times, most recently from 4a369d2 to f48835e Compare April 4, 2025 13:26
A Cargo project can now be built without any dependency metadata being fetched.

Signed-off-by: Prajwal S N <[email protected]>
@snprajwal snprajwal force-pushed the project-control-no-deps branch from f48835e to 865681d Compare April 4, 2025 13:27
@Veykril Veykril added this pull request to the merge queue Apr 4, 2025
Copy link
Contributor

@davidbarsky davidbarsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have a naming nit about the configuration option.

Merged via the queue into rust-lang:master with commit 55c8cde Apr 4, 2025
13 checks passed
@Veykril
Copy link
Member

Veykril commented Apr 4, 2025

Welp

@snprajwal
Copy link
Contributor Author

have a naming nit about the configuration option.

@davidbarsky I had the same quandary, but I decided to go with noDeps so that we can derive Default with the correct value in the equivalent struct field (false by default). Using fetchDeps would either require us to impl Default explicitly, or have a disparity between the naming across the r-a config and internal struct.

@davidbarsky
Copy link
Contributor

A manual Default implementation is fine. I'd prefer a slightly better user experience over a manual implementation. If we want to be really future-proof, this should probably be an enum

Regardless, I can flip naming in a followup PR.

@BenjaminBrienen
Copy link
Contributor

You might call it offline if you want the feature to cover other use cases intended for an offline workflow. The fact that it is --no-deps could be an implementation detail of offline mode.

@davidbarsky
Copy link
Contributor

Lukas points out that this mirrors Cargo, so I won't bother changing it.

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.

[project-model] Provide a config option to enable --no-deps for Cargo projects
5 participants