Skip to content

Commit

Permalink
save dev state
Browse files Browse the repository at this point in the history
Signed-off-by: onur-ozkan <[email protected]>
  • Loading branch information
onur-ozkan committed Feb 5, 2024
1 parent 8bbdb07 commit 2c32a54
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/bootstrap/src/utils/ra_project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ struct Crate {
proc_macro_dylib_path: Option<String>,
is_workspace_member: bool,
root_module: String,
// This is only for proc-macro crates, we can skip serializing it.
// #[serde(skip)]
manifest_path: String,
}

#[derive(Debug, Default, Serialize, PartialEq, PartialOrd, Ord, Eq)]
Expand Down Expand Up @@ -109,14 +112,13 @@ impl RustAnalyzerProject {

// Find and fill dependencies of crates.
for package in packages {
if package.dependencies.is_empty() {
continue;
}
if let Some(index) =
ra_project.crates.iter().position(|c| c.display_name == package.name)
{
// Needed for proc-macro crates.
ra_project.crates[index].manifest_path = package.manifest_path;

for dependency in package.dependencies {
if let Some(index) =
ra_project.crates.iter().position(|c| c.display_name == package.name)
{
for dependency in package.dependencies {
if let Some(dependency_index) =
ra_project.crates.iter().position(|c| c.display_name == dependency.name)
{
Expand Down

0 comments on commit 2c32a54

Please sign in to comment.