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

Bazel client, Windows: get rid of AsWindowsPath for MSVC code path #2507

Open
laszlocsomor opened this Issue Feb 8, 2017 · 3 comments

Comments

Projects
None yet
4 participants
@laszlocsomor
Copy link
Contributor

laszlocsomor commented Feb 8, 2017

Avoid using our UNIX to Windows path conversion methods (e.g. AsWindowsPathWithUncPrefix) when building for --cpu=x64_windows_msvc.

If a binary is compiled with MSVC and thus not linked against msys-2.0.dll, then MSYS converts UNIX path arguments to Windows paths. So if Bazel is built with MSVC, we don't need the conversion methods.

We cannot completely get rid of these methods though because we use UNIX paths in places like the CROSSTOOL file. But we should get rid of calls when processing paths coming from command line arguments.

@laszlocsomor laszlocsomor self-assigned this Feb 8, 2017

@dslomov dslomov added this to the 0.5 milestone Feb 14, 2017

@dslomov dslomov modified the milestones: 0.6, 0.5 Apr 4, 2017

@laszlocsomor

This comment has been minimized.

Copy link
Contributor

laszlocsomor commented Jul 24, 2017

We can't remove this method, as we'll still have to normalize and absolutize paths, but we can remove all the logic dealing with MSYS path conversion (including the bazel.windows_unix_root JVM flag and its handling).

@laszlocsomor laszlocsomor modified the milestones: 0.7, 0.6 Jul 24, 2017

@laszlocsomor

This comment has been minimized.

Copy link
Contributor

laszlocsomor commented Jul 24, 2017

We'll stop releasing MSYS-ful versions of Bazel with 0.5.4 / 0.6.0 (whichever comes first), and then clean up all MSYS-related code. Thus marking this as milestone 0.7.

@laszlocsomor

This comment has been minimized.

Copy link
Contributor

laszlocsomor commented Dec 14, 2017

I was wrong in my earlier comment:

We can't remove this method, as we'll still have to normalize and absolutize paths, but we can remove all the logic dealing with MSYS path conversion (including the bazel.windows_unix_root JVM flag and its handling).

I think we can remove the Unix path conversion logic from the Bazel client, and probably also from the JNI library. We cannot fully remove it from the Java code though, as @tomlu also discovered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment