File tree 1 file changed +7
-3
lines changed 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -696,21 +696,25 @@ func (s *snapshot) reloadWorkspace(ctx context.Context) error {
696
696
697
697
// See which of the workspace packages are missing metadata.
698
698
s .mu .Lock ()
699
- var pkgPaths [] interface {}
699
+ pkgPathSet := map [ packagePath ] struct {} {}
700
700
for id , pkgPath := range s .workspacePackages {
701
701
// Don't try to reload "command-line-arguments" directly.
702
702
if pkgPath == "command-line-arguments" {
703
703
continue
704
704
}
705
705
if s .metadata [id ] == nil {
706
- pkgPaths = append ( pkgPaths , pkgPath )
706
+ pkgPathSet [ pkgPath ] = struct {}{}
707
707
}
708
708
}
709
709
s .mu .Unlock ()
710
710
711
- if len (pkgPaths ) == 0 {
711
+ if len (pkgPathSet ) == 0 {
712
712
return nil
713
713
}
714
+ var pkgPaths []interface {}
715
+ for pkgPath := range pkgPathSet {
716
+ pkgPaths = append (pkgPaths , pkgPath )
717
+ }
714
718
return s .load (ctx , pkgPaths ... )
715
719
}
716
720
You can’t perform that action at this time.
0 commit comments