-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
fix: convert forward slashes to backslashes for protoc plugins on Windows. #668
base: main
Are you sure you want to change the base?
fix: convert forward slashes to backslashes for protoc plugins on Windows. #668
Conversation
Test
in deps attribute of starlark_doc_extract rule //docs:proto.extract: missing bzl_library targets for Starlark module(s) @aspect_bazel_lib//lib:platform_utils.bzl. Since this rule was created by the macro 'stardoc_with_diff_test', the error might have been caused by the macro implementation
remote spawn failed: UNAVAILABLE: connection error: desc = "transport: Error while dialing: dial tcp: lookup remote-scheduler on 10.0.0.2:53: no such host" 💡 To reproduce the build failures, run
BuildifierBuildifier lint check has failed ERROR: Failed to query remote execution capabilities: Remote execution is not supported by the remote server, or the current account is not authorized to use remote execution. WARNING: Uploading BEP referenced local file: Remote execution is not supported by the remote server, or the current account is not authorized to use remote execution. WARNING: Uploading BEP referenced local file /mnt/ephemeral/output/rules_ts/__main__/command.profile.gz hash: "fb127741ab11bc355d261285012314b24d195e88b523a89e66985c3d05c7e7f4" size_bytes: 9824 : Remote execution is not supported by the remote server, or the current account is not authorized to use remote execution. ./ts/private/ts_proto_library.bzl:10: unused-variable: Variable "ctx" is unused. Please remove it. (https://github.com/bazelbuild/buildtools/blob/master/WARNINGS.md#unused-variable) 💡 To reproduce the buildifier failures, run
Some lint failures can be fixed automatically by running the following while other require manual fixes
📝 For more information on how to resolve or suppress specific lint failures, see the Buildifier documentation Format |
Would you be able to add some initial |
…dows. Fixes aspect-build#667 This takes the approach used [elsewhere in rules_ts](https://github.com/aspect-build/rules_ts/blob/da284adac1fcb6bd9da81ce5d4b3e29660ecface/ts/private/ts_project.bzl#L80) to detect if we are building on Windows. protoc will fail to call into the plugins if they are expressed to protoc as forward-slash paths.
3ac906a
to
461bb13
Compare
Fixes #667
This takes the approach rules_proto_grpc does to detect if we are building on Windows via the
host_path_separator
. protoc will fail to call into the plugins if they are expressed to protoc as forward-slash paths. Alternatively, we could make this more limited like my patch in the linked issue to check.bat
file extensions, which is fragile in its own way, but works for the given use case.Changes are visible to end-users: no
Test plan
bazel build //:foo_ts_pb
. This PR's change is a patch in that repo, so I could also change that to directly use my commit instead, if preferredThere aren't any tests as far as I can tell currently for ts_proto_library, so my manual test is the best I can currently offer, and it's not clear if the Windows test runners are fully active, but I'd be happy to write a test for initial coverage on
ts_proto_library
if desired