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

Commit 7f034dab authored by Colin Cross's avatar Colin Cross Committed by Automerger Merge Worker
Browse files

Merge "Add libraryDependencyTag to track dependencies on static and shared...

Merge "Add libraryDependencyTag to track dependencies on static and shared libraries" am: 2eddd068 am: f6c453a3

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1378332

Change-Id: I20996cc0ed388013f24966a2d8a9462177bfe45e
parents 6ebeb3e0 f6c453a3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1840,7 +1840,7 @@ func (b *baseModuleContext) GetTagPath() []blueprint.DependencyTag {

// A regexp for removing boilerplate from BaseDependencyTag from the string representation of
// a dependency tag.
var tagCleaner = regexp.MustCompile(`\QBaseDependencyTag:blueprint.BaseDependencyTag{}\E(, )?`)
var tagCleaner = regexp.MustCompile(`\QBaseDependencyTag:{}\E(, )?`)

// PrettyPrintTag returns string representation of the tag, but prefers
// custom String() method if available.
@@ -1851,7 +1851,7 @@ func PrettyPrintTag(tag blueprint.DependencyTag) string {
	}

	// Otherwise, get a default string representation of the tag's struct.
	tagString := fmt.Sprintf("%#v", tag)
	tagString := fmt.Sprintf("%T: %+v", tag, tag)

	// Remove the boilerplate from BaseDependencyTag as it adds no value.
	tagString = tagCleaner.ReplaceAllString(tagString, "")
+3 −3
Original line number Diff line number Diff line
@@ -4450,11 +4450,11 @@ func TestApexAvailable_DirectDep(t *testing.T) {
func TestApexAvailable_IndirectDep(t *testing.T) {
	// libbbaz is an indirect dep
	testApexError(t, `requires "libbaz" that is not available for the APEX. Dependency path:
.*via tag apex\.dependencyTag.*"sharedLib".*
.*via tag apex\.dependencyTag.*name:sharedLib.*
.*-> libfoo.*link:shared.*
.*via tag cc\.DependencyTag.*"shared".*
.*via tag cc\.libraryDependencyTag.*Kind:sharedLibraryDependency.*
.*-> libbar.*link:shared.*
.*via tag cc\.DependencyTag.*"shared".*
.*via tag cc\.libraryDependencyTag.*Kind:sharedLibraryDependency.*
.*-> libbaz.*link:shared.*`, `
	apex {
		name: "myapex",
Loading