bazelbuild / intellij

IntelliJ plugin for Bazel projects
https://ij.bazel.build/
Apache License 2.0
760 stars 302 forks source link

On Windows target forward slashes turn into native backward slashes. #3380

Closed malkia closed 1 year ago

malkia commented 2 years ago

Description of the issue. Please be specific.

On windows, bazel targets have the forward slashes turned into backward ones, hence they are not recognized, for example

Command: bazel query --tool_tag=ijwb:CLion --output=label_kind --keep_going same_pkg_direct_rdeps(\"//sdk\test\metrics:aggregation_test.cc\")

What's the simplest set of steps to reproduce this issue? Please provide an example project, if possible.

Well, I know Windows is not officially supported, but all it takes is a repository with at least one sub-directory and target into it, and the IDE would show it with wrong slashes. Current workaround (in the IDE) only is to manually change them everytime, but certain operations cannot finish like the one above ^^^

Version information

CLion: 2021.3.4 Platform: Windows 10 10.0 Bazel plugin: 2022.03.08.0.1-api-version-213 Bazel: 5.0.0

sgowroji commented 1 year ago

Hello @malkia, Can you provide a minimal steps to reproduce the above issue . Thanks!

malkia commented 1 year ago

Sure. I've used https://github.com/open-telemetry/opentelemetry-cpp as example, did the defaults, and then went into

src/test/metrics/BUILD file

and selected the aggregation_test

image

right click, debug on it, and it shows this:

image

then I get

image

the workaround is to manually click on all backslashes, and make them into forward ones

image

then it can run bazel

image

malkia commented 1 year ago

I've also checked the plugin version, it's 2022.10.04.0.1-api-version-222 Oct 20, 2022 and my CLion is right now at 2022.2.4

Hope this helps.

P.S. - On Windows 10 22H2 (OS Build 19045.2130)

HaimingTian commented 1 year ago

@sgowroji Unfortunately I don't own any Windows devices so I can't reproduce/fix/verify, can we please reassign to those with Windows devices?