Skip to content

Commit

Permalink
Revert "Get reproxytool to start building on Windows"
Browse files Browse the repository at this point in the history
This reverts commit 03bf46b20242fe09836396dd92249f0e6623c122.

Reason for revert: This is breaking windows continuous build.
Bug: n/a
Test: n/a

Change-Id: Ibac104e6549ba6d98dbb1a2f0d1ba92e9eed1355
GitOrigin-RevId: dfc2011f25e8f4dfd75893480c2a221f65210fb0
  • Loading branch information
gkousik authored and copybara-github committed Jul 30, 2024
1 parent a245c37 commit fe45758
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 11 deletions.
1 change: 0 additions & 1 deletion cmd/reproxytool/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ go_binary(
embed = [":reproxytool_lib"],
target_compatible_with = select({
"@platforms//os:linux": [],
"@platforms//os:windows": [],
"//conditions:default": ["@platforms//:incompatible"],
}),
visibility = ["//visibility:public"],
Expand Down
4 changes: 1 addition & 3 deletions internal/pkg/logrecordserver/logrecordserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"encoding/json"
"io/fs"
"net/http"
"path/filepath"
"sync"

"github.com/bazelbuild/reclient/internal/pkg/logger"
Expand Down Expand Up @@ -128,9 +127,8 @@ func (lr *Server) Start(listenAddr string) {
if err != nil {
log.Fatal(err)
}
basePath := filepath.Join("internal", "pkg", "logrecordserver", "ui", "app", "dist", "reproxyui", "browser")
log.V(1).Infof("Loaded JS app from embedded tar file (size=%v)", len(tarAngularApp))
indexFS, _ := fs.Sub(tarfs, basePath)
indexFS, _ := fs.Sub(tarfs, "internal/pkg/logrecordserver/ui/app/dist/reproxyui/browser")
fs := http.FileServer(http.FS(indexFS))
r.PathPrefix("/").Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
fs.ServeHTTP(w, r)
Expand Down
1 change: 0 additions & 1 deletion internal/pkg/logrecordserver/ui/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ genrule(
exec_properties = {"dockerNetwork": "standard"},
target_compatible_with = select({
"@platforms//os:linux": [],
"@platforms//os:windows": [],
"//conditions:default": ["@platforms//:incompatible"],
}),
toolchains = ["@nodejs_toolchains//:resolved_toolchain"],
Expand Down
6 changes: 0 additions & 6 deletions internal/pkg/tarfs/tarfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ import (
"io/fs"
"os"
"path/filepath"
"runtime"
"strings"
"time"

log "github.com/golang/glog"
Expand All @@ -43,14 +41,10 @@ type TarFS struct {

// Open creates a new open file.
func (t *TarFS) Open(name string) (fs.File, error) {
if runtime.GOOS == "windows" {
name = strings.ReplaceAll(name, "/", "\\")
}
log.V(3).Infof("TarFS.Open: %s", name)
if f, ok := t.tarContents[name]; ok {
return f.NewOpenFile(), nil
}
log.V(3).Infof("TarFS.Open: failed to find %v, tar=%v", name, t.tarContents)
return nil, fs.ErrNotExist
}

Expand Down

0 comments on commit fe45758

Please sign in to comment.