Let's say someone invoke blue build and has an error when compiling some C file.
Basically, this would look like so:
CC libpatch/build/src/lib/libpatch/x86_64/patch.o
libpatch/src/lib/libpatch/x86_64/patch.c: In function 'add_resolve_pc_with_memory':
libpatch/src/lib/libpatch/x86_64/patch.c:1364:17: error: 'a' undeclared (first use in this function)
1364 | a;
| ^
libpatch/src/lib/libpatch/x86_64/patch.c:1364:17: note: each undeclared identifier is reported only once for each function it appears in
Build failed with 1 error:
ERROR:
1. &build-error
2. &message: "Program invokation failed"
3. &origin: "CC\tlibpatch/build/src/lib/libpatch/x86_64/patch.o"
4. &irritants: "gcc -MMD -Ilibpatch/build -Ilibpatch/include -include libpatch/include/private/def.h -I/gnu/store/0wqw373ig0x7bi5jhdj0v4m15xsdfdz8-capstone-5.0.1/include/capstone -I/gnu/store/s49v293nfyji7kik2z41zfrychja2qlj-elfutils-0.192/include -I/gnu/store/r9wba3ikmk4rx6mf6d6b0lfk3gdp6202-xz-5.4.5/include -I/gnu/store/s49v293nfyji7kik2z41zfrychja2qlj-elfutils-0.192/include -I/gnu/store/zi0sk0ir42360dnhfhmjp9pcg3gyi919-zlib-1.3.1/include -I/gnu/store/b64qwlab2191lab9kjh9j72q12y1b28j-libolx-1.7.0/include -I/gnu/store/4n3bd7xfdpc86r44h6hcywvqi91rlqx9-liburcu-0.14.1/include -Ilibpatch/src/lib/libpatch -Ilibpatch/src/lib/libpatch-common -Ilibpatch/src/lib/libpatch/x86_64/include -DLIBPATCH_CORE -fdiagnostics-color=always -O2 -g -Wall -Wextra -Werror -Wno-unused-parameter -Wno-unused-function -O0 -ggdb3 -fvisibility=hidden -fPIC -c -o libpatch/build/src/lib/libpatch/x86_64/patch.o libpatch/src/lib/libpatch/x86_64/patch.c"
make: *** [Makefile:4: all] Error 1
What I think would be nice is to have a builtin command that can list me the last errors again. For example, I might have closed the terminal or maybe I don't want to scroll back if I have lots of compiled fiels. I could just do:
blue last-error
and it will list all errors from the last build as a recutils list of records:
origin: libpatch/build/src/lib/libpatch/x86_64/patch.o
date: Sun 03 Aug 2025 08:39:09 PM EDT
details: 750ed32e051ada8a85844b4ad82c7cbb159ca3497ada5d6db9114e602b8a2288
command: gcc -MMD -Ilibpatch/build -Ilibpatch/include -include libpatch/include/private/def.h -I/gnu/store/0wqw373ig0x7bi5jhdj0v4m15xsdfdz8-capstone-5.0.1/include/capstone -I/gnu/store/s49v293nfyji7kik2z41zfrychja2qlj-elfutils-0.192/include -I/gnu/store/r9wba3ikmk4rx6mf6d6b0lfk3gdp6202-xz-5.4.5/include -I/gnu/store/s49v293nfyji7kik2z41zfrychja2qlj-elfutils-0.192/include -I/gnu/store/zi0sk0ir42360dnhfhmjp9pcg3gyi919-zlib-1.3.1/include -I/gnu/store/b64qwlab2191lab9kjh9j72q12y1b28j-libolx-1.7.0/include -I/gnu/store/4n3bd7xfdpc86r44h6hcywvqi91rlqx9-liburcu-0.14.1/include -Ilibpatch/src/lib/libpatch -Ilibpatch/src/lib/libpatch-common -Ilibpatch/src/lib/libpatch/x86_64/include -DLIBPATCH_CORE -fdiagnostics-color=always -O2 -g -Wall -Wextra -Werror -Wno-unused-parameter -Wno-unused-function -O0 -ggdb3 -fvisibility=hidden -fPIC -c -o libpatch/build/src/lib/libpatch/x86_64/patch.o libpatch/src/lib/libpatch/x86_64/patch.c
Note that the origin field could actually be the source-location of the <c-binary> object, something like blueprint/builds.scm:40.
Then, we could use the details field to print the detailed error:
blue last-error 750ed32e051ada8a85844b4ad82c7cbb159ca3497ada5d6db9114e602b8a2288
would yield:
libpatch/src/lib/libpatch/x86_64/patch.c: In function 'add_resolve_pc_with_memory':
libpatch/src/lib/libpatch/x86_64/patch.c:1364:17: error: 'a' undeclared (first use in this function)
1364 | a;
| ^
libpatch/src/lib/libpatch/x86_64/patch.c:1364:17: note: each undeclared identifier is reported only once for each function it appears in
Thoughts?
Let's say someone invoke `blue build` and has an error when compiling some C file.
Basically, this would look like so:
```
CC libpatch/build/src/lib/libpatch/x86_64/patch.o
libpatch/src/lib/libpatch/x86_64/patch.c: In function 'add_resolve_pc_with_memory':
libpatch/src/lib/libpatch/x86_64/patch.c:1364:17: error: 'a' undeclared (first use in this function)
1364 | a;
| ^
libpatch/src/lib/libpatch/x86_64/patch.c:1364:17: note: each undeclared identifier is reported only once for each function it appears in
Build failed with 1 error:
ERROR:
1. &build-error
2. &message: "Program invokation failed"
3. &origin: "CC\tlibpatch/build/src/lib/libpatch/x86_64/patch.o"
4. &irritants: "gcc -MMD -Ilibpatch/build -Ilibpatch/include -include libpatch/include/private/def.h -I/gnu/store/0wqw373ig0x7bi5jhdj0v4m15xsdfdz8-capstone-5.0.1/include/capstone -I/gnu/store/s49v293nfyji7kik2z41zfrychja2qlj-elfutils-0.192/include -I/gnu/store/r9wba3ikmk4rx6mf6d6b0lfk3gdp6202-xz-5.4.5/include -I/gnu/store/s49v293nfyji7kik2z41zfrychja2qlj-elfutils-0.192/include -I/gnu/store/zi0sk0ir42360dnhfhmjp9pcg3gyi919-zlib-1.3.1/include -I/gnu/store/b64qwlab2191lab9kjh9j72q12y1b28j-libolx-1.7.0/include -I/gnu/store/4n3bd7xfdpc86r44h6hcywvqi91rlqx9-liburcu-0.14.1/include -Ilibpatch/src/lib/libpatch -Ilibpatch/src/lib/libpatch-common -Ilibpatch/src/lib/libpatch/x86_64/include -DLIBPATCH_CORE -fdiagnostics-color=always -O2 -g -Wall -Wextra -Werror -Wno-unused-parameter -Wno-unused-function -O0 -ggdb3 -fvisibility=hidden -fPIC -c -o libpatch/build/src/lib/libpatch/x86_64/patch.o libpatch/src/lib/libpatch/x86_64/patch.c"
make: *** [Makefile:4: all] Error 1
```
What I think would be nice is to have a builtin command that can list me the last errors again. For example, I might have closed the terminal or maybe I don't want to scroll back if I have lots of compiled fiels. I could just do:
```sh
blue last-error
```
and it will list all errors from the last build as a recutils list of records:
```
origin: libpatch/build/src/lib/libpatch/x86_64/patch.o
date: Sun 03 Aug 2025 08:39:09 PM EDT
details: 750ed32e051ada8a85844b4ad82c7cbb159ca3497ada5d6db9114e602b8a2288
command: gcc -MMD -Ilibpatch/build -Ilibpatch/include -include libpatch/include/private/def.h -I/gnu/store/0wqw373ig0x7bi5jhdj0v4m15xsdfdz8-capstone-5.0.1/include/capstone -I/gnu/store/s49v293nfyji7kik2z41zfrychja2qlj-elfutils-0.192/include -I/gnu/store/r9wba3ikmk4rx6mf6d6b0lfk3gdp6202-xz-5.4.5/include -I/gnu/store/s49v293nfyji7kik2z41zfrychja2qlj-elfutils-0.192/include -I/gnu/store/zi0sk0ir42360dnhfhmjp9pcg3gyi919-zlib-1.3.1/include -I/gnu/store/b64qwlab2191lab9kjh9j72q12y1b28j-libolx-1.7.0/include -I/gnu/store/4n3bd7xfdpc86r44h6hcywvqi91rlqx9-liburcu-0.14.1/include -Ilibpatch/src/lib/libpatch -Ilibpatch/src/lib/libpatch-common -Ilibpatch/src/lib/libpatch/x86_64/include -DLIBPATCH_CORE -fdiagnostics-color=always -O2 -g -Wall -Wextra -Werror -Wno-unused-parameter -Wno-unused-function -O0 -ggdb3 -fvisibility=hidden -fPIC -c -o libpatch/build/src/lib/libpatch/x86_64/patch.o libpatch/src/lib/libpatch/x86_64/patch.c
```
Note that the `origin` field could actually be the source-location of the `<c-binary>` object, something like `blueprint/builds.scm:40`.
Then, we could use the `details` field to print the detailed error:
```sh
blue last-error 750ed32e051ada8a85844b4ad82c7cbb159ca3497ada5d6db9114e602b8a2288
```
would yield:
```
libpatch/src/lib/libpatch/x86_64/patch.c: In function 'add_resolve_pc_with_memory':
libpatch/src/lib/libpatch/x86_64/patch.c:1364:17: error: 'a' undeclared (first use in this function)
1364 | a;
| ^
libpatch/src/lib/libpatch/x86_64/patch.c:1364:17: note: each undeclared identifier is reported only once for each function it appears in
```
Thoughts?