Skip to content

build: report internal build dependency provenance - #2509

Open
rwgk wants to merge 1 commit into
mainfrom
rwgk/stacked/ci/build_dependency_provenance
Open

build: report internal build dependency provenance#2509
rwgk wants to merge 1 commit into
mainfrom
rwgk/stacked/ci/build_dependency_provenance

Conversation

@rwgk

@rwgk rwgk commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Description

Related to #2468. The stacked follow-up, #2510, addresses dependency selection itself.

PEP 517 build hooks execute in environments where the dependency actually imported at build time is not always obvious from the surrounding workflow. A locally built wheel, an editable or source installation, and a released package can all be present or eligible. Without explicit provenance in the build log, a successful build can appear to validate one combination of sources while actually using another, and discrepancies between local and CI builds can be unnecessarily difficult to diagnose.

This PR reports the internal dependency that each build hook imported, at the point where it is used:

  • The cuda.bindings build reports the cuda-pathfinder version and package directory.
  • The cuda.core build reports the cuda-pathfinder version and package directory.
  • The cuda.core build reports the cuda-bindings version and package directory.

The resulting messages have this form:

Using cuda-pathfinder <version> from <package directory>
Using cuda-bindings <version> from <package directory>

Both pieces of information are useful. A version alone may not distinguish a local artifact from an index-provided installation, while a path alone does not identify which release or development version was imported. Together they make the build log direct, self-contained evidence of dependency provenance.

The messages are written to stderr so they remain visible in build logs. This PR does not change dependency resolution or validation behavior. While touching the duplicated cuda-pathfinder import helpers, it also keeps them equivalent and narrowly replaces their os.path operations with pathlib.Path operations.

@copy-pr-bot

copy-pr-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions github-actions Bot added cuda.bindings Everything related to the cuda.bindings module cuda.core Everything related to the cuda.core module labels Aug 5, 2026
@rwgk rwgk self-assigned this Aug 5, 2026
@rwgk rwgk added the P1 Medium priority - Should do label Aug 5, 2026
@rwgk

rwgk commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

@rwgk
rwgk marked this pull request as ready for review August 5, 2026 15:13
@rwgk
rwgk requested review from juenglin and kkraus14 August 5, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda.bindings Everything related to the cuda.bindings module cuda.core Everything related to the cuda.core module P1 Medium priority - Should do

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant