Skip to content

Commit 4e39bf1

Browse files
committed
Update package.go
1 parent c83e36a commit 4e39bf1

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

serve/package.go

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func (s *PluginServe) writeTablesJSON(ctx context.Context, dir string) error {
117117
return os.WriteFile(outputPath, buffer.Bytes(), 0644)
118118
}
119119

120-
func (s *PluginServe) build(pluginDirectory string, target plugin.BuildTarget, distPath, pluginVersion, buildTags string) (*TargetBuild, error) {
120+
func (s *PluginServe) build(pluginDirectory string, target plugin.BuildTarget, distPath, pluginVersion string) (*TargetBuild, error) {
121121
pluginFileName := fmt.Sprintf("plugin-%s-%s-%s-%s", s.plugin.Name(), pluginVersion, target.OS, target.Arch)
122122
pluginPath := path.Join(distPath, pluginFileName)
123123
importPath, err := s.getModuleName(pluginDirectory)
@@ -132,9 +132,9 @@ func (s *PluginServe) build(pluginDirectory string, target plugin.BuildTarget, d
132132
args := []string{"build", "-o", pluginPath}
133133
args = append(args, "-buildmode=exe")
134134
args = append(args, "-ldflags", ldFlags)
135-
// This disables gRPC tracing, which introduces a dependency that blocks dead code elimination\
136-
// https://github.com/grpc/grpc-go/blob/030938e543b4a721cd426d15611d50ecf097dcf3/trace_notrace.go#L23-L25
137-
args = append(args, "-tags", buildTags)
135+
// // This disables gRPC tracing, which introduces a dependency that blocks dead code elimination\
136+
// // https://github.com/grpc/grpc-go/blob/030938e543b4a721cd426d15611d50ecf097dcf3/trace_notrace.go#L23-L25
137+
// args = append(args, "-tags", buildTags)
138138
cmd := exec.Command("go", args...)
139139
cmd.Dir = pluginDirectory
140140
cmd.Stdout = os.Stdout
@@ -404,10 +404,6 @@ func (s *PluginServe) newCmdPluginPackage() *cobra.Command {
404404
message = string(messageBytes)
405405
}
406406
message = normalizeMessage(message)
407-
buildTags := "grpcnotrace"
408-
if cmd.Flag("build-tags").Changed {
409-
buildTags = cmd.Flag("build-tags").Value.String()
410-
}
411407

412408
if err := os.MkdirAll(distPath, 0755); err != nil {
413409
return err
@@ -441,7 +437,7 @@ func (s *PluginServe) newCmdPluginPackage() *cobra.Command {
441437
targets := []TargetBuild{}
442438
for _, target := range s.plugin.Targets() {
443439
fmt.Println("Building for OS: " + target.OS + ", ARCH: " + target.Arch)
444-
targetBuild, err := s.build(pluginDirectory, target, distPath, pluginVersion, buildTags)
440+
targetBuild, err := s.build(pluginDirectory, target, distPath, pluginVersion)
445441
if err != nil {
446442
return fmt.Errorf("failed to build plugin for %s/%s: %w", target.OS, target.Arch, err)
447443
}

0 commit comments

Comments
 (0)