From a157320104a3041f7ca4f050713dd0f1942f35c8 Mon Sep 17 00:00:00 2001 From: Phil Ruffwind Date: Mon, 1 Jul 2024 03:12:25 -0700 Subject: [PATCH] Disable CanonicalizePath test when GetFinalPathNameByHandleW is unavailable When GetFinalPathNameByHandleW is unavailable, canonicalizePath falls back to GetShortPathNameW + GetLongPathNameW, but that not always guaranted to work. The documentation notes, for example: > Resilient File System (ReFS) doesn't support short names. If you call > GetShortPathName on a path that doesn't have any short names on-disk, > the call will succeed, but will return the long-name path instead. https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getshortpathnamew The Windows image on GitHub Actions no longer seems to support GetShortPathNameW and so the tests have begun to fail. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 65e3a6d1..14ba6544 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: - { os: ubuntu-latest, ghc: 9.2.4, cabal: 3.8.1.0 } - { os: ubuntu-latest, ghc: 9.4.3, cabal: 3.8.1.0 } - { os: ubuntu-latest, ghc: latest, cabal: latest, cabal-package-flags: +os-string, ghc-flags: -Werror=deprecations } - - { os: windows-latest, stack: lts-12.26, stack-extra-deps: "bytestring-0.11.3.0, filepath-1.4.100.0, time-1.8.0.2, Win32-2.13.3.0", overrides: "before_prepare() { sed -i.bak -e /CreateSymbolicLinkW/d -e /GetFinalPathNameByHandleW/d configure.ac; }" } + - { os: windows-2019, stack: lts-12.26, stack-extra-deps: "bytestring-0.11.3.0, filepath-1.4.100.0, time-1.8.0.2, Win32-2.13.3.0", overrides: "before_prepare() { sed -i.bak -e /CreateSymbolicLinkW/d -e /GetFinalPathNameByHandleW/d configure.ac; }" } - { os: windows-latest, stack: lts-17.5, stack-extra-deps: "bytestring-0.11.3.0, filepath-1.4.100.0, time-1.9.3, Win32-2.13.3.0" } - { os: windows-latest, stack: lts-22.7, stack-extra-deps: "bytestring-0.11.5.3, filepath-1.5.2.0, os-string-2.0.2, time-1.14, Win32-2.14.0.0", stack-package-flags: "{directory: {os-string: true}, Win32: {os-string: true}}", ghc-flags: -Werror=deprecations } runs-on: ${{ matrix.os }}