-
Notifications
You must be signed in to change notification settings - Fork 278
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
Windows support #717
Windows support #717
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
I signed it! |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
@majcherm-da Thank you and sorry for the long silence. I'll get to this very soon. |
Also, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR.
Is there any way we can get CI testing Windows so we don’t break this going forward?
If this is too much pain for the PR I’m in favor of a merge and then follow up later, but I guess we’ll break it soon without CI.
@ittaiz Yes, the "exe" java_binary is used only on Windows. It's java based, since it was the simpliest way I found to create the resulting exe file based on the Bazel's |
5320160
to
59ae7ab
Compare
can we close this since #718 includes everything here? |
This resolves 2 issues I raised for running
rules_scala
on Windows, that is:%1 is not a valid Win32 application
)Main change is a port of Bazel's exe launcher from java rules to scala rules. Without it Bazel attempts to execute a bash script (generated from
java_stub_template
) as Bazel's executable, which fails on Windows.See https://github.com/bazelbuild/bazel/blob/8ac46c157c5da63e97a5825316ce6f0c3290e189/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaSemantics.java#L411 for how it's done in java rules.
The
UnusedDependencyChecker
is fixed by normalizing Windows paths, replacing backslashes with slashes. Without it all targets report unused deps on Windows.