Clean up generated rust-project.json files am: 353405d9fb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1790960 Change-Id: I7b31a68edc398f8b75f6ba091addeb9e4f4ff0cf
This commit is contained in:
@@ -54,7 +54,7 @@ type rustProjectCrate struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type rustProjectJson struct {
|
type rustProjectJson struct {
|
||||||
Roots []string `json:"roots"`
|
// Roots []string `json:"roots"`
|
||||||
Crates []rustProjectCrate `json:"crates"`
|
Crates []rustProjectCrate `json:"crates"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -250,7 +250,7 @@ func (singleton *projectGeneratorSingleton) addCrate(ctx android.SingletonContex
|
|||||||
singleton.project.Crates = append(singleton.project.Crates, crate)
|
singleton.project.Crates = append(singleton.project.Crates, crate)
|
||||||
// rust-analyzer requires that all crates belong to at least one root:
|
// rust-analyzer requires that all crates belong to at least one root:
|
||||||
// https://github.com/rust-analyzer/rust-analyzer/issues/4735.
|
// https://github.com/rust-analyzer/rust-analyzer/issues/4735.
|
||||||
singleton.project.Roots = append(singleton.project.Roots, path.Dir(crate.RootModule))
|
// singleton.project.Roots = append(singleton.project.Roots, path.Dir(crate.RootModule))
|
||||||
return idx, true
|
return idx, true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user