bazelbuild / rules_scala

Scala rules for Bazel
Apache License 2.0
359 stars 266 forks source link

Don't output unused dependency messages when compilation fails #1548

Closed laurynaslubys closed 4 months ago

laurynaslubys commented 4 months ago

Description

When a scala source is malformed, the AST parsing dependency checking step comes back with no/very little dependencies used. It then prints out a bunch of these warnings which are not necessarily true. As a workaround, let's not print the unused dependency warnings if the build has already failed before hand.

Motivation

The printed warnings are potentially misleading and therefore should not be printed.

liucijus commented 4 months ago

Thanks, @laurynaslubys! I think build status also needs to be reflected in produced sdeps files. Maybe the file should be produced without dependency entries and have a status field. Status should reflect that dependency analysis has not be done or is incomplete.

laurynaslubys commented 4 months ago

Good point. I've updated this so we pretend that there are no unused dependencies if the reporter has errors already.