Message codes: File discovery¶
See also: Message codes (the index of every code) and Messages and codes (the line grammar, what a code guarantees and when to trust one).
Trust a code only when the line is one of the lines below, a value in place of
each <name>, after at most one prefix: the index lists the prefixes and
message-codes-values.md the values.
Codes¶
| Code | Level | Means | Since |
|---|---|---|---|
file-discovery-conflict |
WARNING | Two different source files of a setuptools project map to the same path in the wheel (overlapping package_dir entries, for instance), so a build would keep only one of them. | 0.25.0 |
file-discovery-needs-build |
WARNING | The project's wheel file list cannot be read from static configuration; only a build gives it: no static config the backend's discoverer reads, a build-backend no discoverer reads (the line names it as declared), uv_build overrides the heuristic does not read, a setup.py passing file-selection keywords as code, or Flit external-data with a version only importing the module gives. | 0.25.0 |
file-discovery-unusable |
WARNING | A build backend's file discoverer failed on the project's static configuration: its own error (in a downloaded repository its type only), static config it could not introspect, or setuptools finding several top-level packages or modules where it expects one. The lines after the failure say which fallback followed. | 0.25.0 |
file-discovery-conflict¶
- Level: WARNING.
- Means: Two different source files of a setuptools project map to the same path in the wheel (overlapping package_dir entries, for instance), so a build would keep only one of them.
- SBOM effect: thinner: the SBOM says less than reading the input would.
- Pitloom did: Listed the first file found for that path and left the other out.
- Tell the user: which wheel path two files map to, which was kept and which dropped, as the line says. They fix the overlapping package_dir or packages settings. Do not pass --allow-build or edit the project for them; ask first, and with nobody to ask, report it only.
- Lines:
WARNING: DIR=<dir>: two files map to wheel path <entry>; kept <kept>, dropped <dropped> [file-discovery-conflict]
file-discovery-needs-build¶
- Level: WARNING.
- Means: The project's wheel file list cannot be read from static configuration; only a build gives it: no static config the backend's discoverer reads, a build-backend no discoverer reads (the line names it as declared), uv_build overrides the heuristic does not read, a setup.py passing file-selection keywords as code, or Flit external-data with a version only importing the module gives.
- SBOM effect: weaker: what the SBOM says is less sure.
- Pitloom did: With a fallback, listed the files the Hatchling heuristic finds, which may miss or add some; with none (no [project] table), listed no package files. A setup.py passing keywords as code keeps the list static config gives; Flit's external-data files are left out.
- Tell the user: that the SBOM's file list may differ from what a build would put in the wheel, and why, as the line says. With --allow-build, Pitloom builds the wheel and lists the files the build wrote, which runs the project's build code: only for a project they trust. Do not pass --allow-build or edit the project for them; ask first, and with nobody to ask, report it only.
- Lines:
WARNING: DIR=<dir>: no static <discoverer> config resolvable; Hatchling heuristic used, file list may be inaccurate [file-discovery-needs-build]
WARNING: DIR=<dir>: no static <discoverer> config resolvable and no [project] table; file discovery unsupported [file-discovery-needs-build]
WARNING: DIR=<dir>: file discovery not backend-aware for build-backend <backend>; Hatchling heuristic used, file list may be inaccurate [file-discovery-needs-build]
WARNING: DIR=<dir>: file discovery not backend-aware for build-backend <backend> and no [project] table; file discovery unsupported [file-discovery-needs-build]
WARNING: DIR=<dir>: build-and-read failed and file discovery not backend-aware for build-backend <backend>; Hatchling heuristic used, file list may be inaccurate [file-discovery-needs-build]
WARNING: DIR=<dir>: build-and-read failed and file discovery not backend-aware for build-backend <backend> and no [project] table; file discovery unsupported [file-discovery-needs-build]
WARNING: DIR=<dir>: [tool.uv.build-backend] overrides the heuristic cannot see; pass --allow-build for an exact file list from a real build [file-discovery-needs-build]
WARNING: DIR=<dir>: setup.py passes <kwargs> imperatively; file list read from static config may be incomplete [file-discovery-needs-build]
WARNING: DIR=<dir>: no static version for [tool.flit.external-data] without running the module; external-data files left out [file-discovery-needs-build]
file-discovery-unusable¶
- Level: WARNING.
- Means: A build backend's file discoverer failed on the project's static configuration: its own error (in a downloaded repository its type only), static config it could not introspect, or setuptools finding several top-level packages or modules where it expects one. The lines after the failure say which fallback followed.
- SBOM effect: thinner: the SBOM says less than reading the input would.
- Pitloom did: With a fallback, listed the files the Hatchling heuristic finds, which may miss or add some; with none (no [project] table), listed no package files.
- Tell the user: that the SBOM's file list comes from a fallback, or lists no package files, and the discoverer's failure, as the line says. A setuptools project names packages or py_modules explicitly in pyproject.toml or setup.cfg. With --allow-build, Pitloom builds the wheel and lists the files the build wrote, which runs the project's build code: only for a project they trust. Do not pass --allow-build or edit the project for them; ask first, and with nobody to ask, report it only.
- Lines:
WARNING: DIR=<dir>: <discoverer> file discovery failed; <error> [file-discovery-unusable]
WARNING: DIR=<dir>: file discovery failed; Hatchling heuristic used, file list may be inaccurate [file-discovery-unusable]
WARNING: DIR=<dir>: file discovery failed and no [project] table; file discovery unsupported [file-discovery-unusable]
WARNING: DIR=<dir>: <discoverer> static config failed introspection and no [project] table; file discovery unsupported [file-discovery-unusable]
WARNING: DIR=<dir>: setuptools package auto-discovery is ambiguous; <error> [file-discovery-unusable]