Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest version v0.43.0 doesn't produce html report #703

Closed
gkurmaev opened this issue Oct 18, 2022 · 5 comments
Closed

Latest version v0.43.0 doesn't produce html report #703

gkurmaev opened this issue Oct 18, 2022 · 5 comments

Comments

@gkurmaev
Copy link

gkurmaev commented Oct 18, 2022

After update yesterday our task, which is configured the following way:

tasks.named<DependencyUpdatesTask>("dependencyUpdates").configure {

  // Example 1: reject all non stable versions
  rejectVersionIf {
    isNonStable(candidate.version)
  }

  // optional parameters
  checkConstraints = true
  checkForGradleUpdate = true
  outputFormatter = "json, html"
  outputDir = "build/dependencyUpdates"
  reportfileName = "report"
}

is no longer generating json and html reports (but a json and txt instead), which we uploaded somewhere else as a part of CI-pipeline, thus breaking it.

@gkurmaev
Copy link
Author

Removing the extra space after the comma actually fixed the issue, so

outputFormatter = "json,html"

@ben-manes
Copy link
Owner

Looks like a small typo in the groovy to kotlin migration. The groovy code used String's replaceAll which takes a regex, whereas the kotlin version uses replace which does not.

@ben-manes
Copy link
Owner

ben-manes commented Nov 12, 2022

hmm.. seems that kotlin's replace is the same as Java's replaceAll, so I'm not sure why it wouldn't take.

@ben-manes
Copy link
Owner

ben-manes commented Nov 12, 2022

Oh, they have multiple variants overloaded with the same name and different behavior. Very confusing stdlib, but I think we can use a trim() here. Seems kotlin has many footguns, like their infamous non-atomic operations on atomics...

It should have been formatterOriginal.replace(Regex("\\s"), ""), but did a string replacement instead.

@gkurmaev
Copy link
Author

Oh wow, that was rather unexpected of you to actually fix a closed issue, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants