-
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
Add option to skip statements that does not match any source root #165
Comments
@sksamuel Any chance on this getting merged as well? |
Thanks! |
@sksamuel What is the expected time of the new release? |
This is a workaround for #159 , right? Why are you applying it instead of fixing (merging that PR) the real issue? |
Not sure, probably not. I had some problems with separate test project setup and this was the workaround for me. |
Can you write more about it? |
IIRC the $srcRoot was set to test project, but in the $src there were paths from both test and tested project. |
Can you share sample project? |
So? Who knows, what case is fixed by this? |
I have configuration similar to this. (The approach from scoverage gradle examples didn't work)
|
I don't know Gradle. |
It's as you say. It's not the prettiest, but I wouldn't work without it. |
@pbatko, I'm trying to merge your project snippet with Gradle sample and I have problems, since I don't know Gradle. Can you attach, or send me directly complete sample project? At first sight, Gradle does not set source roots properly, but sets project's base directory as source root (SBT did the same before scoverage/sbt-scoverage@5575925). Do you know, how to fix it in the project? |
Sorry for late response. In the snippet above, whole configuration should be wrapped with I guess setting source root to project's root was working, because later this path is used only to match source file prefix.. Gradle's equivalent to what's sbt plugins is doing would probably be something along these lines: That line looks definitely suspicious. |
I tried to create a test project from the informations from @pbatko above and this test project, but I cannot merge these into one project, I don't know Gradle. I asked @maiflai (the Gradle plugin author) for help. He suggests to open an issue in Gradle Scoverage plugin. |
A side note. Gradle plugin does not support multiple source roots per project. This was introduced sometime ago (issue #104), but only in Maven and SBT plugins. |
These PRs fix scoverage#165. It's unclear what the problem really is. Issue author has "No source root found for ${sourcepath}" exception in Gradle project. We cannot reproduce the problem. This must be something with user's project configuration or a bug in Gradle plugin. The two PRs were merged hastily all will be reverted. @pbatko please provide test project and report problem in [Gradle Scoverage plugin](https://github.com/scoverage/gradle-scoverage/issues) first.
Add configuration option not to fail on
in https://github.com/scoverage/scalac-scoverage-plugin/blob/master/scalac-scoverage-plugin/src/main/scala/scoverage/report/BaseReportWriter.scala#L26
but skip these paths instead.
The text was updated successfully, but these errors were encountered: