• David Crawshaw's avatar
    cmd/go: add source file contents to plugin hash · 4e2ef7f7
    David Crawshaw authored
    It is common to have multiple plugins built from ephemeral
    source files all with the same name:
    
    	# generate main.go
    	go build -buildmode=plugin -o=p1.so main.go
    	# rm main.go, generate new main.go
    	go build -buildmode=plugin -o=p2.so main.go
    	...
    
    These different plugins currently have the same build ID,
    and hence the same package path. This means only one can be
    loaded.
    
    To remove this restriction, this commit adds the contents of the
    main package source files to the plugin hash.
    
    Fixes #19358
    
    Change-Id: Icd42024b085feb29c09c2771aaecb85f8b528dd3
    Reviewed-on: https://go-review.googlesource.com/61170
    Run-TryBot: David Crawshaw <crawshaw@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    4e2ef7f7
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...