From 69c78e9b6e18e057990fa35a37e0232267d6c0df Mon Sep 17 00:00:00 2001 From: Cole Faust Date: Tue, 10 Sep 2024 16:46:06 -0700 Subject: [PATCH] Rerun globs when a dependency is missing If you remove a folder that's part of a glob, soong will error out currently. Instead treat it like an out-of-date dependency. Bug: 364749114 Test: m nothing, rm glob folder, m nothing Change-Id: I86ee755a0815b79192133223f8ef3ecd90669db1 --- ui/build/soong.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/build/soong.go b/ui/build/soong.go index 76a3e3536..97bc9971e 100644 --- a/ui/build/soong.go +++ b/ui/build/soong.go @@ -759,7 +759,10 @@ func checkGlobs(ctx Context, finalOutFile string) error { hasNewDep := false for _, dep := range cachedGlob.Deps { info, err := os.Stat(dep) - if err != nil { + if errors.Is(err, fs.ErrNotExist) { + hasNewDep = true + break + } else if err != nil { errorsChan <- err continue }