You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: replace Bloop with Bazel BSP for IDE support
Replace deprecated Bloop integration with modern Bazel BSP for Metals IDE support.
Changes:
- Remove scala_bloop.bzl and tools/deploy.py (deprecated Bloop implementation)
- Remove blooplib target (used only for Bloop, caused CI failures)
- Remove CI Bloop check (replaced by Smoketests job)
- Add .bazelproject to configure BSP target selection
- Fix MODULE.bazel: use standard @rules_python for BSP compatibility
- Fix generate.bzl: remove allow_single_file from fir_library generator
- Fix chisel_test: use @bazel-orfs label for external dependency compatibility
- Update README with complete BSP setup instructions
- Add .bsp/ and .bazelbsp/ to .gitignore
Bazel BSP provides direct integration with Bazel, better accuracy, and active
community support.
Refs: http://scalameta.org/metals/docs/build-tools/bazel/
Copy file name to clipboardExpand all lines: toolchains/scala/README.md
+48-32Lines changed: 48 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,6 @@ The project uses **BCR rules_scala 7.1.5** from Bazel Central Registry as the un
9
9
- Automatically includes Chisel 7.2.0 and its dependencies
10
10
- Pre-configures Scala compiler options for Chisel
11
11
- Sets up Verilator and firtool for hardware simulation (tests only)
12
-
- Maintains API compatibility with existing BUILD files
13
12
14
13
## Usage
15
14
@@ -80,51 +79,68 @@ The `chisel_test` rule includes workarounds for BCR verilator compatibility:
80
79
2.**Path resolution**: Automatically sets `VERILATOR_ROOT`, `VERILATOR_BIN`, and `PATH`
81
80
3.**Forward compatibility**: Workarounds are conditional and will automatically disable when BCR verilator is fixed
82
81
83
-
These workarounds are based on previous fixes (commits 0a3c114, c58bf7d) and ensure tests work without manual configuration.
82
+
## IDE Support with Bazel BSP
84
83
85
-
## Migration from Custom Toolchain
84
+
This project uses [Bazel BSP](https://github.com/JetBrains/bazel-bsp) (Build Server Protocol) for IDE integration with Metals.
86
85
87
-
This project was migrated from a custom Scala toolchain (~1500 lines) to BCR rules_scala (~250 lines of wrappers) in early 2025. The Chisel API remained unchanged, requiring no modifications to BUILD files.
86
+
### Quick Setup
88
87
89
-
### Benefits of BCR Migration
88
+
1.**Install Bazel BSP**:
89
+
```bash
90
+
cs install bsp
91
+
```
90
92
91
-
-**Reduced maintenance**: No custom toolchain to maintain
92
-
-**Standard compliance**: Uses Bazel community standard
93
-
-**Easy upgrades**: Can upgrade rules_scala independently
94
-
-**Community support**: Can get help from wider Bazel community
93
+
2.**Initialize BSP**:
94
+
```bash
95
+
cd /path/to/bazel-orfs-local
96
+
bsp
97
+
```
95
98
96
-
### What Changed
99
+
3.**Configure targets** (`.bazelproject` in project root):
0 commit comments