@@ -31,6 +31,7 @@ import (
31
31
"golang.org/x/tools/gopls/internal/lsp/filecache"
32
32
"golang.org/x/tools/gopls/internal/lsp/protocol"
33
33
"golang.org/x/tools/gopls/internal/lsp/source"
34
+ "golang.org/x/tools/internal/event"
34
35
"golang.org/x/tools/internal/facts"
35
36
"golang.org/x/tools/internal/gcimporter"
36
37
"golang.org/x/tools/internal/memoize"
@@ -454,13 +455,15 @@ func analyzeImpl(ctx context.Context, snapshot *snapshot, analyzers []*analysis.
454
455
if err != nil {
455
456
return nil , err
456
457
}
457
- data := mustEncode (summary )
458
- if false {
459
- log .Printf ("Set key=%d value=%d id=%s\n " , len (key ), len (data ), id )
460
- }
461
- if err := filecache .Set (cacheKind , key , data ); err != nil {
462
- return nil , fmt .Errorf ("internal error updating shared cache: %v" , err )
463
- }
458
+ go func () {
459
+ data := mustEncode (summary )
460
+ if false {
461
+ log .Printf ("Set key=%d value=%d id=%s\n " , len (key ), len (data ), id )
462
+ }
463
+ if err := filecache .Set (cacheKind , key , data ); err != nil {
464
+ event .Error (ctx , "internal error updating analysis shared cache" , err )
465
+ }
466
+ }()
464
467
}
465
468
466
469
// Hit or miss, we need to merge the export data from
0 commit comments