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_gazelle_is_bazel_module is not defined #1654

Closed
metsawyr opened this issue Oct 28, 2023 · 2 comments
Closed

bazel_gazelle_is_bazel_module is not defined #1654

metsawyr opened this issue Oct 28, 2023 · 2 comments

Comments

@metsawyr
Copy link

metsawyr commented Oct 28, 2023

0.33.0

What version of rules_go are you using?

0.42.0

What version of Bazel are you using?

Does this issue reproduce with the latest releases of all the above?

6.4.0

What operating system and processor architecture are you using?

Windows 10, x86
Also happened in brand new WSL Ubuntu installation

What did you do?

bazel run //:gazelle

Here's the gazelle label:

# gazelle:prefix github.com/me/my-private-repo
# gazelle:exclude build
# gazelle:exclude gen
gazelle(
    name = "gazelle",
    prefix = "github.com/me/my-private-repo",
)

What did you expect to see?

What did you see instead?

Starting local Bazel server and connecting to it...
ERROR: Skipping '//:gazelle': error loading package '': at C:/users/user/_bazel_user/tfhz7ipo/external/bazel_gazelle/def.bzl:20:5: Unable to find package for @bazel_gazelle_is_bazel_module//:defs.bzl: The repository '@bazel_gazelle_is_bazel_module' could not be resolved: Repository '@bazel_gazelle_is_bazel_module' is not defined.
WARNING: Target pattern parsing failed.
ERROR: error loading package '': at C:/users/user/_bazel_user/tfhz7ipo/external/bazel_gazelle/def.bzl:20:5: Unable to find package for 
@bazel_gazelle_is_bazel_module//:defs.bzl: The repository '@bazel_gazelle_is_bazel_module' could not be resolved: Repository '@bazel_gazelle_is_bazel_module' is not defined.
INFO: Elapsed time: 2.747s
INFO: 0 processes.
ERROR: Build failed. Not running target
FAILED: Build did NOT complete successfully (0 packages loaded)
    currently loading:
    Fetching repository @bazel_skylib; starting
@fmeum
Copy link
Member

fmeum commented Oct 29, 2023

Please make sure that you are calling the gazelle_dependencies macro in WORKSPACE? It does instantiate this repo.

@metsawyr
Copy link
Author

Yes, this is the case. Overlooked that on the top of the installation guide.
Thank you for the swift reply!
Case close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants