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

Fix running tests in Windows #79

Merged
merged 2 commits into from
Jun 20, 2024
Merged

Fix running tests in Windows #79

merged 2 commits into from
Jun 20, 2024

Conversation

jchadwick-buf
Copy link
Member

This should resolve the toolchain registration issue from #78.

Also, it adds a batch script version of the shell script shim used to invoke protoc for tests; however, this requires --enable_runfiles to be explicitly passed or added to .bazelrc for a project, as Bazel on Windows does not populate runfiles by default.

In the future, we will need a better approach to supporting Windows that uses the runfiles manifest instead. This is tricky though, and will require some careful thought.

@@ -52,13 +52,13 @@ _buf_toolchain = rule(

def declare_buf_toolchains(os, cpu, rules_buf_repo_name):
for cmd in ["buf", "protoc-gen-buf-lint", "protoc-gen-buf-breaking"]:
ext = ""
exe_suffix = ""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ultra nit: cmd_suffix would be clearer.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@jchadwick-buf jchadwick-buf merged commit 850c799 into main Jun 20, 2024
5 checks passed
@jchadwick-buf jchadwick-buf deleted the jchadwick/windows-fixes branch June 20, 2024 14:59
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.

4 participants