Skip to content

Commit e2f2652

Browse files
committed
internal/imports: create listener map after clearing for new scan
The module resolver needs to recreate the listener map if it's cleared for a new scan. Change-Id: If5e945d4f2059f2a79aef3129f963a2c50e90229 Reviewed-on: https://go-review.googlesource.com/c/tools/+/214278 Run-TryBot: Rebecca Stambler <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]>
1 parent 563860d commit e2f2652

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/imports/mod.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,8 @@ func (r *ModuleResolver) ClearForNewScan() {
175175
<-r.scanSema
176176
r.scannedRoots = map[gopathwalk.Root]bool{}
177177
r.otherCache = &dirInfoCache{
178-
dirs: map[string]*directoryPackageInfo{},
178+
dirs: map[string]*directoryPackageInfo{},
179+
listeners: map[*int]cacheListener{},
179180
}
180181
r.scanSema <- struct{}{}
181182
}

0 commit comments

Comments
 (0)