Skip to content

Latest commit

 

History

History
189 lines (162 loc) · 11.2 KB

message-codes-dependencies.md

File metadata and controls

189 lines (162 loc) · 11.2 KB
SPDX-FileCopyrightText 2026-present Arthit Suriyawongkul
SPDX-FileType DOCUMENTATION
SPDX-License-Identifier CC0-1.0

Message codes: Dependencies

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
dependency-name-ambiguous INFO A dependency is a direct reference (name @ URL): its name may not be the PyPI project of that name, so PyPI's record of the name may not describe it. 0.25.0
dependency-pin-conflict WARNING A project's lock file and its declared dependency disagree: the lock pins a version other than an exact declared pin (==), or one the declared constraint does not allow. A lock file not regenerated after the declaration changed is the usual cause. 0.25.0
environment-unreadable ERROR 'loom env' (the library: generate_env_sbom) could not read the installed environment: pipdeptree, which lists it, exited with an error (the line shows its last line of output: most often 'No module named pipdeptree' when it is not installed in the interpreter Pitloom runs under), could not be started, or printed what is not its flat --json list (a pipdeptree too old or too new, or a wrapper printing other text). 0.25.0
extra-gate-ambiguous WARNING A requirement declared in one extra carries an extra marker of its own, so it is installed only with several extras together. An SBOM relationship states one optional scope, not a set of extras that must all be asked for. 0.25.0
extra-gate-unusable WARNING A dependency's marker tests an extra in a way Pitloom cannot isolate from its other clauses (it reads the marker's text, never evaluates it), so Pitloom cannot tell which extra installs it. 0.25.0
requirement-invalid WARNING A declared dependency, or an entry of an extra, is not a valid declaration: not PEP 508, an extra's marker that does not parse, a Poetry table poetry-core cannot convert, a Poetry optional dependency in no extra or an extra naming one not declared, a self-reference to an extra the project does not declare, or a self-reference closing a cycle of extras. 0.25.0
requirement-unusable WARNING A Poetry dependency comes from a local path or file: valid, but it names this machine's files, so it has no portable requirement to record. 0.25.0

dependency-name-ambiguous

  • Level: INFO.

  • Means: A dependency is a direct reference (name @ URL): its name may not be the PyPI project of that name, so PyPI's record of the name may not describe it.

  • SBOM effect: thinner: the SBOM says less than reading the input would.

  • Pitloom did: Did not look the dependency up on PyPI, so nothing PyPI states about the name is recorded for it. Said once per package and document, never offline. The SBOM is written.

  • Nothing to do: Nothing to do: the SBOM lists the dependency from its declaration; its URL is its source.

  • Lines:

    INFO: PACKAGE=<package>: a direct reference; not looked up on PyPI [dependency-name-ambiguous]
    

dependency-pin-conflict

  • Level: WARNING.

  • Means: A project's lock file and its declared dependency disagree: the lock pins a version other than an exact declared pin (==), or one the declared constraint does not allow. A lock file not regenerated after the declaration changed is the usual cause.

  • SBOM effect: weaker: what the SBOM says is less sure.

  • Pitloom did: Recorded the version the line keeps: an exact declared pin over the lock, else the locked version. The SBOM is written.

  • Tell the user: which dependency disagrees, what was kept and what dropped, as the line says. They regenerate the lock file (or fix the declaration) and generate again. Do not run the lock tool or edit the project for them; ask first, and with nobody to ask, report it only.

  • Lines:

    WARNING: PACKAGE=<package>: lock and declared exact pin disagree; kept the declared <kept>, dropped the locked <dropped> [dependency-pin-conflict]
    WARNING: PACKAGE=<package>: locked version does not satisfy the declared constraint; kept the locked <kept>, dropped the declared <dropped> [dependency-pin-conflict]
    

environment-unreadable

  • Level: ERROR. As an ERROR, the command stops for that input and writes nothing for it (exit 1).

  • Means: 'loom env' (the library: generate_env_sbom) could not read the installed environment: pipdeptree, which lists it, exited with an error (the line shows its last line of output: most often 'No module named pipdeptree' when it is not installed in the interpreter Pitloom runs under), could not be started, or printed what is not its flat --json list (a pipdeptree too old or too new, or a wrapper printing other text).

  • SBOM effect: not-written: no SBOM is written for the input.

  • Pitloom did: Wrote no SBOM: the command exits 1; the library raises RuntimeError carrying the code.

  • Tell the user: what pipdeptree reported. Most often it is not installed where Pitloom runs: they install it there (pip install pipdeptree) and run again. Do not install it for them; ask first, and with nobody to ask, report it only.

  • Lines:

    ERROR: pipdeptree exited with code <exit-code>; last output: <output> [environment-unreadable]
    ERROR: could not run pipdeptree; <failure> [environment-unreadable]
    ERROR: pipdeptree output is not JSON; <failure> [environment-unreadable]
    ERROR: pipdeptree output is not its --json list: <why> [environment-unreadable]
    

extra-gate-ambiguous

  • Level: WARNING.

  • Means: A requirement declared in one extra carries an extra marker of its own, so it is installed only with several extras together. An SBOM relationship states one optional scope, not a set of extras that must all be asked for.

  • SBOM effect: weaker: what the SBOM says is less sure.

  • Pitloom did: Recorded the dependency as optional, its comment naming every extra it needs. The SBOM is written.

  • Nothing to do: Nothing to do: the SBOM names the dependency as optional, with the extras it needs in its comment.

  • Lines:

    WARNING: dependency <dependency>: needs extras <extra> together; recorded as optional for any of them [extra-gate-ambiguous]
    

extra-gate-unusable

  • Level: WARNING.

  • Means: A dependency's marker tests an extra in a way Pitloom cannot isolate from its other clauses (it reads the marker's text, never evaluates it), so Pitloom cannot tell which extra installs it.

  • SBOM effect: weaker: what the SBOM says is less sure.

  • Pitloom did: Recorded the dependency (for a self-reference, the requirements of the extras it requests) as required, not optional. The SBOM is written.

  • Tell the user: which dependency is recorded as required though its marker names an extra, as the line says. A marker whose extra test is joined to its other clauses with 'and' is read as optional. Do not edit the project for them; ask first, and with nobody to ask, report it only.

  • Lines:

    WARNING: PACKAGE=<package>: the extra marker of <dependency> cannot be isolated; recorded as required [extra-gate-unusable]
    WARNING: PACKAGE=<package>: the extra marker of self-reference <dependency> cannot be isolated; the extras it requests recorded as required [extra-gate-unusable]
    

requirement-invalid

  • Level: WARNING.

  • Means: A declared dependency, or an entry of an extra, is not a valid declaration: not PEP 508, an extra's marker that does not parse, a Poetry table poetry-core cannot convert, a Poetry optional dependency in no extra or an extra naming one not declared, a self-reference to an extra the project does not declare, or a self-reference closing a cycle of extras.

  • SBOM effect: thinner: the SBOM says less than reading the input would.

  • Pitloom did: Said by every run that reads a project's declared dependencies (loom project, loom generate, loom enrich --project-dir, the build hook, the library). Left the entry out of the SBOM's dependencies (a cycle: dropped where it closes, the rest of the extras kept); one that is not PEP 508 met while assembling the document is recorded as a required dependency; one a lock file pins is recorded at the locked version, unchecked against it. The SBOM is written.

  • Tell the user: which declaration is invalid and why, as the line says, and that it is not in the SBOM as declared. They fix the declaration in pyproject.toml, setup.cfg or setup.py (a build would refuse most of these too). Do not edit the project for them; ask first, and with nobody to ask, report it only.

  • Lines:

    WARNING: dependency <dependency> (<declared-in>): not a PEP 508 requirement; skipped [requirement-invalid]
    WARNING: dependency <dependency> (<declared-in>): not convertible to PEP 508: <failure>; skipped [requirement-invalid]
    WARNING: dependency <dependency> (<declared-in>): optional and in no extra; skipped [requirement-invalid]
    WARNING: extra <extra> entry <dependency> (<declared-in>): not a PEP 508 requirement; skipped [requirement-invalid]
    WARNING: extra <extra> entry <dependency> (<declared-in>): its marker does not parse: <failure>; skipped [requirement-invalid]
    WARNING: extra <extra> entry <dependency> (<declared-in>): names an extra the project does not declare; skipped [requirement-invalid]
    WARNING: extra <extra> entry <dependency> (<declared-in>): closes a cycle of self-references; skipped [requirement-invalid]
    WARNING: extra <extra> entry <dependency> (<declared-in>): not a declared Poetry dependency; skipped [requirement-invalid]
    WARNING: dependency <dependency>: not a PEP 508 requirement; recorded as required [requirement-invalid]
    WARNING: dependency <dependency>: not a PEP 508 requirement; locked version <version> used unchecked [requirement-invalid]
    

requirement-unusable

  • Level: WARNING.

  • Means: A Poetry dependency comes from a local path or file: valid, but it names this machine's files, so it has no portable requirement to record.

  • SBOM effect: thinner: the SBOM says less than reading the input would.

  • Pitloom did: Said by every run that reads a project's declared dependencies (loom project, loom generate, loom enrich --project-dir, the build hook, the library). Left the dependency out of the SBOM's dependencies. The SBOM is written.

  • Tell the user: which dependency is not in the SBOM and why, as the line says. Nothing is wrong with the project; a dependency published to a registry, or declared by version, is recorded. Do not edit the project for them; ask first, and with nobody to ask, report it only.

  • Lines:

    WARNING: dependency <dependency> (<declared-in>): a local <source-kind> source, not portable; skipped [requirement-unusable]