-
Notifications
You must be signed in to change notification settings - Fork 126
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
chore: add support for 2.13.15 #641
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
@lrytz @som-snytt any idea what this might be about? I’m not able to dig into it right now nothing obvious jumps out at me from the 2.13.15 merged PRs |
I had hoped to use note that the relevant test case is test("scoverage should instrument for-loop guards") {
val compiler = ScoverageCompiler.default
compiler.compileCodeSnippet(
"""object A {
| def foo(list: List[String]) = for (string: String <- list if string.length > 5)
| println(string)
|} """.stripMargin
)
... |
note that scalac-scoverage-plugin is in the community build, but we only compile the tests and don't run them. perhaps I could improve that, but not this week. anyway, that's the reason we didn't get early notice of the problem |
Seems it's easy to reproduce with that source file: object A {
def foo(list: List[String]) = for (string: String <- list if string.length > 5)
println(string)
} compiling with 2.13.14 and It seems scoverage is running the pos validation, search for The regression was caused by scala/scala@060bc32, I tested before and after. |
Thanks, @lrytz , @SethTisue didn't mention on chat that you had already beaten me to it. That was my guess, so I'll follow up unless you have a fresh PR. |
I didn't do anything more, see my GitHub status :-) |
@ckipp01 do you have a sense of whether or how badly this affects the usability of scoverage for users? would there just be a minor degradation of coverage report quality for some for comprehensions, or would the coverage report not be produced at all…? or might there be no end user impact at all, and the test is just alerting us to some incorrect positions that we of course should fix but aren’t really going to be affecting users in the meantime? 2.13.15 is already published and ready to be announced, so… unless someone wants to make a case that this problem is bad enough that we should withdraw it and immediately do 2.13.16 instead… I suspect the thing to do is disable the test, go ahead and publish, and if some users are unable to use scoverage as a result, they can stay on 2.13.14 for now, and then we can sit back, see if any other regressions roll in, and depending on how many there are and how many folks are complaining, consider it a reason to do 2.13.16 on a faster cycle we can add something to the 2.13.15 release notes about it, with a link to a ticket |
@SethTisue so after a bit of testing, I think this one may be it. I published this locally and used the sample that fails and when actually running coverage it doesn't blow up and it does give you the coverage data you expect. I pasted it below to show the data for: package example
object A {
def foo(list: List[String]) = for (string: String <- list if string.length > 5)
println(string)
} Which produces:
And with then just to be safe as well I produced the same with 2.13.14.
They end up being the same here. So I think it's pretty safe to go ahead and ignore this test and just publish. There might be a chance where this doesn't get instrumented correctly in some cases, but the worst case scenario there would be that you'd see your coverage drop slightly. Thanks a lot for checking this all 🫶 |
Thank you Chris! |
closes #640