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

bazel build from cli passes, bazel build from clion fails #7169

Closed
stu opened this issue Dec 12, 2024 · 9 comments
Closed

bazel build from cli passes, bazel build from clion fails #7169

stu opened this issue Dec 12, 2024 · 9 comments
Assignees
Labels
awaiting-maintainer Awaiting review from Bazel team on issues P1 I'll work on this now. (Assignee required) product: CLion CLion plugin type: bug

Comments

@stu
Copy link

stu commented Dec 12, 2024

Description of the bug:

from CLI, bazel build //... works no errors. build in clion fails.

error loading package 'external': the repository @@intellij_aspect does not exist, but has been specified as overridden with --override_repository. Use --inject_repository instead to add a new repository.

project fails to build.

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.

open the bazel repository examples/cpp-tutorial/stage3 in clion. hit build. fail.

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

clion 2024.3.1

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

No response

What Bazel plugin version are you using?

2024.11.19.0.3-api-version-243

Have you found anything relevant by searching the web?

No response

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

No response

@stu stu added awaiting-maintainer Awaiting review from Bazel team on issues type: bug labels Dec 12, 2024
@github-actions github-actions bot added the product: CLion CLion plugin label Dec 12, 2024
@tpasternak
Copy link
Contributor

Hi, can you please share the result of bazel info release?

@styurin
Copy link

styurin commented Dec 14, 2024

Try this:

echo 7.1.2 > .bazelversion

and run the command again.

Bazel 8.0.0 was released 4 days ago. If you use Bazelisk, it will pick it up automatically unless Bazel version is configured explicitly.

@davidprueser
Copy link

Had the same issue using version 8.0.0. After downgrading to 7.1.2, everything worked fine again.

@ujohnny
Copy link
Collaborator

ujohnny commented Dec 16, 2024

This is a bug in the plugin when a user migrates from bazel 7 to bazel 8. The workaround is to find a projects/<your_project_name+somehash> in IntelliJ/CLion system directory and remove it (or rename to <name>.bak).

@tpasternak
Copy link
Contributor

It might also be caused if you use a fork and the version string can't be parsed

@ujohnny
Copy link
Collaborator

ujohnny commented Dec 17, 2024

oh, this seems to be more severe. working on it.

@ujohnny ujohnny added the P1 I'll work on this now. (Assignee required) label Dec 17, 2024
@ujohnny
Copy link
Collaborator

ujohnny commented Dec 17, 2024

fixed by #7045

@ujohnny
Copy link
Collaborator

ujohnny commented Dec 17, 2024

so there are several issues related to this message:

  1. in version 2024.11.19.0.3 bazel 8 is not supported and bazel 7 should be used. the issue will be fixed in version 2024.12.03 to be published really soon
  2. even in a master state Sync fails when bazel version is downgraded from 8 to something lower, see Bazel version downgrade from 8 to 7 leads to Unrecognized option: --inject_repository #7184 for details.

@ujohnny ujohnny closed this as completed Dec 17, 2024
@github-project-automation github-project-automation bot moved this from Untriaged to Done in Bazel IntelliJ Plugin Dec 17, 2024
@ujohnny
Copy link
Collaborator

ujohnny commented Dec 17, 2024

Also the issue is fixed in the beta feed

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 P1 I'll work on this now. (Assignee required) product: CLion CLion plugin type: bug
Projects
Development

No branches or pull requests

5 participants