@@ -716,25 +716,15 @@ func (b *Builder) vetAction(mode, depMode BuildMode, p *load.Package) *Action {
716
716
a := b .cacheAction ("vet" , p , func () * Action {
717
717
a1 := b .CompileAction (mode | ModeVetOnly , depMode , p )
718
718
719
- // vet expects to be able to import "fmt".
720
- var stk load.ImportStack
721
- stk .Push (load .NewImportInfo ("vet" , nil ))
722
- p1 , err := load .LoadImportWithFlags ("fmt" , p .Dir , p , & stk , nil , 0 )
723
- if err != nil {
724
- base .Fatalf ("unexpected error loading fmt package from package %s: %v" , p .ImportPath , err )
725
- }
726
- stk .Pop ()
727
- aFmt := b .CompileAction (ModeBuild , depMode , p1 )
728
-
729
719
var deps []* Action
730
720
if a1 .buggyInstall {
731
- // (*Builder).vet expects deps[0] to be the package
732
- // and deps[1] to be "fmt". If we see buggyInstall
721
+ // (*Builder).vet expects deps[0] to be the package.
722
+ // If we see buggyInstall
733
723
// here then a1 is an install of a shared library,
734
724
// and the real package is a1.Deps[0].
735
- deps = []* Action {a1 .Deps [0 ], aFmt , a1 }
725
+ deps = []* Action {a1 .Deps [0 ], a1 }
736
726
} else {
737
- deps = []* Action {a1 , aFmt }
727
+ deps = []* Action {a1 }
738
728
}
739
729
for _ , p1 := range p .Internal .Imports {
740
730
deps = append (deps , b .vetAction (mode , depMode , p1 ))
0 commit comments