• Russ Cox's avatar
    cmd/go: fix -coverpkg=all with dot imports · 8d88c9ae
    Russ Cox authored
    If you use -coverpkg=all you get coverage for all packages in the build.
    Go 1.9 used a global counter for all the GoCover variables, so that they
    were distinct for the entire build. The global counter caused problems
    with caching, so we switched to a per-package counter. But now the
    GoCover_0 in one package may be dot-imported into another and
    conflict with the GoCover_0 in that other package.
    
    Reestablish (overwhelmingly likely) global uniqueness of GoCover
    variables by appending an _xxxxxxxxxxxx suffix, where the x's are
    the prefix of the SHA256 hash of the import path. The point is only
    to avoid accidents, not to defeat people determined to break the tools.
    
    Fixes #23432.
    
    Change-Id: I3088eceebbe35174f2eefe8d558b7c8b59d3eeac
    Reviewed-on: https://go-review.googlesource.com/89135Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    8d88c9ae
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...