fix string hash bug

This commit is contained in:
2026-02-17 12:26:52 -06:00
parent 12b6c3544e
commit 4c9db198db
3 changed files with 24 additions and 29 deletions

View File

@@ -63,27 +63,6 @@ package.load_config = function(name)
return {}
}
// Validate: if content has [compilation] but decode result doesn't, retry
var has_compilation = search(content, '[compilation') != null
var retry = 0
var cf = null
if (has_compilation && !result.compilation) {
print(`TOML decode missing compilation for ${config_path}, retrying`)
while (retry < 3 && (!result || !result.compilation)) {
result = toml.decode(content)
retry = retry + 1
}
if (!result) return {}
}
if (has_compilation && result.compilation) {
cf = result.compilation.CFLAGS
if (cf == null && search(content, 'CFLAGS') != null) {
print(`TOML has CFLAGS text but decode missing it for ${config_path}`)
print(`compilation keys: ${text(array(result.compilation), ',')}`)
}
}
config_cache[cache_key] = result
return result
}