aboutsummaryrefslogtreecommitdiff
path: root/src/parser.cpp
diff options
context:
space:
mode:
authorFeoramund <161657516+Feoramund@users.noreply.github.com>2024-05-12 19:51:19 -0400
committerFeoramund <161657516+Feoramund@users.noreply.github.com>2024-05-12 19:51:19 -0400
commit1935811b2c6118e633dd5c4cef2e9e70f7b962e5 (patch)
tree7c66027f817d54acdbf69f9c0ee4e233b7d2c428 /src/parser.cpp
parent1183f4794b5bd3f1afddbb351c941a8a617a085f (diff)
Suggest `-all-packages` if testing empty directory
Diffstat (limited to 'src/parser.cpp')
-rw-r--r--src/parser.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/parser.cpp b/src/parser.cpp
index ee3c56daf..ad962f53e 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -5508,11 +5508,15 @@ gb_internal AstPackage *try_add_import_path(Parser *p, String path, String const
}
}
if (files_with_ext == 0 || files_to_reserve == 1) {
+ ERROR_BLOCK();
if (files_with_ext != 0) {
syntax_error(pos, "Directory contains no .odin files for the specified platform: %.*s", LIT(rel_path));
} else {
syntax_error(pos, "Empty directory that contains no .odin files: %.*s", LIT(rel_path));
}
+ if (build_context.command_kind == Command_test) {
+ error_line("\tSuggestion: Make an .odin file that imports packages to test and use the `-all-packages` flag.");
+ }
return nullptr;
}