[ANE-2718] fix(scala): prefer MiniDependencyTreePlugin over explicit DependencyTreePlugin #1627
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes an issue where
fossa analyzefails to detect deep (transitive) dependencies on sbt 1.4+ projects that have an explicitaddDependencyTreePluginin theirplugins.sbt.Changes:
findProjectsto preferMiniDependencyTreePlugin(sbt 1.4+ built-in) over explicitly configuredDependencyTreePlugindetectDependencyPluginsfunction for testabilityRoot Cause
The sbt
dependencyBrowseTreeHTMLcommand has different casing requirements across versions:dependencyBrowseTreeHtmldependencyBrowseTreeHTMLWhen a project has both the built-in
MiniDependencyTreePlugin(sbt 1.4+) AND an explicitDependencyTreePlugin(viaaddDependencyTreePlugin), FOSSA was prioritizing the explicit plugin path, which uses the lowercase command - causing failures on sbt 1.4+.Reproduction
Environment:
addDependencyTreePluginexplicitly in plugins.sbtSteps to reproduce the issue:
Test Plan
1. Confirm broken behavior on master
2. Checkout PR branch and rebuild
3. Verify fix
4. Unit tests
Expected results comparison:
Partial❌complete✅