Commit b5a1c53
Strategy/Scala: route sbt 1.4+ with explicit DependencyTreePlugin to built-in command (TKT-15490) (#1711)
* Strategy/Scala: route sbt 1.4+ DependencyTreePlugin to uppercase HTML task
When a project explicitly enables `addDependencyTreePlugin` on sbt 1.4+,
fossa-cli detected `sbt.plugins.DependencyTreePlugin` and dispatched to
the same path used by the legacy `net.virtualvoid.sbt.graph.DependencyGraphPlugin`,
which runs the lowercase `dependencyBrowseTreeHtml` task. sbt 1.4+ only
exposes the uppercase `dependencyBrowseTreeHTML`, so the task failed and
the analyzer silently dropped deep dependencies.
Distinguish the two plugins at detection time and pick the correct task
casing per plugin.
TKT-15490 / ANE-2718.
* Strategy/Scala: make analyzeWithDepTreeJson messages task-agnostic
The context label and error text mentioned dependencyBrowseTreeHTML, but
the routing change can also pick the legacy dependencyBrowseTreeHtml task.
Reword to "dependency tree JSON" so the message is correct in both cases.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* Anchor sbt plugin detection on ": enabled in"
`sbt plugins` lists user-disabled plugins (`disablePlugins(...)`) with
a ": disabled in <scope>" suffix. The pre-existing substring match on
the bare FQCN counted those as present, which routed `findProjects`
to a task the active plugin set does not provide — same shape as the
TKT-15490 regression, different trigger.
Detection now requires "<FQCN>: enabled in" verbatim. Fixtures cover
the two disabled cases (mini disabled, modern disabled), both
expected to classify as Nothing.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Strategy/Scala: refactor detectDependencyPlugins to find-based lookup
Replace the nested if-then-else with a `find` over a precedence-ordered
lookup table. Behavior is identical: `find` returns the first match so
ModernDependencyTreePlugin still wins over Legacy, and the shared
": enabled in" suffix keeps the three effective marker strings unchanged.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Changelog: condense Unreleased Scala/sbt entry to one line
Match the format of older entries and link the PR instead of the ticket.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Strategy/Scala: detect plugins from real `sbt plugins` section layout
The find-based detection refactor anchored on a "<FQCN>: enabled in"
suffix that `sbt plugins` never prints. Real output (verified on sbt
1.9.8) lists bare plugin FQCNs under "Enabled plugins in <project>:"
sections, with disabled plugins moved to a trailing "Plugins that are
loaded to the build but not enabled in any subprojects:" section.
The suffix anchor matched nothing, so the built-in MiniDependencyTreePlugin
went undetected on sbt 1.4+ projects with no plugins.sbt (e.g.
scala3-example-project): the deep `dependencyTree` path never ran and
analysis fell back to generated poms (Partial graph), failing the
Analysis.Scala.scalaExampleProject integration test.
Detect a plugin by searching for its FQCN in the text before the
not-enabled marker, which preserves the disablePlugins guard. Replace
the fabricated unit fixtures with verbatim captures from
`sbt -batch -no-colors plugins`.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Changelog: reword sbt 1.4+ entry around task-casing routing
"silently" was inaccurate: NonStrict emitted a MissingDeepDeps warning
before falling back to poms (Strict errored), so the drop was never
silent. The real fix is routing to the uppercase dependencyBrowseTreeHTML
task.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>1 parent ca6ed67 commit b5a1c53
4 files changed
Lines changed: 294 additions & 99 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
3 | 7 | | |
4 | 8 | | |
5 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
165 | | - | |
| 164 | + | |
| 165 | + | |
166 | 166 | | |
167 | | - | |
| 167 | + | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
188 | | - | |
189 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
190 | 194 | | |
191 | 195 | | |
192 | 196 | | |
| |||
199 | 203 | | |
200 | 204 | | |
201 | 205 | | |
202 | | - | |
| 206 | + | |
203 | 207 | | |
204 | 208 | | |
205 | 209 | | |
206 | 210 | | |
207 | 211 | | |
208 | | - | |
| 212 | + | |
209 | 213 | | |
210 | 214 | | |
211 | 215 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| |||
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
25 | 50 | | |
26 | 51 | | |
27 | 52 | | |
28 | 53 | | |
29 | 54 | | |
30 | | - | |
31 | | - | |
| 55 | + | |
| 56 | + | |
32 | 57 | | |
33 | 58 | | |
34 | 59 | | |
35 | 60 | | |
36 | | - | |
37 | | - | |
38 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
39 | 92 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
44 | 105 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 106 | + | |
| 107 | + | |
50 | 108 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
55 | 113 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
60 | 121 | | |
61 | | - | |
62 | | - | |
63 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
64 | 134 | | |
65 | 135 | | |
66 | 136 | | |
| |||
0 commit comments