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

proto_gazelle doesn't work on subdirectory #232

Closed
ql-owo-lp opened this issue Mar 26, 2022 · 1 comment
Closed

proto_gazelle doesn't work on subdirectory #232

ql-owo-lp opened this issue Mar 26, 2022 · 1 comment

Comments

@ql-owo-lp
Copy link

I configured proto_gazelle in my BUILD

proto_gazelle(
    name = "gazelle",
    cfgs = ["//:.gazelle-proto-config.yaml"],
    command = "update",
    data = [
        ":gazelle_protobuf_generate_imports",
    ],
    gazelle = ":gazelle-protobuf",
    imports = [
        "gazelle-proto-imports.csv",
    ],
)

bazel run //:gazelle works perfectly in this case. However, bazel run //:gazelle -- some_dir doesn't work. Only proto_library rules are generated, all other rules suchs as proto_compile rules are not generated. I have to manually pass arguments like bazel run //:gazelle -- -proto_configs=.gazelle-proto-config.yaml -proto_imports_in=gazelle-proto-imports.csv some_dir for it to work.

@sacsar
Copy link

sacsar commented Aug 2, 2022

I figured this out by looking at bazel-bin/gazelle-runner.bash. You need to prefix the arguments with -args, eg bazel run //:gazelle -- -args example/. That should be changed or the documentation fixed, but that's the answer to the mystery.

@pcj pcj closed this as completed Feb 17, 2024
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

3 participants