CI: find clang-c/Index.h and libclang where Ubuntu and Homebrew keep them; the language server on Windows paths

CI has failed since the embed merge (2026-10-25):
- Linux: bootstrap/build.sh asks llvm-config for the folder with clang-c/Index.h
- macOS: FINCH_LIBCLANG's -L folders also go to the compiler's own link "clang"
- Windows: the language server turns file:///C:/x into C:/x and back (diagnostics went to /C:/x);
  the -g tests compare without \r; shared.sh (dlopen, -rdynamic) is not run there

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016GzNP6r8dg6WDxUVZy8wjL
This commit is contained in:
Nexoniarz 2026-10-29 11:42:18 +01:00
commit 72e96a3f71
4 changed files with 33 additions and 7 deletions

View file

@ -126,13 +126,22 @@ fn uriToPath(str uri) -> str {
i += 1
}
}
return str(out)
p := str(out)
if p.len > 2 && p[0] == '/' && p[2] == ':' {
p = p.sub(1, p.len) // Windows: file:///C:/x -> C:/x
}
return p
}
fn pathToUri(str path) -> str {
digits := "0123456789ABCDEF"
[]str parts = ["file://"]
for c in path {
p := path.replace("\\", "/")
if p.len > 1 && p[1] == ':' {
parts.push("/" + p.sub(0, 2)) // Windows: C:/x -> file:///C:/x
p = p.sub(2, p.len)
}
for c in p {
n := int(c)
if (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || "/-_.~".contains(str(c)) {
parts.push(str(c))