mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Fixed error and poor error message when using an invalid target name.
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
- `@if` declarations were missing from -P output #1973.
|
||||
- Check exe and lib output so -o works with directories.
|
||||
- Swizzling an inline vector in a struct would cause a crash.
|
||||
- Fixed error and poor error message when using an invalid target name.
|
||||
|
||||
### Stdlib changes
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ static Library *add_library(JSONObject *object, const char *dir)
|
||||
{
|
||||
char *res = strdup(provides);
|
||||
str_ellide_in_place(res, 32);
|
||||
error_exit("Invalid 'provides' module name in %s, was '%s'.", library->dir, res);
|
||||
error_exit("Invalid 'provides' module name in %s, was '%s', the name should only contain alphanumerical letters and '_'.", library->dir, res);
|
||||
}
|
||||
library->provides = provides;
|
||||
library->execs = get_optional_string_array(context, object, "exec");
|
||||
|
||||
@@ -208,7 +208,7 @@ static void load_into_build_target(BuildParseContext context, JSONObject *json,
|
||||
{
|
||||
char *name_copy = strdup(name);
|
||||
str_ellide_in_place(name_copy, 32);
|
||||
error_exit("Error reading %s: invalid library target '%s'.", filename, name_copy);
|
||||
error_exit("Error reading %s: invalid library target name '%s' – it should only contain alphanumerical letters and '_'.", context.file, name_copy);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user