1 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: gopls/internal/filecache/filecache.go
Insertions: 1, Deletions: 1.
@@ -90,7 +90,7 @@
//
// Get returns [ErrNoCache] if the cache did not exist and could not
// be created. This may be due to ENOSPC, deletion of the process's
-// executable, or deletion or corruption of the cache by external
+// executable, deletion or corruption of the cache by external
// meddling while gopls is running, or by faulty hardware (see issue
// #67433). In this case, terminating the application is likely the
// best course; see [GetOrFatal].
```
gopls/internal/filecache: add GetOrFatal and ErrNoCache
Filecache errors are of three kinds:
1. ErrNotFound, the normal cache miss case.
2. failure to create the cache for some reason,
such as ENOSPC. This is generally unrecoverable,
and best not treated as a cache miss since performance
will inevitably be terrible.
3. unexpected error reading a cache entry.
This change defines a distinguished error type, ErrNoCache,
for errors of the second kind, and adds a helper, GetOrFatal,
that calls log.Fatal when this error is encountered; it also
logs other unexpected errors. This makes all call sites much
simpler, and should address the various telemetry reports.
Fixes golang/go#79803
Fixes golang/go#67433
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |