`make compile_snippets` fails
mattha opened this issue · comments
Matt Hainje commented
Running make compile_snippets
is broken.
- There are several unknown tags in the Optimization chapter, e.g.:
Unhandled exception:
Invalid argument(s): Could not find tag 'adjust-alloc' in 'Optimization'.
#0 Book.findTag (package:tool/src/book.dart:186:5)
#1 main.<anonymous closure> (file:///Users/mattha/Projects/craftinginterpreters/tool/bin/compile_snippets.dart:308:42)
#2 MappedListIterable.elementAt (dart:_internal/iterable.dart:413:31)
#3 ListIterator.moveNext (dart:_internal/iterable.dart:342:26)
#4 main (file:///Users/mattha/Projects/craftinginterpreters/tool/bin/compile_snippets.dart:313:21)
#5 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:32)
#6 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
make: *** [compile_snippets] Error 255
- The
runtime-error-function
snippet in the Closures chapter doesn't build:
FAIL Closures / runtime-error-function
cc gen/snippets/chap25_closures/19-runtime-error-function/vm.c -std=c99 -Wall -Wextra -Werror -Wno-unused-parameter -Wno-unused-function -O3 -flto
gen/snippets/chap25_closures/19-runtime-error-function/vm.c:315:8: error: incompatible pointer types passing 'ObjFunction *' to parameter of type 'ObjClosure *' [-Werror,-Wincompatible-pointer-types]
call(function, 0);
^~~~~~~~
gen/snippets/chap25_closures/19-runtime-error-function/vm.c:77:30: note: passing argument to parameter 'closure' here
static bool call(ObjClosure* closure, int argCount) {
^
1 error generated.
make[1]: *** [build/release/chap25_closures-19-runtime-error-function/vm.o] Error 1
- The
look-for-existing-upvalues
snippet in the Closurs chapter doesn't build:
FAIL Closures / look-for-existing-upvalue
cc gen/snippets/chap25_closures/61-look-for-existing-upvalue/vm.c -std=c99 -Wall -Wextra -Werror -Wno-unused-parameter -Wno-unused-function -O3 -flto
gen/snippets/chap25_closures/61-look-for-existing-upvalue/vm.c:116:15: error: variable 'prevUpvalue' set but not used [-Werror,-Wunused-but-set-variable]
ObjUpvalue* prevUpvalue = NULL;
^
1 error generated.
make[1]: *** [build/release/chap25_closures-61-look-for-existing-upvalue/vm.o] Error 1