mirror of https://github.com/golang/go.git
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 <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com>
This commit is contained in:
parent
563860d11d
commit
e2f26524b7
|
|
@ -175,7 +175,8 @@ func (r *ModuleResolver) ClearForNewScan() {
|
||||||
<-r.scanSema
|
<-r.scanSema
|
||||||
r.scannedRoots = map[gopathwalk.Root]bool{}
|
r.scannedRoots = map[gopathwalk.Root]bool{}
|
||||||
r.otherCache = &dirInfoCache{
|
r.otherCache = &dirInfoCache{
|
||||||
dirs: map[string]*directoryPackageInfo{},
|
dirs: map[string]*directoryPackageInfo{},
|
||||||
|
listeners: map[*int]cacheListener{},
|
||||||
}
|
}
|
||||||
r.scanSema <- struct{}{}
|
r.scanSema <- struct{}{}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue