renovatebot / renovate

Home of the Renovate CLI: Cross-platform Dependency Automation by Mend.io
https://mend.io/renovate
GNU Affero General Public License v3.0
17.27k stars 2.26k forks source link

sbt manager does not pick up dependencies with `excludeAll ...` qualifier #13545

Open recombinationgroup opened 2 years ago

recombinationgroup commented 2 years ago

How are you running Renovate?

Self-hosted

If you're self-hosting Renovate, tell us what version of Renovate you run.

31.23.1

Please select which platform you are using if self-hosting.

gitlab.com

If you're self-hosting Renovate, tell us what version of the platform you run.

n/a

Describe the bug

The sbt manager does not seem to recognize dependency expressions in build.sbt which contain an excludeAll qualifier, e.g.

"com.lightbend.akka" %% "akka-stream-alpakka-csv" % "2.0.0" excludeAll ExclusionRule(organization = "com.typesafe.akka")

I assume that the detection of dependencies for this manager needs to be adjusted to account for these kinds of expressions. I also assume that this issue affects both the exclude and excludeAll methods. I think they should just be ignored by renovatebot while extracting the dependency. I'm no JS expert, but I would assume that the reason for not detecting these kinds of dependencies ist because null is returned here in extract.ts.

I reproduced this with the current version 31.23.1 on a private gitlab.com repository. However, I also copied the minimum configuration example to a public github.com repository: https://github.com/recombinationgroup/renovatebot-debug-sbt-exclude

I also attached the relevant debug log entries. I found no log statement for the ignored dependency. See the example repository for further info on what dependency I would have liked to see.

Please let me know if I can supply any further information.

Relevant debug logs

INFO: Dependency extraction complete (repository=THISREPO) "baseBranch": "main", "stats": { "managers": {"sbt": {"fileCount": 1, "depCount": 2}}, "total": {"fileCount": 1, "depCount": 2} } ... DEBUG: packageFiles with updates (repository=THISREPO) "config": { "sbt": [ { "packageFile": "build.sbt", "deps": [ { "registryUrls": ["https://repo.maven.apache.org/maven2"], "datasource": "maven", "depName": "scala", "lookupName": "org.scala-lang:scala-library", "currentValue": "2.13.8", "separateMinorPatch": true, "depIndex": 0, "updates": [], "warnings": [], "versioning": "ivy", "sourceUrl": "https://github.com/scala/scala", "homepage": "https://www.scala-lang.org/", "currentVersion": "2.13.8", "fixedVersion": "2.13.8" }, { "registryUrls": ["https://repo.maven.apache.org/maven2"], "depName": "com.lightbend.akka:akka-stream-alpakka-s3", "lookupName": "com.lightbend.akka:akka-stream-alpakka-s3_2.13", "currentValue": "2.0.0", "datasource": "sbt-package", "depIndex": 1, "updates": [ { "bucket": "non-major", "newVersion": "2.0.2", "newValue": "2.0.2", "newMajor": 2, "newMinor": 0, "updateType": "patch", "branchName": "renovate/com.lightbend.akka-akka-stream-alpakka-s3-2.x" }, { "bucket": "major", "newVersion": "3.0.4", "newValue": "3.0.4", "newMajor": 3, "newMinor": 0, "updateType": "major", "branchName": "renovate/com.lightbend.akka-akka-stream-alpakka-s3-3.x" } ], "warnings": [], "versioning": "ivy", "sourceUrl": "https://github.com/akka/alpakka", "homepage": "https://doc.akka.io/docs/alpakka/current", "dependencyUrl": "https://repo.maven.apache.org/maven2/com/lightbend/akka", "currentVersion": "2.0.0", "isSingleVersion": true, "fixedVersion": "2.0.0" } ] } ] }

Have you created a minimal reproduction repository?

I have linked to a minimal reproduction repository in the bug description

rarkins commented 2 years ago

Reproduction forked to https://github.com/renovate-reproductions/13545