Skip to content

Commit

Permalink
Python code-gen; doc about setting
Browse files Browse the repository at this point in the history
The recently added Python code-generation handling
system now has a setting to control the additional
query. This PR contains a documentation tweak to
point this out.
  • Loading branch information
andponlin-canva committed Oct 12, 2024
1 parent 7ba94e2 commit cccd59d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/python/code-generators.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,10 @@ See the Python example [simple_code_generator](/examples/python/simple_code_gene

The Bazel Intelli-J plugin is able to work with generated Python code in this situation. You need to ensure that your code generator has no `srcs` attribute and that it has a tag `intellij-py-code-generator`. This tag signals to the plugin that the Rule's output is generated code.

During a full sync, the plugin will need to execute an additional Bazel `query` in order to locate rules with the tag. This is an unavoidable overhead of this approach and so that the cost of this is only borne by projects that require it, there is a setting to enable it. You will find the file to add the setting in the `.ijwb` directory in your project files. Inside this directory is a file with extension `.bazelproject`; add the following line into this file.

```
enable_python_codegen_support: true
```


0 comments on commit cccd59d

Please sign in to comment.