diff options
author | 2022-11-23 17:54:55 +0000 | |
---|---|---|
committer | 2022-12-12 17:33:06 +0000 | |
commit | 0e2a5bc0757e6d9dd93a36dea3bfb98faedb77bd (patch) | |
tree | 0d08e85e49f11cc23a24d99f497513b74a268479 /sdk/sdk.go | |
parent | d796f6f6dcb1c34bb7ed5c699588eb3938a3ed37 (diff) |
Remove memberDepsMutator, SdkAware et al
Previously, the memberDepsMutator was responsible for tracking the
membership of modules in an sdk/module_exports (or corresponding
snapshot). That was only used to determine whether a module was in a
versioned sdk snapshot so that it could be treated differently by the
build. As there are no versioned sdk snapshots these can now be
removed.
This change removes the memberDepsMutator, along with SdkAware and
related types that are no longer used.
Bug: 260237150
Test: m nothing
Change-Id: I2668679a42d5b3f33f9e06d5b59804dfdae5f6da
Diffstat (limited to 'sdk/sdk.go')
-rw-r--r-- | sdk/sdk.go | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/sdk/sdk.go b/sdk/sdk.go index aeeedb428..66a1b54ae 100644 --- a/sdk/sdk.go +++ b/sdk/sdk.go @@ -17,7 +17,6 @@ package sdk import ( "fmt" "io" - "strconv" "github.com/google/blueprint" "github.com/google/blueprint/proptools" @@ -280,7 +279,6 @@ var _ android.SdkDependencyContext = (*dependencyContext)(nil) // outside of the sdk package func RegisterPreDepsMutators(ctx android.RegisterMutatorsContext) { ctx.BottomUp("SdkMember", memberMutator).Parallel() - ctx.TopDown("SdkMember_deps", memberDepsMutator).Parallel() } type dependencyTag struct { @@ -324,36 +322,3 @@ func memberMutator(mctx android.BottomUpMutatorContext) { } } } - -// Step 2: record that dependencies of SDK modules are members of the SDK modules -func memberDepsMutator(mctx android.TopDownMutatorContext) { - if s, ok := mctx.Module().(*sdk); ok { - mySdkRef := android.ParseSdkRef(mctx, mctx.ModuleName(), "name") - if s.snapshot() && mySdkRef.Unversioned() { - mctx.PropertyErrorf("name", "sdk_snapshot should be named as <name>@<version>. "+ - "Did you manually modify Android.bp?") - } - if !s.snapshot() && !mySdkRef.Unversioned() { - mctx.PropertyErrorf("name", "sdk shouldn't be named as <name>@<version>.") - } - if mySdkRef.Version != "" && mySdkRef.Version != "current" { - if _, err := strconv.Atoi(mySdkRef.Version); err != nil { - mctx.PropertyErrorf("name", "version %q is neither a number nor \"current\"", mySdkRef.Version) - } - } - - mctx.VisitDirectDeps(func(child android.Module) { - if member, ok := child.(android.SdkAware); ok { - member.MakeMemberOf(mySdkRef) - } - }) - } -} - -// An interface that encapsulates all the functionality needed to manage the sdk dependencies. -// -// It is a mixture of apex and sdk module functionality. -type sdkAndApexModule interface { - android.Module - android.DepIsInSameApex -} |