-
Notifications
You must be signed in to change notification settings - Fork 304
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
code navigation broken on project with custom toolchain and --incompatible_enable_cc_toolchain_resolution --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
#3319
Comments
I believe the Bazel CLion plugin's toolchain resolution is still based on |
Thanks for the pointer, I was unaware of the platform mappings migration feature, I will definitely try that! |
I tried to tell CLion about my compiler through platform mappings yesterday and couldn't get it to work. Not sure if I was doing it right or my plugin is out of date but you might need to add the command line options directly to your |
yeah, I ended up with the same result, and the same solution 😄 I added a Still, many thanks for pointing me in the right direction 😉 |
Hello @redsun82, Are you still looking support on the above issue. Thanks! |
I'm facing the same issue and assume that this is the underlying problem: |
Can anyone provide a status update on this issue? I'm getting a warning every time use bazel-sync.
|
I just tried the example above, prepared by @redsun82, and in my case CLion seems to load the correct toolchain. Maybe it was fixed in the meantime? |
@maxwellgumley-brt @redsun82 is this still an issue? |
@raoarun It is, but I'm not sure we're on the latest version. What version was it fixed in? |
@maxwellgumley-brt we are not sure if everything works correct, I just can't reproduce it. When I'm trying to import the example prepared by @redsun82 , indexing just works. But when I tried it once again I noticed that debugger does not work so definitely there's something wrong here. |
Just tried version 2023.04.18.0.1-api-version-231 and am experiencing the same issue. |
@charles-toller thanks for reaching out. Would it be possible for you to compare your project to the example above and try to find out what could be modified there in order to reproduce the issue? |
Thank you for contributing to the IntelliJ repository! This issue has been marked as stale since it has not had any activity in the last 6 months. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-maintainer". Please reach out to the triage team ( |
The example provided by @redsun82 produces the expected error on indexing on my system, without any additional modification. @tpasternak - have you tried to reproduce on a clean system? Plugin Ver:
|
@garethellis0 we both tried and for some reason the issue does not reproduce on our side. The last my attempt was 2 weeks ago and I started to think that it might be some stale issue, but sounds like it's not. Could you please provide more details on the bazel version you use, your system etc. that might help us? We can also chat about this one on bazelbuild.slack.com in #intellij channel, and any sensitive data might be shared via https://uploads.jetbrains.com |
bazel version: I'll start a thread in slack as well. Thanks for the speedy reply! |
@garethellis0 I'm not sure if I will be able to address this before the Christmas since I have vacation starting middle of the next week and then will be available only from 2nd week 2024. There is a little chance that we can sort us some legal questions with Google, so I might look into this, but I can't promise that. Hope for your understanding. btw I tried to reproduce this with bazel 6.4.1, so this might be the case that I wasn't able to get it failed. |
I just got around to testing the original repro from @redsun82 with bazel 6.4.0, and it seems the issue is addressed, the repro runs without issue! IMO we can close this ticket out. |
ok, closing for now, feel free to reopen/create a new one if the problem comes back |
We have a project where we configured a custom toolchain (using
clang
as executable on posix) skipping the auto-configured one by bazel. We are setting the--incompatible_enable_cc_toolchain_resolution
and--action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
. On this project the intellij bazel pluging prints the following warning when synced:and as a consequence, code navigation is more or less completely broken. We do have a workaround, which is to link symbolically clang to the location indicated by the warning, but that's not ideal.
I managed to reduce our case to a rather small project presenting the same warning (on Linux with gcc). You can find it here:
https://github.com/redsun82/foo
I noticed dropping
--action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
removes the warning, but my guess is that in that case the plugin will then use the host auto-configured compiler instead of the custom one.The text was updated successfully, but these errors were encountered: