bazel-contrib / bazel-contrib/rules_python

Empty coverage reports for Python 3.10.15 and 3.10.16

未关闭
#2,844 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
help wanted type: toolchain
主要语言
Starlark
星标
688
派生
721
平均合并
15 小时 7 分钟
30 天内合并 PR
76

描述

# 🐞 bug report

### Affected Rule

rules_python

### Is this a regression?

No

### Description

Running `bazel coverage` does not produce coverage reports for all versions of Python. The coverage.dat files are empty when using Python version 3.10.15 and 3.10.16. Other versions of Python 3.10 do seem to produce valid coverage reports.

I did not test Python 3.11 or 3.12.

## 🔬 Minimal Reproduction

I added tests on a fork of main: [python-3-10-16-coverage](https://github.com/keesvanhespen/rules_python/tree/python-3-10-16-coverage).

Running

`bazel coverage --action_env=COVERAGE_GCOV_OPTIONS=-b --combined_report=lcov --strategy=CoverageReport=local -- //test_code/...
`

from the `tests/coverage` directory returns a filled coverage.dat file in bazel-out for Python 3.10.14, but it is empty for 3.10.16.

## 🌍 Your Environment

**Operating System:**

  

MacOS Sequoia ARM 64

**Output of `bazel version`:**

  

Aspect CLI version: 2025.06.52+25667cae2
INFO: Invocation ID: 58fd115a-8c31-42c8-a32f-e11056aa355a
Build label: 8.2.1
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer
Build time: Thu Apr 17 18:31:45 2025 (1744914705)
Build timestamp: 1744914705
Build timestamp as int: 1744914705

**Rules_python version:**

  

1.3.0

**Anything else relevant?**

贡献指南

打开贡献指南

调研方向

从 tests/coverage 开始,使用链接的 python-3-10-16-coverage 分支进行复现,并比较针对 Python 3.10.14 与 3.10.15 和 3.10.16 报告的 bazel coverage 命令及 coverage.dat 输出。完成的标准是:受影响的 Python 版本能够生成 coverage.dat,并且 coverage 测试通过。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
build-system, testing
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。