@@ -551,6 +551,7 @@ func (extraction *Extraction) extractError(tw *trap.Writer, err packages.Error,
551
551
log .Printf ("Warning: failed to evaluate symlinks for %s" , wd )
552
552
}
553
553
file = filepath .Join (ewd , "-" )
554
+ extraction .extractFileInfo (tw , file , true )
554
555
} else {
555
556
var rawfile string
556
557
if parts := threePartPos .FindStringSubmatch (pos ); parts != nil {
@@ -585,7 +586,7 @@ func (extraction *Extraction) extractError(tw *trap.Writer, err packages.Error,
585
586
file = afile
586
587
}
587
588
588
- extraction .extractFileInfo (tw , file )
589
+ extraction .extractFileInfo (tw , file , false )
589
590
}
590
591
591
592
extraction .Lock .Lock ()
@@ -654,7 +655,7 @@ func (extraction *Extraction) extractFile(ast *ast.File, pkg *packages.Package)
654
655
return err
655
656
}
656
657
657
- extraction .extractFileInfo (tw , path )
658
+ extraction .extractFileInfo (tw , path , false )
658
659
659
660
extractScopes (tw , ast , pkg )
660
661
@@ -672,7 +673,7 @@ func (extraction *Extraction) extractFile(ast *ast.File, pkg *packages.Package)
672
673
673
674
// extractFileInfo extracts file-system level information for the given file, populating
674
675
// the `files` and `containerparent` tables
675
- func (extraction * Extraction ) extractFileInfo (tw * trap.Writer , file string ) {
676
+ func (extraction * Extraction ) extractFileInfo (tw * trap.Writer , file string , isDummy bool ) {
676
677
// We may visit the same file twice because `extractError` calls this function to describe files containing
677
678
// compilation errors. It is also called for user source files being extracted.
678
679
extraction .Lock .Lock ()
@@ -704,7 +705,9 @@ func (extraction *Extraction) extractFileInfo(tw *trap.Writer, file string) {
704
705
dbscheme .HasLocationTable .Emit (tw , lbl , emitLocation (tw , lbl , 0 , 0 , 0 , 0 ))
705
706
extraction .Lock .Lock ()
706
707
slbl := extraction .StatWriter .Labeler .FileLabelFor (file )
707
- dbscheme .CompilationCompilingFilesTable .Emit (extraction .StatWriter , extraction .Label , extraction .GetFileIdx (file ), slbl )
708
+ if ! isDummy {
709
+ dbscheme .CompilationCompilingFilesTable .Emit (extraction .StatWriter , extraction .Label , extraction .GetFileIdx (file ), slbl )
710
+ }
708
711
extraction .Lock .Unlock ()
709
712
break
710
713
}
0 commit comments