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
Describes the new `scala_toolchains()` API, breaking changes, Bazel
compatibility matrix, and breaking of the `io_bazel_rules_scala` repo
name dependency. Part of bazelbuild#1482, bazelbuild#1647, bazelbuild#1652, and bazelbuild#1699.
Much of the README text regarding `WORKSPACE` configuration, Bazel
compatibility, and breaking changes comes from:
- bazelbuild#1482 (comment)
Contains information about the upcoming Bzlmod implementation and Bazel
8 compatibility changes. With this information already in place, very
little will need to change when these changes land. Those doc updates
will land in the same commit as their respective implementations.
Contains a light editing pass over almost every Markdown file to resolve
`markdownlint` warnings when editing in VSCode. Also added
`.markdownlint.json` to silence rule `MD033/no-inline-html`, since
several docs contain `<br/>` and/or `<table>` elements.
- https://github.com./DavidAnson/vscode-markdownlint?tab=readme-ov-file#markdownlintconfig
Performed other opportunistic grammar edits and added new information,
particularly to:
- `docs/coverage.md`: Describes how to determine the default JaCoCo
version used by `rules_java`
- `scripts/README.md`: Updates `create_repository.py` docs extensively,
and adds a section for `sync_bazelversion.sh`
This should produce a single `bazel-out/_coverage/_coverage_report.dat` from all coverage files that are generated.
23
23
24
-
###Processing coverage reports
24
+
## Processing coverage reports
25
25
26
-
You can install `lcov` package (that supports the format Bazel uses for coverage reports) to have access to additional tools:
26
+
You can install the [`lcov`](https://github.com./linux-test-project/lcov) package (that supports the format Bazel uses for coverage reports) to have access to additional tools:
27
27
28
-
```
28
+
```txt
29
29
# Use your system package manager. E.g. on Ubuntu:
30
30
sudo apt install lcov
31
31
```
32
32
33
33
Having `lcov` package installed you can extract information from your coverage reports:
34
34
35
-
```
35
+
```txt
36
36
# For a summary:
37
37
lcov --summary your-coverage-report.dat
38
38
# For details:
@@ -55,26 +55,78 @@ echo "coverage report at file://${destdir}/index.html"
55
55
56
56
```
57
57
58
-
###Support for testing frameworks
58
+
## Support for testing frameworks
59
59
60
60
Coverage support has been only tested with [ScalaTest](http://www.scalatest.org/).
61
61
62
-
### Working around missing lambda coverage with Scala 2.12+
62
+
##JaCoCo
63
63
64
-
The current Jacoco version in Bazel (0.8.3) has missing coverage for lambdas
65
-
(including for comprehensions; see issue https://github.com./bazelbuild/rules_scala/issues/1056). Also, the support for
66
-
filtering out code generated by the Scala compiler is quite reduced in Jacoco.
64
+
`rules_scala` uses the [JaCoCo](https://www.jacoco.org/jacoco/) library imported
65
+
by the underlying [`rules_java`](https://github.com./bazelbuild/rules_java)
66
+
module to generate code coverage. `rules_java`, in turn, imports JaCoCo via the
67
+
[`java_tools`](https://github.com./bazelbuild/java_tools) repository, built from
Standard [toolchain resolution](https://bazel.build/extending/toolchains#toolchain-resolution) procedure determines which toolchain to use for Scala targets.
189
218
190
219
Toolchain should declare its compatibility with Scala version by using `target_settings` attribute of the `toolchain` rule:
`rules_scala` consists of many toolchains implementing various toolchain types.
202
232
Their support level for cross-build setup varies.
203
233
204
234
We can distinguish following tiers:
205
235
206
-
* No `target_settings` set – not migrated, will work on the default `SCALA_VERSION`; undefined behavior on other versions.
207
-
* (all toolchains not mentioned elsewhere)
208
-
*`target_settings` set to the `SCALA_VERSION` – not fully migrated; will work only on the default `SCALA_VERSION` and will fail the toolchain resolution on other versions.
209
-
* (no development in progress)
210
-
* Multiple toolchain instances with `target_settings` corresponding to each of `SCALA_VERSIONS` – fully migrated; will work in cross-build setup.
211
-
*[the main Scala toolchain](/scala/BUILD)
212
-
*[Scalafmt](/scala/scalafmt/BUILD)
213
-
*[Scalatest](/testing/testing.bzl)
236
+
- No `target_settings` set – not migrated, will work on the default `SCALA_VERSION`; undefined behavior on other versions.
237
+
- (all toolchains not mentioned elsewhere)
238
+
-`target_settings` set to the `SCALA_VERSION` – not fully migrated; will work only on the default `SCALA_VERSION` and will fail the toolchain resolution on other versions.
239
+
- (no development in progress)
240
+
- Multiple toolchain instances with `target_settings` corresponding to each of `SCALA_VERSIONS` – fully migrated; will work in cross-build setup.
0 commit comments