mirror of
https://github.com/NixOS/nix
synced 2025-07-07 06:01:48 +02:00
Better document build failure exit codes
- Improved API docs from comment - Exit codes are for `nix-build`, not just `nix-store --release` - Make note in tests so the magic numbers are not surprising Picking up where #8387 left off.
This commit is contained in:
parent
2291232dc1
commit
97df060588
8 changed files with 72 additions and 45 deletions
|
@ -70,6 +70,8 @@ except for `--arg` and `--attr` / `-A` which are passed to [`nix-instantiate`](n
|
|||
Change the name of the symlink to the output path created from
|
||||
`result` to *outlink*.
|
||||
|
||||
{{#include ./status-build-failure.md}}
|
||||
|
||||
{{#include ./opt-common.md}}
|
||||
|
||||
{{#include ./env-common.md}}
|
||||
|
|
|
@ -54,36 +54,7 @@ The following flags are available:
|
|||
previous build, the new output path is left in
|
||||
`/nix/store/name.check.`
|
||||
|
||||
Special exit codes:
|
||||
|
||||
- `100`\
|
||||
Generic build failure, the builder process returned with a non-zero
|
||||
exit code.
|
||||
|
||||
- `101`\
|
||||
Build timeout, the build was aborted because it did not complete
|
||||
within the specified `timeout`.
|
||||
|
||||
- `102`\
|
||||
Hash mismatch, the build output was rejected because it does not
|
||||
match the [`outputHash` attribute of the
|
||||
derivation](@docroot@/language/advanced-attributes.md).
|
||||
|
||||
- `104`\
|
||||
Not deterministic, the build succeeded in check mode but the
|
||||
resulting output is not binary reproducible.
|
||||
|
||||
With the `--keep-going` flag it's possible for multiple failures to
|
||||
occur, in this case the 1xx status codes are or combined using binary
|
||||
or.
|
||||
|
||||
1100100
|
||||
^^^^
|
||||
|||`- timeout
|
||||
||`-- output hash mismatch
|
||||
|`--- build failure
|
||||
`---- not deterministic
|
||||
|
||||
{{#include ../status-build-failure.md}}
|
||||
|
||||
{{#include ./opt-common.md}}
|
||||
|
||||
|
|
34
doc/manual/src/command-ref/status-build-failure.md
Normal file
34
doc/manual/src/command-ref/status-build-failure.md
Normal file
|
@ -0,0 +1,34 @@
|
|||
# Special exit codes for build failure
|
||||
|
||||
1xx status codes are used when requested builds failed.
|
||||
The following codes are in use:
|
||||
|
||||
- `100` Generic build failure
|
||||
|
||||
The builder process returned with a non-zero exit code.
|
||||
|
||||
- `101` Build timeout
|
||||
|
||||
The build was aborted because it did not complete within the specified `timeout`.
|
||||
|
||||
- `102` Hash mismatch
|
||||
|
||||
The build output was rejected because it does not match the
|
||||
[`outputHash` attribute of the derivation](@docroot@/language/advanced-attributes.md).
|
||||
|
||||
- `104` Not deterministic
|
||||
|
||||
The build succeeded in check mode but the resulting output is not binary reproducible.
|
||||
|
||||
With the `--keep-going` flag it's possible for multiple failures to occur.
|
||||
In this case the 1xx status codes are or combined using
|
||||
[bitwise OR](https://en.wikipedia.org/wiki/Bitwise_operation#OR).
|
||||
|
||||
```
|
||||
0b1100100
|
||||
^^^^
|
||||
|||`- timeout
|
||||
||`-- output hash mismatch
|
||||
|`--- build failure
|
||||
`---- not deterministic
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue