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

It fails on Windows #86

Closed
xnerhu opened this issue Sep 15, 2021 · 2 comments
Closed

It fails on Windows #86

xnerhu opened this issue Sep 15, 2021 · 2 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@xnerhu
Copy link

xnerhu commented Sep 15, 2021

Hello!

Unfortunately I have some issues on Windows 11 and I can't get it to work.

ERROR: C:/users/xnerh/projects/blazity/gladiator-game/backend/questions-proto/BUILD.bazel:27:17: Generating Protocol Buffers for Typescript //backend/questions-proto:components_proto failed: (Exit 1): protoc.exe failed: error executing command 
  cd C:/users/xnerh/_bazel_xnerh/kiuaadle/execroot/init
  SET GRPC_PACKAGE_NAME=@grpc/grpc-js
  bazel-out/x64_windows-opt-exec-2B5CBBC6/bin/external/com_google_protobuf/protoc.exe --plugin=protoc-gen-ts=bazel-out/x64_windows-opt-exec-2B5CBBC6/bin/external/npm/protoc-gen-ts/bin/protoc-gen-ts.bat --ts_out=bazel-out/x64_windows-fastbuild/bin --descriptor_set_in=bazel-out/x64_windows-fastbuild/bin/external/com_google_protobuf/empty_proto-descriptor-set.proto.bin:bazel-out/x64_windows-fastbuild/bin/backend/questions-proto/proto-descriptor-set.proto.bin backend/questions-proto/user.proto
Execution platform: @local_config_platform//:host
bazel-out/x64_windows-fastbuild/bin/external/com_google_protobuf/empty_proto-descriptor-set.proto.bin:bazel-out/x64_windows-fastbuild/bin/backend/questions-proto/proto-descriptor-set.proto.bin: No such file or directory
Target //backend/questions-proto:components_proto failed to build
INFO: Elapsed time: 50.090s, Critical Path: 0.70s
INFO: 188 processes: 172 remote cache hit, 16 internal.                                    
FAILED: Build did NOT complete successfully

Here is my BUILD:

load("@rules_proto//proto:defs.bzl", "proto_library")
load("@npm//protoc-gen-ts:index.bzl", "ts_proto_library")

proto_library(
    name = "proto",
    srcs = ["user.proto"],
    deps = ["@com_google_protobuf//:empty_proto"],
)

ts_proto_library(
    name = "components_proto",
    deps = [
        ":proto",
    ],
)

It's weird because the file is there in dist folder.
image

@thesayyn
Copy link
Owner

Hey. Thank you for reporting the issue.

I while back I have worked on this. See #59 but never get it working on windows. There seems to be an issue with the way that bazel invokes protoc.

See https://github.com/thesayyn/protoc-gen-ts/runs/3615164551?check_suite_focus=true

@thesayyn thesayyn self-assigned this Sep 23, 2021
@thesayyn thesayyn added bug Something isn't working help wanted Extra attention is needed labels Sep 23, 2021
@thesayyn thesayyn mentioned this issue Oct 9, 2021
@thesayyn
Copy link
Owner

thesayyn commented Dec 1, 2021

Hey @xnerhu. I just got this fixed. Will release it shortly.

Update: We have landed a fix for this on 0.8.0. Let me know if it works for you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants