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

Allow customize stackpath prefix for go_repository rule #1379

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bozaro
Copy link
Contributor

@bozaro bozaro commented Nov 28, 2022

What type of PR is this?

Feature

What package or component does this PR mostly affect?

go_repository

What does this PR do? Why is it needed?

We use go build for local development and bazel build for CI.
Our IDE has Analyze Stack Trace feature for navigation to code from log traces.

So, we want to have more IDE friendly logfile stack traces like:

3 @ 0x447bb6 0x457a3c 0xc0ee95 0xc0f5a5 0xc18d8a 0x479161
#	0xc0ee94	google.golang.org/grpc/internal/transport.(*controlBuffer).get+0x114	go/pkg/mod/google.golang.org/grpc@v1.47.0/internal/transport/controlbuf.go:408
#	0xc0f5a4	google.golang.org/grpc/internal/transport.(*loopyWriter).run+0x84	go/pkg/mod/google.golang.org/grpc@v1.47.0/internal/transport/controlbuf.go:535
#	0xc18d89	google.golang.org/grpc/internal/transport.newHTTP2Client.func3+0x69	go/pkg/mod/google.golang.org/grpc@v1.47.0/internal/transport/http2_client.go:415

instead of:

1 @ 0x438d96 0x448812 0xeb7155 0xeb7865 0xec0fc5 0x468e81
#	0xeb7154	google.golang.org/grpc/internal/transport.(*controlBuffer).get+0x114	external/org_golang_google_grpc/internal/transport/controlbuf.go:408
#	0xeb7864	google.golang.org/grpc/internal/transport.(*loopyWriter).run+0x84	external/org_golang_google_grpc/internal/transport/controlbuf.go:535
#	0xec0fc4	google.golang.org/grpc/internal/transport.newHTTP2Client.func3+0x64	external/org_golang_google_grpc/internal/transport/http2_client.go:415

This PR allow customize stackpath prefix for go_repository rule like:

    go_repository(
        name = "org_golang_google_grpc",
        importpath = "google.golang.org/grpc",
        stackpath = "go/pkg/mod/google.golang.org/grpc@v1.47.0",
        sum = "h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8=",
        version = "v1.47.0",
        ...
    )

Other notes for review

Depends on:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant