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

doc: Document fast builds #6904

Merged
merged 5 commits into from
Oct 16, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions docs/fastbuild.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## Fast Build

The IntelliJ plugin for Bazel includes the **Fast Build** feature, allowing you to run tests and executables without recompiling the entire target. This feature detects which Java files have changed and compiles only those files, significantly speeding up the development process.

## Requirements

To enable Fast Build, you must add specific VM options to your IntelliJ configuration.
The flags are required to run Java compilation inside the IntelliJ process, so there's
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: so that

no need to spawn a separate `javac` process.
Follow these steps:

1. Navigate to **Help** -> **Edit Custom VM Options**.
2. Add the following entries:

```plaintext
--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
```

## rules_java
Please use rules_java 8.1.0 or newer

## How to Use

To use Fast Build, locate your test or executable in the editor. Click the gutter icon and select either **Fast Run** or **Fast Test**.

## Demo

https://github.com/user-attachments/assets/73b4ffbb-043a-4b96-81f8-de5fb2a2a1eb