Closed aishfenton closed 8 months ago
Is the current test coverage (https://github.com/bazelbuild/rules_scala/tree/master/test/shell has a bunch of shell scripts) missing the test for Scala 2.12.x on this issue?
@eed3si9n I think it doesn't test the combination of Semanticdb + Diagnostics. I can add something in to test that combo.
Harder to test is the combinations of < 2.12.13 and >= 2.12.13, as the repo's default dep_providers are for 2.12.18.
And cc @scoquelin, since this is a follow up to https://github.com/bazelbuild/rules_scala/pull/1522
@liucijus I'm adding tests for the cross-product of versions having semanticdb + diagnostics enabled. But I'm finding that having semanticdb enabled also changes the lines numbers that are output (I have no idea how... they're still correct just more similar to 2.13's way of doing it ... but not exactly — (╯°□°)╯︵ ┻━┻).
The cross product of (version X semanticdb x diagnosticReports) is getting a bit nuts to test for. I'm tempted to remove the lines numbers from DiagnosticsReporterTest
and instead test for severity + error message. I'm thinking that the specific lines number outputs are just too unstable between plugins/scala-versions to test against.
How would you feel about that?
Added that change in to support cross-testing @liucijus, but let me know if you want to change it.
Description
Adds the correct overrides in
DepsReporter
to keep diagnostic reporting working in Scala2.12.13 <= x < 2.13.12
.This is due to SemanticdbReporter calling
doReport
on it's underlying reporter, ratherinfo0
.Motivation
Currently if you have SemanticDB enabled, and are using Scala
2.12.13 <= x < 2.13.12
, you get empty diagnostic report protos.Related to this issue: https://github.com/bazelbuild/rules_scala/issues/1484