diff --git a/provider/server.go b/provider/server.go index 81552beb..3509d911 100644 --- a/provider/server.go +++ b/provider/server.go @@ -2,10 +2,12 @@ package provider import ( "context" + "encoding/json" "fmt" "log" "math/rand" "net" + "os" "sync" "time" @@ -265,6 +267,12 @@ func (s *server) GetDependencies(ctx context.Context, in *libgrpc.ServiceRequest fileDeps = append(fileDeps, &fd) } + if content, err := json.MarshalIndent(&fileDeps, " ", " "); err == nil { + if f, err := os.CreateTemp("/tmp/debug-rpc", ""); err == nil { + f.Write(content) + } + } + return &libgrpc.DependencyResponse{ Successful: true, FileDep: fileDeps,