-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add troubleshooting about go caches (#44)
- Loading branch information
Showing
4 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# How do I address errors when I run tests? | ||
|
||
## What's happening | ||
|
||
If you get Go errors after you issue the `make run-tests-local` command multiple times, you might have a corrupt Go cache. | ||
|
||
## Why it's happening | ||
|
||
Go caches the build outputs for reuse. Data is deleted periodically. | ||
|
||
## How to fix it | ||
|
||
Run `go clean -cache` to remove all cached data from the build process. Then run the tests again. The `-clean` option removes all cached packages, builds, and cached downloaded modules. | ||
|
||
You can also run the command with these more specific options: | ||
- The `-testcache` option removes the cached test results in the build cache. | ||
- The `-modcache` option cleans the module download cache. | ||
|
||
For more information, see [Build and test caching](https://pkg.go.dev/cmd/go#hdr-Build_and_test_caching) in the Go documentation. |