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

python 3.12 coverage is not generating/collecting #1726

Closed
trentontrees opened this issue Jan 29, 2024 · 3 comments
Closed

python 3.12 coverage is not generating/collecting #1726

trentontrees opened this issue Jan 29, 2024 · 3 comments
Labels
type: toolchain Related to the toolchains provided by rules_python

Comments

@trentontrees
Copy link
Contributor

trentontrees commented Jan 29, 2024

🐞 bug report

Affected Rule

Is this a regression?

works in 3.11

Description

Building coverage using python 3.12 is not properly connecting through rules_python (best I can tell).

🔬 Minimal Reproduction

Repo: https://github.com/trentontrees/bazel-python-coverage
Branch: fails_3_12

bazel coverage --combined_report=lcov //apps/demo/...

🔥 Exception or Error


INFO: Found 2 targets and 1 test target...
INFO: LCOV coverage report is located at /private/var/tmp/_bazel_trent/31f4e5efa0716cece0da5230e85c5024/execroot/__main__/bazel-out/_coverage/_coverage_report.dat
 and execpath is bazel-out/_coverage/_coverage_report.dat
INFO: From Coverage report generation:
Jan 28, 2024 5:14:10 PM com.google.devtools.coverageoutputgenerator.Main getTracefiles
INFO: Found 1 tracefiles.
Jan 28, 2024 5:14:10 PM com.google.devtools.coverageoutputgenerator.Main parseFilesSequentially
INFO: Parsing file bazel-out/darwin_arm64-fastbuild/testlogs/apps/demo/lib_test/coverage.dat
Jan 28, 2024 5:14:10 PM com.google.devtools.coverageoutputgenerator.Main getGcovInfoFiles
INFO: No gcov info file found.
Jan 28, 2024 5:14:10 PM com.google.devtools.coverageoutputgenerator.Main getGcovJsonInfoFiles
INFO: No gcov json file found.
Jan 28, 2024 5:14:10 PM com.google.devtools.coverageoutputgenerator.Main getProfdataFileOrNull
INFO: No .profdata file found.
Jan 28, 2024 5:14:10 PM com.google.devtools.coverageoutputgenerator.Main runWithArgs
WARNING: There was no coverage found.

🌍 Your Environment

Operating System:

  
aarch64-apple-darwin
  

Output of bazel version:

  
Bazelisk version: development
Build label: 6.4.0
Build target: bazel-out/darwin_arm64-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Thu Oct 19 17:08:20 2023 (1697735300)
Build timestamp: 1697735300
Build timestamp as int: 1697735300
  

Rules_python version:

  
rules_python-0.29.0
  

Anything else relevant?
I can build coverage with python 3.12 tooling, just not automatically with rules_python.

@aignas
Copy link
Collaborator

aignas commented Jan 29, 2024

Coverage wheels should be included for 3.12 python, it could be that the script generating the dependencies only includes it for versions up to 3.11. There is python/private/coverage_deps.bzl file that can be looked at to check this.

@trentontrees
Copy link
Contributor Author

Thanks for the pointer. Created a PR to fix this issue: #1727

@aignas aignas added the type: toolchain Related to the toolchains provided by rules_python label Jan 29, 2024
@trentontrees
Copy link
Contributor Author

Should be fixed in the future 0.30.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: toolchain Related to the toolchains provided by rules_python
Projects
None yet
Development

No branches or pull requests

2 participants