You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
_is_wheel_built() raises fatal ValueError for pre-built packages with build tags after #1273 #1358
After #1273, _is_wheel_built() crashes with a ValueError when a candidate wheel on a package index carries a build tag but the local configuration expects none.
ValueError: torch: changelog for version 2.11.0 is inconsistent.
Found build tag (2, '') but expected (0, '')
Pre-built packages return an empty build tag from PackageBuildInfo.build_tag() (_pbi.py:298-300) because we assume pre-built wheels come from PyPI and do not have a fromager build tag. When a separate package index (configured via wheel_server_url) hosts a wheel with a build tag > 0, the consistency check at build.py:548-554 raises.
This check existed before #1273 but was inside the broad try/except Exception block that caught it and treated it as a cache miss (return None). The refactoring in #1273 moved the candidate iteration loop outside that exception handler, making the previously-swallowed ValueError fatal.
How to reproduce
Configure a package as pre_built with a wheel_server_url pointing to a package index (e.g. torch with a GitLab PyPI registry)
Ensure that index has a wheel with a build tag > 0 (e.g. torch-2.11.0-2-cp312-cp312-linux_aarch64.whl)
Run a build that looks up that package:
fromager build torch==2.11.0
The build fails with:
ValueError: torch: changelog for version 2.11.0 is inconsistent. Found build tag (2, '') but expected (0, '')
Expected behavior: The build tag mismatch should be treated as a cache miss (log and skip the candidate), matching the pre-#1273 behavior.
Activity