Merge changes I516c984b,I2b3354de am: a405cf7f6a

Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2364231

Change-Id: I29db8b42c0449ee8b2510ca4d5f549e2665ebeb0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot 2022-12-21 16:06:25 +00:00 committed by Automerger Merge Worker
commit a82dd5f183
2 changed files with 4 additions and 2 deletions

View file

@ -237,6 +237,8 @@ func generateGlobNinjaFile(glob *GlobSingleton, config interface{}) ([]byte, []e
return nil, errs
}
// PrepareBuildActions() will write $OUTDIR/soong/globs/$m/$i files
// where $m=bp2build|build and $i=0..numGlobBuckets
extraDeps, errs = ctx.PrepareBuildActions(config)
if len(extraDeps) > 0 {
return nil, []error{fmt.Errorf("shouldn't have extra deps")}

View file

@ -98,12 +98,12 @@ func (h *EventHandler) CompletedEvents() []Event {
h.scopeIds))
}
// Validate no two events have the same full id.
ids := map[string]bool{}
ids := map[string]struct{}{}
for _, event := range h.completedEvents {
if _, containsId := ids[event.Id]; containsId {
panic(fmt.Errorf("Duplicate event registered: %s", event.Id))
}
ids[event.Id] = true
ids[event.Id] = struct{}{}
}
return h.completedEvents
}