Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make compile_snippets fails #1123

Open
mattha opened this issue May 19, 2023 · 0 comments
Open

make compile_snippets fails #1123

mattha opened this issue May 19, 2023 · 0 comments

Comments

@mattha
Copy link

mattha commented May 19, 2023

Running make compile_snippets is broken.

  1. 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
  1. 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
  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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant