From 961ba951ece1c1b8045e1324fb5f4160702b98be Mon Sep 17 00:00:00 2001 From: Nexoniarz Date: Thu, 29 Oct 2026 11:58:24 +0100 Subject: [PATCH] Windows: the language server reads the compiler's \r\n lines (completion after an import's other name); Wine is set up before the cross tests Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016GzNP6r8dg6WDxUVZy8wjL --- src/lsp.fch | 2 +- tests/cross.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lsp.fch b/src/lsp.fch index e6456bb..ea06340 100644 --- a/src/lsp.fch +++ b/src/lsp.fch @@ -306,7 +306,7 @@ fn parseDiag(str line) -> Diag { fn parseOutput(str output) -> Analysis { a := Analysis() - for line in output.split("\n") { + for line in output.replace("\r", "").split("\n") { // Windows ends the compiler's lines with \r\n if line.starts_with("@") { f := splitTabs(line) tag := f[0] diff --git a/tests/cross.sh b/tests/cross.sh index c1ea693..c4ae87e 100755 --- a/tests/cross.sh +++ b/tests/cross.sh @@ -12,7 +12,8 @@ target=${1:?usage: tests/cross.sh windows|arm64} FINCH=${FINCH:-../build/finch} export WINEDEBUG=-all case $target in - windows) runner=wine; ext=.exe ;; + windows) runner=wine; ext=.exe + wine cmd /c exit > /dev/null 2>&1 || true ;; # the first run sets Wine up and says so: not in a test's output arm64) runner=qemu-aarch64; ext= ;; *) echo "unknown target $target"; exit 2 ;; esac