diff --git a/bootstrap/glob.go b/bootstrap/glob.go index 77de891..a766676 100644 --- a/bootstrap/glob.go +++ b/bootstrap/glob.go @@ -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")} diff --git a/metrics/event_handler.go b/metrics/event_handler.go index f3641b0..3fd0f37 100644 --- a/metrics/event_handler.go +++ b/metrics/event_handler.go @@ -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 }