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

Build error: Line number [...] is greater than the source file #102

Open
ak80 opened this issue Nov 27, 2016 · 7 comments
Open

Build error: Line number [...] is greater than the source file #102

ak80 opened this issue Nov 27, 2016 · 7 comments
Labels

Comments

@ak80
Copy link

ak80 commented Nov 27, 2016

Hi Team,

I was unable to find a solution to my problem, when using coveralls-maven-plugin in my project. I have mixed Java and Kotlin sources and do my coverage reporting with jacoco. My build fails when I do a

mvn test jacoco:report coveralls:report

with this error:

[ERROR] Failed to execute goal org.eluder.coveralls:coveralls-maven-plugin:4.2.0:report (default-cli) on project BinaryDataParser: Build error: Line number 90 is greater than the source file bdp-processor/src/main/java/org/ak80/bdp/MappedClass.kt size -> [Help 1]

Any idea what could be the problem? Looking at the htm repors created by jacoco, everything seems fine.

Thank you for your time

Alex

@ak80
Copy link
Author

ak80 commented Dec 1, 2016

I see now, that this is a known problem, at least with Scala, see #98 and #73 and #82. Still any idea how to workaround this with Kotlin?

@trautonen
Copy link
Owner

My guess is that something similar happens here what happens with scalac. Sorry that at the moment I have no time to investigate this more.

You could check the exact JaCoCo output XML files and the line numbers found there. If the line numbers are off like what happens with scalac then I really don't know what we can do about it.

@ak80
Copy link
Author

ak80 commented Dec 8, 2016

Alright, thank you for your reply. Maybe I can reach out to the Kotlin folks :-)

@josephlbarnett
Copy link

@trautonen Looks like the Kotlin issue is caused by its compiler inlining functions, and the extra lines are the best solution they have: https://youtrack.jetbrains.com/issue/KT-9766

Given this, would you be more open to a PR like #97 being acceptable?

@sdorra
Copy link

sdorra commented Feb 10, 2018

I've the same problem with a plain java project. Please have a look at spotter.

@anyulled
Copy link

still no workarounds for this? I'm having the following error message:
Failed to execute goal org.eluder.coveralls:coveralls-maven-plugin:4.3.0:report (default-cli) on project jpademo: Build error: Line number 13 is greater than the source file src/main/kotlin/com/anyulled/jpademo/JpaDemoApplication.kt size -> [Help 1]

@davinkevin
Copy link

davinkevin commented Aug 4, 2019

I have the same result with Kotlin and JaCoCo in version 7.X. If I upgrade to JaCoCo 8.X, the system shows me some error about file "Comparison.kt" not found. This file is the result of an inner class generated by the Kotlin code for lambda and name like this by JaCoCo.

Build pipeline in 0.7.5: https://gitlab.com/davinkevin/Podcast-Server/-/jobs/265523285
Build pipeline in 0.8.4: https://gitlab.com/davinkevin/Podcast-Server/-/jobs/265523712

For information, I migrated to codecov which do the job for me.

davinkevin added a commit to davinkevin/Podcast-Server that referenced this issue Aug 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants