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

Upgrade to Bazel for CLion plugin 2024.03.12.0.1 shows up unrelated errors #6472

Closed
tusharg1993 opened this issue Jun 6, 2024 · 4 comments
Closed
Assignees
Labels
awaiting-maintainer Awaiting review from Bazel team on issues lang: c++ C++ rules integration more-data-needed Awaiting response from issue author product: CLion CLion plugin type: bug

Comments

@tusharg1993
Copy link

Description of the bug:

Hello. I have been using Bazel for CLion plugin for a while. Recently, I started noticing problems with code errors which on further investigation look like an issue with the plugin. On searching the offending version, I was able to isolate 2024.02.27.0.1-api-version-233 as the working version. The subsequent version i.e. 2024.03.12.0.1-api-version-233 has problems.

Which category does this issue belong to?

CLion

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

I do not have a great way to provide a reproducible example as this is something I am using for work related projects. What I did find was that it was coming from std::stringstream libraries and not able to use the ios_base correctly inside c++.

This is the error I saw: Implicit instantiation of undefined template 'std::basic_streambuf<char>'

Which Intellij IDE are you using? Please provide the specific version.

CLion 2023.3.4

What programming languages and tools are you using? Please provide specific versions.

C++

What Bazel plugin version are you using?

2024.03.12.0.1-api-version-233

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

@tusharg1993 tusharg1993 added awaiting-maintainer Awaiting review from Bazel team on issues type: bug labels Jun 6, 2024
@github-actions github-actions bot added the product: CLion CLion plugin label Jun 6, 2024
@sgowroji sgowroji added lang: c++ C++ rules integration more-data-needed Awaiting response from issue author labels Jun 7, 2024
@sgowroji
Copy link
Member

sgowroji commented Jun 7, 2024

Hi @tusharg1993, Could you please provide complete error logs and steps used to reproduce the above. Thanks!

@tusharg1993
Copy link
Author

Apologies for delay in response. I found that my issue is somewhat related to #6384.

I tried several things to resolve the issue. I tried upgrading to CLion 2024.1.3 and Bazel plugin to 2024.05.21.0.1-api-version-241 to try fixing the issue. Unfortunately, it didn't work. Downgrading the plugin to 2024.02.27.0.1-api-version-241 seems to fix the problems.

On looking through the comments in the linked issue, I checked the Compiler Info between the two plugin versions. The comparison shows the obvious difference of the additional -ibazel flag in in the newer plugin (i.e. 2024.05.21.0.1-api-version-241).

I also added the bazel.cpp.sync.workspace.collect.include.prefix.hints.disabled=true to idea.properties to see if it works but no luck. Should I try with the other suggested flag (bazel.sync.resolve.virtual.includes=false) to see if it helps me?


Not sure if this is a relevant information. For the file where I am seeing the problems, the number of ibazel flags is 206. I am not sure how to look further in the logs but let me know if there are any.

@tusharg1993
Copy link
Author

tusharg1993 commented Jun 14, 2024

I tried tried figuring this out further. With the latest plugin, the suggested flag in comment i.e. bazel.sync.resolve.virtual.includes=false doesn't help. The compiler info shows up with -ibazel flags.

On checking out the commit referenced in the comment linked above, I stumbled into bazel.sync.collect.virtual.includes.hints=false. Setting this makes the error go away with latest plugin (2024.05.21.0.1-api-version-241). The compiler info doesn't show up the -ibazel flags too.

@tpasternak hope this is helpful information.

EDIT. Just for the full information. I did run into the error with rules_java dependency but that was easily fixed with following suggestion

http_archive(
    name = "rules_java",
    sha256 = "f8ae9ed3887df02f40de9f4f7ac3873e6dd7a471f9cddf63952538b94b59aeb3",
    urls = [
        "https://github.com/bazelbuild/rules_java/releases/download/7.6.1/rules_java-7.6.1.tar.gz",
    ],
)

@tpasternak
Copy link
Contributor

closed by #6476

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-maintainer Awaiting review from Bazel team on issues lang: c++ C++ rules integration more-data-needed Awaiting response from issue author product: CLion CLion plugin type: bug
Projects
None yet
Development

No branches or pull requests

5 participants