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

Ignored javadoc tool error #448

Merged
merged 1 commit into from
Nov 9, 2017
Merged

Conversation

raboof
Copy link
Contributor

@raboof raboof commented Oct 30, 2017

Reported under #415

@eed3si9n eed3si9n added the ready label Oct 30, 2017
@raboof raboof force-pushed the ignoredJavadocToolError branch 2 times, most recently from e7f0cee to 142f7aa Compare October 30, 2017 15:36
Copy link
Member

@dwijnand dwijnand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running the cross-module validator to check if we can get rid of JavacLogger#flush(Int).

synchronized {
val parser = new JavaErrorParser(cwd)

parser.parseProblems(err, log).foreach(reporter.log(_))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this right? The old impl interleaved \n's between error messages.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, you're right - probably makes sense to add those newlines in err(s: => String) (and add some more tests describing how this is actually called).

val parser = new JavaErrorParser(cwd)

parser.parseProblems(err, log).foreach(reporter.log(_))
out.split("\n").filter(_ != "").foreach(log.info(_))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you purposely splitting info messages by newlines to send them independently to log.info?

Why not, instead of concat-ing info messages and then re-splitting, just collect the messages into a list buffer and then iterate that list into log.info?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, for some reason I got the impression that we couldn't assume out would be called in neatly framed chunks, but indeed looking at the previous implementation again it appears that we in fact can. In that case a ListBuffer indeed makes more sense, I'll update accordingly!

@typesafe-tools
Copy link

The validator has checked the following projects against Scala 2.12,
tested using dbuild, projects built on top of each other.

Project Reference Commit
sbt 1.x sbt/sbt@12c2e9b
zinc pull/448/head 142f7aa
io 1.x sbt/io@e8c9757
librarymanagement 1.x sbt/librarymanagement@91b56c5
util 1.x sbt/util@f4eadfc
website 1.x

✅ The result is: SUCCESS
(restart)

parser.parseProblems(input, log).foreach(reporter.log)
}

def flush(exitCode: Int): Unit = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we can drop this method, but we need to tell MiMa to ignore it.

dwijnand
dwijnand previously approved these changes Nov 8, 2017
Copy link
Member

@dwijnand dwijnand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @raboof.

@dwijnand dwijnand added this to the 1.1.0 milestone Nov 8, 2017
@raboof raboof force-pushed the ignoredJavadocToolError branch from 6283df4 to 6b4af5a Compare November 8, 2017 10:39
@raboof
Copy link
Contributor Author

raboof commented Nov 8, 2017

(rebased, unfortunately it seems that triggered github to 'dismiss' the review :/)

@jvican
Copy link
Member

jvican commented Nov 8, 2017

Hey @raboof thanks! Can you squash all the commits? The previous commits to the formatting are not passing in the CI, and it seems that this fix could be all in one commit.

When the javadoc tool fails with an error that could not be parsed,
the error was silently dropped.
@raboof raboof force-pushed the ignoredJavadocToolError branch from 6b4af5a to c8c20ac Compare November 8, 2017 13:36
@raboof
Copy link
Contributor Author

raboof commented Nov 8, 2017

Sure, done!

Copy link
Member

@jvican jvican left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @raboof 😄

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

Successfully merging this pull request may close these issues.

5 participants