Message codes: Configuration¶
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 |
|---|---|---|---|
config-invalid |
ERROR | A setting of Pitloom's configuration holds a value of the wrong type or shape: a string where true or false goes, 0 for a byte cap, a path where a file name goes, a table missing its name, an unknown choice. The line names the file, the setting (a table, a key, an array's entry counted from 0) and what it must be, then what it holds: its TOML type, and a short value (a string masked, escaped and cut to 40 characters). A URL credential fingerprint or a url-credentials mode is named by its type only: it may be the credential, pasted by mistake. A setup.cfg setting is named as setup.cfg spells it ([tool:pitloom]). The build hook's own [tool.hatch.build.hooks.pitloom] is named without a file: Hatchling may read it from hatch.toml. | 0.25.0 |
config-malformed |
ERROR, WARNING | A configuration or project metadata file is not valid TOML (a --config file, a project's or an sdist's pyproject.toml) or INI (a setup.cfg): the parser's failure, with its line and column where it gives them. The interpolation line is a setup.cfg value holding a % that is not a %% or a valid %(name)s reference. | 0.25.0 |
config-moved |
ERROR | A configuration holds a key or table of an earlier release that now lives elsewhere: a single creator's creator-name in [tool.pitloom.creation] (now an entry of [[tool.pitloom.creator]]), ids-file (now id-registry), a [tool.pitloom.fragments] table, a build hook setting that moved to [tool.pitloom]. The line names where it goes now, as pyproject.toml spells it. | 0.25.0 |
config-unknown-key |
ERROR, WARNING | A configuration table holds a key Pitloom does not know: most often a misspelt one (the line names the known key it is closest to, never its opposite: no-creation-tool is not creation-tool), or one that belongs in another table (the line names it). As an ERROR, the build hook's [tool.hatch.build.hooks.pitloom] holds keys other than enabled and Hatchling's own hook keys. | 0.25.0 |
datetime-unpinned |
INFO | The build hook found neither SOURCE_DATE_EPOCH nor creation-datetime in [tool.pitloom.creation], so the SBOM's created and the package's builtTime are the time of the build: two builds of the same sources give SBOMs (and wheels) that differ in those dates. | 0.25.0 |
source-date-epoch-invalid |
ERROR | The SOURCE_DATE_EPOCH environment variable, which pins the dates of a reproducible build, is set to something that is not a whole number of seconds since 1970-01-01 UTC, or to a number no date has. The specification says a build should fail on it, as Hatchling does. | 0.25.0 |
config-invalid¶
- Level: ERROR. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
- Means: A setting of Pitloom's configuration holds a value of the wrong type or shape: a string where true or false goes, 0 for a byte cap, a path where a file name goes, a table missing its name, an unknown choice. The line names the file, the setting (a table, a key, an array's entry counted from 0) and what it must be, then what it holds: its TOML type, and a short value (a string masked, escaped and cut to 40 characters). A URL credential fingerprint or a url-credentials mode is named by its type only: it may be the credential, pasted by mistake. A setup.cfg setting is named as setup.cfg spells it ([tool:pitloom]). The build hook's own [tool.hatch.build.hooks.pitloom] is named without a file: Hatchling may read it from hatch.toml.
- SBOM effect: not-written: no SBOM is written for the input.
- Pitloom did: Said by the command line (a project's pyproject.toml or setup.cfg, an sdist's, or a --config file), the build hook, the library (generate_project_sbom, loom.run's pitloom_config, load_config_file) and the GitHub Action. Read no setting and wrote nothing: the command exits 1, the build fails, the library raises ValueError carrying the code.
- Tell the user: the file, the setting, what it must be and what it holds, as the line says; they fix the value and run again (the configuration reference lists every setting). Do not edit their configuration for them; ask first, and with nobody to ask, report it only.
- Lines:
ERROR: FILE=<file>: <config-key>: must be <expected>, got <got> [config-invalid]
ERROR: <config-key>: must be <expected>, got <got> [config-invalid]
config-malformed¶
- Level: ERROR, WARNING. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
- Means: A configuration or project metadata file is not valid TOML (a --config file, a project's or an sdist's pyproject.toml) or INI (a setup.cfg): the parser's failure, with its line and column where it gives them. The interpolation line is a setup.cfg value holding a % that is not a %% or a valid %(name)s reference.
- SBOM effect: not-written: no SBOM is written for the input.
- Pitloom did: Said by the command line, the build hook, the library (load_config_file, loom.run's pitloom_config, read_project, read_sdist) and the GitHub Action. As an ERROR, read no setting and no project metadata and wrote nothing: the command exits 1, the build hook fails the build, the library raises ValueError carrying the code. As a WARNING, read the project without that file: a setup.cfg read for pyproject.toml's dynamic fields fills none of them; an sdist's pyproject.toml gives none of its fields: PKG-INFO's are read when there is one, else the package is named unknown, with no version, description or dependencies.
- Tell the user: which file does not parse and where, as the line says; they fix the syntax there (a % in a setup.cfg value is written %%) and run again. Do not edit their configuration for them; ask first, and with nobody to ask, report it only.
- Lines:
ERROR: FILE=<file>: not valid TOML; <failure> [config-malformed]
ERROR: FILE=<file>: not valid INI; <failure> [config-malformed]
ERROR: FILE=<file>: not valid INI interpolation; <error> [config-malformed]
WARNING: FILE=<file>: not valid TOML; <failure> [config-malformed]
WARNING: FILE=<file>: not valid INI; <failure> [config-malformed]
WARNING: FILE=<file>: not valid INI interpolation; <error> [config-malformed]
ERROR: not valid INI; <failure> [config-malformed]
ERROR: not valid INI interpolation; <error> [config-malformed]
config-moved¶
- Level: ERROR. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
- Means: A configuration holds a key or table of an earlier release that now lives elsewhere: a single creator's creator-name in [tool.pitloom.creation] (now an entry of [[tool.pitloom.creator]]), ids-file (now id-registry), a [tool.pitloom.fragments] table, a build hook setting that moved to [tool.pitloom]. The line names where it goes now, as pyproject.toml spells it.
- SBOM effect: not-written: no SBOM is written for the input.
- Pitloom did: Said by the command line (a project's pyproject.toml or setup.cfg, an sdist's, or a --config file), the build hook, the library (generate_project_sbom, loom.run's pitloom_config, load_config_file) and the GitHub Action. Read no setting and wrote nothing: the command exits 1, the build fails, the library raises ValueError carrying the code. Pitloom never reads a moved key in its old place.
- Tell the user: which key moved and where it goes now, as the line says; they move it (a single value becomes an entry of an array of tables where the line names one) and run again. Do not edit their configuration for them; ask first, and with nobody to ask, report it only.
- Lines:
ERROR: FILE=<file>: <config-key>: moved to <destination> [config-moved]
ERROR: <config-key>: moved to <destination> [config-moved]
config-unknown-key¶
- Level: ERROR, WARNING. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
- Means: A configuration table holds a key Pitloom does not know: most often a misspelt one (the line names the known key it is closest to, never its opposite: no-creation-tool is not creation-tool), or one that belongs in another table (the line names it). As an ERROR, the build hook's [tool.hatch.build.hooks.pitloom] holds keys other than enabled and Hatchling's own hook keys.
- SBOM effect: none: the SBOM states what the input holds.
- Pitloom did: Said by the command line (a project's pyproject.toml or setup.cfg, an sdist's, or a --config file), the build hook, the library (generate_project_sbom, loom.run's pitloom_config, load_config_file) and the GitHub Action, once per file and key in a run. As a WARNING, ignored the key: the run goes on with the setting's default, so the setting the user meant is not applied. As an ERROR, the build fails.
- Tell the user: which key is unknown and the hint the line gives; the setting they meant is not applied until they rename or move it. Do not edit their configuration for them; ask first, and with nobody to ask, report it only.
- Lines:
WARNING: FILE=<file>: <config-key>: unknown key <entry>; did you mean <setting>? [config-unknown-key]
WARNING: FILE=<file>: <config-key>: unknown key <entry>; it belongs in <tables> [config-unknown-key]
WARNING: FILE=<file>: <config-key>: unknown key <entry> [config-unknown-key]
WARNING: <config-key>: unknown key <entry>; did you mean <setting>? [config-unknown-key]
WARNING: <config-key>: unknown key <entry>; it belongs in <tables> [config-unknown-key]
WARNING: <config-key>: unknown key <entry> [config-unknown-key]
ERROR: <config-key>: unknown keys <entries>; only enabled and Hatchling's own hook keys go here, other settings go in [tool.pitloom] [config-unknown-key]
datetime-unpinned¶
- Level: INFO.
- Means: The build hook found neither SOURCE_DATE_EPOCH nor creation-datetime in [tool.pitloom.creation], so the SBOM's created and the package's builtTime are the time of the build: two builds of the same sources give SBOMs (and wheels) that differ in those dates.
- SBOM effect: none: the SBOM states what the input holds.
- Pitloom did: Dated the SBOM by the clock; the build goes on.
- Nothing to do: Nothing to fix. For byte-identical builds, the user sets SOURCE_DATE_EPOCH in the build environment or creation-datetime in [tool.pitloom.creation]; mention it only when they ask about reproducible builds.
- Lines:
INFO: Pitloom build hook: created and builtTime come from the clock; set SOURCE_DATE_EPOCH or creation-datetime to pin them [datetime-unpinned]
source-date-epoch-invalid¶
- Level: ERROR. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
- Means: The SOURCE_DATE_EPOCH environment variable, which pins the dates of a reproducible build, is set to something that is not a whole number of seconds since 1970-01-01 UTC, or to a number no date has. The specification says a build should fail on it, as Hatchling does.
- SBOM effect: not-written: no SBOM is written for the input.
- Pitloom did: Read whether or not a date is pinned otherwise; wrote nothing: the command exits 1, the build fails, the library raises ValueError carrying the code.
- Tell the user: the value is not a time, as the line says. They unset it, or set it to whole seconds since 1970 (the build environment most often sets it: a CI step, a packaging tool). Do not change their environment for them; ask first, and with nobody to ask, report it only.
- Lines:
ERROR: SOURCE_DATE_EPOCH=<value>: not an integer number of seconds since the Unix epoch [source-date-epoch-invalid]
ERROR: SOURCE_DATE_EPOCH=<value>: out of range for a date [source-date-epoch-invalid]