Attribute local index files a digest based on their filename.
Summary:
When analyzing "local" compilations from files, report the base name of the
file as the unit's "digest" so the driver has something useful to log.
Reviewers: #core_team, schroederc, zarko
Subscribers: #core_team
@@ -21,6 +21,7 @@ import (
"context"
"fmt"
"io"
+ "path/filepath"
"kythe.io/kythe/go/platform/analysis"
"kythe.io/kythe/go/platform/analysis/driver"
@@ -75,6 +76,7 @@ func (k *KIndexQueue) Next(ctx context.Context, f driver.CompilationFunc) error
err = f(ctx, driver.Compilation{
Unit: cu.Proto,
Revision: k.revision,
+ UnitDigest: filepath.Base(path),
})
k.Fetcher = nil
