This commit is contained in:
2026-07-13 14:08:52 +02:00
parent 6455df52b4
commit de56dc7315
5 changed files with 15 additions and 5 deletions
+3 -2
View File
@@ -87,7 +87,8 @@ read_package_files :: proc(state: ^State, path: string) -> ([]os.File_Info, bool
files: [dynamic]os.File_Info
files.allocator = state.allocator
for entry in entries {
if !entry.is_dir && filepath.ext(entry.name) == ".bro" {
extension := filepath.ext(entry.name)
if !entry.is_dir && (extension == ".bro" || extension == ".hon") {
append(&files, entry)
} else {
os.file_info_delete(entry, state.allocator)
@@ -1170,7 +1171,7 @@ load_package :: proc(state: ^State, path: string, import_span: source.Span, is_r
if is_root {
state.root_failed = true
} else {
source.addf(state.diagnostics, import_span, "package '%s' contains no readable .bro files", canonical)
source.addf(state.diagnostics, import_span, "package '%s' contains no readable .bro or .hon files", canonical)
state.module.packages[pkg_id].available = false
}
os.file_info_slice_delete(files, state.allocator)