Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simplify the use of toolexecCmd in reverse #895

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions reverse.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,9 @@ One can reverse a captured panic stack trace as follows:
}

pkg, args := args[0], args[1:]
listArgs := []string{
"-json",
"-deps",
"-export",
}
listArgs = append(listArgs, flags...)
listArgs = append(listArgs, pkg)
// TODO: We most likely no longer need this "list -toolexec" call, since
// we use the original build IDs.
_, err := toolexecCmd("list", listArgs)
// We don't actually run `go list -toolexec=garble`; we only use toolexecCmd
// to ensure that sharedCache.ListedPackages is filled.
_, err := toolexecCmd("list", []string{pkg})
defer os.RemoveAll(os.Getenv("GARBLE_SHARED"))
if err != nil {
return err
Expand Down
Loading