Make errors
Big-Mande opened this issue · comments
britchler commented
I was able to use the make get command but running the make command give me these errors:
tool/lib/src/book.dart:118:56: Error: The method 'listSync' isn't defined for the class 'Glob'.
- 'Glob' is from 'package:glob/glob.dart' ('../../.pub-cache/hosted/pub.dartlang.org/glob-2.1.1/lib/glob.dart').
Try correcting the name to the name of an existing method, or defining a method named 'listSync'.
for (var file in Glob("$language/**.{c,h,java}").listSync()) {
^^^^^^^^
tool/lib/src/book.dart:158:52: Error: The value 'null' can't be returned from a function with return type 'Page' because 'Page' is not nullable. - 'Page' is from 'package:tool/src/page.dart' ('tool/lib/src/page.dart').
if (index < 0 || index >= pages.length) return null;
^
tool/lib/src/book.dart:162:48: Error: A value of type 'Snippet?' can't be returned from a function with return type 'Snippet' because 'Snippet?' is nullable and 'Snippet' isn't. - 'Snippet' is from 'package:tool/src/snippet.dart' ('tool/lib/src/snippet.dart').
Snippet findSnippet(CodeTag tag) => _snippets[tag];
^
tool/lib/src/book.dart:171:11: Error: Non-nullable variable 'last' must be assigned before it can be used.
if (last == null || snippet.tag > last.tag) last = snippet;
^^^^
tool/lib/src/book.dart:171:41: Error: Non-nullable variable 'last' must be assigned before it can be used.
if (last == null || snippet.tag > last.tag) last = snippet;
^^^^
tool/lib/src/book.dart:174:12: Error: Non-nullable variable 'last' must be assigned before it can be used.
return last;
^^^^
tool/lib/src/mustache.dart:58:19: Error: Non-nullable variable 'chapters' must be assigned before it can be used.
"chapters": chapters,
^^^^^^^^
tool/lib/src/mustache.dart:74:20: Error: Non-nullable variable 'nextType' must be assigned before it can be used.
"next_type": nextType,
^^^^^^^^
tool/lib/src/page.dart:50:24: Error: The value 'null' can't be returned from a function with return type 'String' because 'String' is not nullable.
if (isPart) return null;
^
tool/lib/src/page.dart:51:14: Error: Property 'title' cannot be accessed on 'Page?' because it is potentially null. - 'Page' is from 'package:tool/src/page.dart' ('tool/lib/src/page.dart').
Try accessing using ?. instead.
if (part.title == "A Tree-Walk Interpreter") return "java";
^^^^^
make: *** [build/build.dart.snapshot] Error 254
Viha Shah commented
similar situation, I downgraded the dart to 2.19 so make-get works but then make doesn't work. Were you able to fix it?
Edit: figured out that on dart 2.19.6-1 the make get and make clox seems to work.