Skip to content

Commit bfda8e2

Browse files
Add ParsedPackage
1 parent 49b59aa commit bfda8e2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

build/build.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,6 +1044,10 @@ func (s *Session) BuildPackage(pkg *PackageData) (*ParsedPackage, error) {
10441044

10451045
// CompilePackage compiles a previously prepared parsed package.
10461046
func (s *Session) CompilePackage(pkg *ParsedPackage) (*compiler.Archive, error) {
1047+
if archive, ok := s.UpToDateArchives[pkg.ImportPath]; ok {
1048+
return archive, nil
1049+
}
1050+
10471051
importContext := &compiler.ImportContext{
10481052
Packages: s.Types,
10491053
Import: s.ImportResolverFor(pkg.Dir),

0 commit comments

Comments
 (0)