-
Notifications
You must be signed in to change notification settings - Fork 50
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
No data sent to Coveralls casued by absolute paths in cobertura file #199
Comments
Hi @Martomate. I can reproduce this. Hi @ckipp01. This looks like a bug. If it is ok with you, I will take a look at this. I think these paths should be relative (like the paths in all the other output files). |
For sure! |
Proposed fix - scoverage/scalac-scoverage-plugin#497 |
@ckipp01 After this/the fix is merged and we have a new version of |
2.12.17 and 2.13.9 are scheduled for release this week, so I'll probably wait for those, and then cut the release which will include the fix. |
This seems to have been fixed in sbt-scoverage 2.0.4, and I can confirm that it now works! Thanks a lot for fixing this so quickly! |
Why was the fix for this to make this relative, rather than just use the existing absolute file path? Right now this is a heuristic to find the file. There can be multiple file names that have the same relative path in the source directories, especially on aggregated builds between subprojects. scoverage/scalac-scoverage-plugin#582 It seems absurd to not just check to see if the path is absolute and use that directly rather than try to search through the list of source directories to find a path that matches. |
Environment
Scala 3.2.0, sbt-scoverage 2.0.2, sbt-coveralls 1.3.2
Problem
No coverage data is sent to Coveralls
Possible cause
The cobertura.xml file contains absolute paths for the class filenames, which results in sbt-coveralls not finding any source files.
This happens on this line, where the
relativePath
is not relative:sbt-coveralls/src/main/scala/org/scoverage/coveralls/CoberturaMultiSourceReader.scala
Line 54 in 8c64665
This is likely caused by the new scoverage version for Scala 3, where there were some changes to the cobertura.xml file. It now starts like this:
The text was updated successfully, but these errors were encountered: