Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 353405d9 authored by Chris Wailes's avatar Chris Wailes
Browse files

Clean up generated rust-project.json files

This CL removes the roots section from the rust-projects.json file as it
is no longer required by the rust-analyzer tool.

Bug: 162055556
Test: prebuilts/rust/tests/rust-analyzer-integration-test.sh
Change-Id: I85c3277632c88394bc52e709ecce83f6aa1f2e0e
parent 67d6ccec
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ type rustProjectCrate struct {
}

type rustProjectJson struct {
	Roots  []string           `json:"roots"`
	// Roots  []string           `json:"roots"`
	Crates []rustProjectCrate `json:"crates"`
}

@@ -250,7 +250,7 @@ func (singleton *projectGeneratorSingleton) addCrate(ctx android.SingletonContex
	singleton.project.Crates = append(singleton.project.Crates, crate)
	// rust-analyzer requires that all crates belong to at least one root:
	// 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
}