-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
LcovParser does not follow spec for FN: line #25118
Comments
sgowroji
added
the
team-Core
Skyframe, bazel query, BEP, options parsing, bazelrc
label
Jan 29, 2025
alexeagle
added a commit
to aspect-build/rules_py
that referenced
this issue
Jan 29, 2025
bazelbuild/bazel#25118 was causing our coverage reports to fail to parse into combined report. Related to #520 which was missing testing that the report actually worked. fyi @dizzy57
c-mita
added a commit
to c-mita/bazel
that referenced
this issue
Feb 5, 2025
Built at commit ee12906 Relevant changes: * Add support for input FN lines that include a function end line (bazelbuild#25118) RELNOTES: LCOV parsing does not break on FN lines including an end line number
bazel-io
pushed a commit
to bazel-io/bazel
that referenced
this issue
Feb 5, 2025
Built at commit ee12906 Relevant changes: * Add support for input FN lines that include a function end line (bazelbuild#25118). RELNOTES: LCOV parsing does not break on FN lines including an end line number. Closes bazelbuild#25200. PiperOrigin-RevId: 723451534 Change-Id: I8912082ae6517bf0359329004d9a4f5e9ac76188
github-merge-queue bot
pushed a commit
that referenced
this issue
Feb 5, 2025
Built at commit ee12906 Relevant changes: * Add support for input FN lines that include a function end line (#25118). RELNOTES: LCOV parsing does not break on FN lines including an end line number. Closes #25200. PiperOrigin-RevId: 723451534 Change-Id: I8912082ae6517bf0359329004d9a4f5e9ac76188 Commit df92905 Co-authored-by: Charles Mita <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description of the bug:
Bazel's coverage data handling follows the LCOV specification, which defines a descriptor of a function with
FN
. You can find withman geninfo
or in the hosted manpageHowever Bazel's implementation in LcovParser.java does not permit the 'end line number'. It's grammar is
As a result, coverage gathered with a tool like coverage.py cannot be parsed by Bazel.
Which category does this issue belong to?
Core
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
see https://github.com/aspect-build/rules_py/actions/runs/13018843537/job/36314576810 which has a very simple usage of coverage
During
bazel coverage
we see a warning:this produces a corrupted file that lcov and genhtml cannot read, since a dangling reference to the missing function ends up in the merged lcov data:
Which operating system are you running Bazel on?
macos or linux
What is the output of
bazel info release
?7.4.1
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD
?If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: