Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Win32 2.14 #166

Closed
BinderDavid opened this issue Jan 21, 2024 · 5 comments
Closed

Support Win32 2.14 #166

BinderDavid opened this issue Jan 21, 2024 · 5 comments
Labels
type: a-feature-request This is a request for a new feature.

Comments

@BinderDavid
Copy link
Contributor

BinderDavid commented Jan 21, 2024

Win32 has just released version 2.14, but the directory package still has an upper bound of Win32 <2.14.

A few notes:

  • Win32 had metadata revisions for versions <2.14 w.r.t. the dependency on filepath. Only version 2.14 is compatible with filepath >= 1.5. So compatibility with Win32 2.14 is important going forward if we want to support filepath >= 1.5 .
  • I noticed that Win32 2.13 is hardcoded in the CI for Windows, so that has to be changed as well.

@hasufell This might also be relevant for you, since this could be a blocker for bumping filepath in GHC.

Edit: I noticed this when trying to bump Win32 in GHC here: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/11679

@hasufell
Copy link
Member

Does it build without code changes?

@BinderDavid
Copy link
Contributor Author

It is possible, but I don't have access to a Windows machine right now to test it.

@BinderDavid
Copy link
Contributor Author

Good news, I just tested on Windows (with Win32==2.14.0.0) and everything, including the testsuite, runs through without issues:

PS C:\Users\dbind\GitRepos\directory> cabal build
Resolving dependencies...
Build profile: -w ghc-9.4.7 -O1
In order, the following will be built (use -v for more details):
 - os-string-2.0.2 (lib) (requires download & build)
 - filepath-1.5.0.0 (lib) (requires build)
 - Win32-2.14.0.0 (lib) (requires download & build)
 - time-1.12.2 (lib:time) (requires build)
 - directory-1.3.8.2 (lib:directory) (configuration changed)
Downloading  os-string-2.0.2
Downloaded   os-string-2.0.2
Downloading  Win32-2.14.0.0
Starting     os-string-2.0.2 (lib)
Downloaded   Win32-2.14.0.0
Building     os-string-2.0.2 (lib)
Installing   os-string-2.0.2 (lib)
Completed    os-string-2.0.2 (lib)
Starting     filepath-1.5.0.0 (lib)
Building     filepath-1.5.0.0 (lib)
Installing   filepath-1.5.0.0 (lib)
Completed    filepath-1.5.0.0 (lib)
Starting     Win32-2.14.0.0 (lib)
Building     Win32-2.14.0.0 (lib)
Installing   Win32-2.14.0.0 (lib)
Completed    Win32-2.14.0.0 (lib)
Starting     time-1.12.2 (all, legacy fallback)
Building     time-1.12.2 (all, legacy fallback)
Installing   time-1.12.2 (all, legacy fallback)
Completed    time-1.12.2 (all, legacy fallback)
Configuring directory-1.3.8.2...
checking for gcc... C:\ghcup\ghc\949810~1.7\lib\../mingw/bin\clang.exe
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether C:\ghcup\ghc\949810~1.7\lib\../mingw/bin\clang.exe accepts -g... yes
checking for C:\ghcup\ghc\949810~1.7\lib\../mingw/bin\clang.exe option to enable C11 features... none needed
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for fcntl.h... yes
checking for limits.h... yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking for time.h... yes
checking for realpath... no
checking for utimensat... no
checking for CreateSymbolicLinkW... yes
checking for GetFinalPathNameByHandleW... yes
configure: creating ./config.status
config.status: creating HsDirectoryConfig.h
config.status: HsDirectoryConfig.h is unchanged
Preprocessing library for directory-1.3.8.2..
Building library for directory-1.3.8.2..
[4 of 9] Compiling System.Directory.Internal.Common ( System\Directory\Internal\Common.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\System\Directory\Internal\Common.o ) [System.OsPath package changed]
[5 of 9] Compiling System.Directory.Internal.Config ( System\Directory\Internal\Config.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\System\Directory\Internal\Config.o ) [System.Directory.Internal.Common changed]
[6 of 9] Compiling System.Directory.Internal.Windows ( C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\System\Directory\Internal\Windows.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\System\Directory\Internal\Windows.o ) [System.Win32.WindowsString.Types package changed]
[7 of 9] Compiling System.Directory.Internal ( System\Directory\Internal.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\System\Directory\Internal.o ) [System.Directory.Internal.Common changed]
[8 of 9] Compiling System.Directory.OsPath ( System\Directory\OsPath.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\System\Directory\OsPath.o ) [System.OsPath package changed]
[9 of 9] Compiling System.Directory ( System\Directory.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\System\Directory.o ) [System.OsPath package changed]
PS C:\Users\dbind\GitRepos\directory> cabal test
Resolving dependencies...
Build profile: -w ghc-9.4.7 -O1
In order, the following will be built (use -v for more details):
 - directory-1.3.8.2 (ephemeral targets)
Preprocessing library for directory-1.3.8.2..
Building library for directory-1.3.8.2..
Preprocessing test suite 'test' for directory-1.3.8.2..
Building test suite 'test' for directory-1.3.8.2..
[ 1 of 34] Compiling TestUtils        ( tests\TestUtils.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\TestUtils.o ) [System.Win32 package changed]
[ 2 of 34] Compiling Util             ( tests\Util.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\Util.o ) [System.OsPath package changed]
[ 3 of 34] Compiling T8482            ( tests\T8482.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\T8482.o ) [System.Directory.Internal changed]
[ 4 of 34] Compiling Simplify         ( tests\Simplify.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\Simplify.o ) [System.OsPath package changed]
[ 5 of 34] Compiling RenamePath       ( tests\RenamePath.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\RenamePath.o ) [System.Directory.Internal changed]
[ 6 of 34] Compiling RenameFile001    ( tests\RenameFile001.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\RenameFile001.o ) [System.Directory.Internal changed]
[ 7 of 34] Compiling RenameDirectory  ( tests\RenameDirectory.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\RenameDirectory.o ) [System.Directory.OsPath changed]
[ 8 of 34] Compiling RemovePathForcibly ( tests\RemovePathForcibly.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\RemovePathForcibly.o ) [System.OsPath package changed]
[ 9 of 34] Compiling RemoveDirectoryRecursive001 ( tests\RemoveDirectoryRecursive001.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\RemoveDirectoryRecursive001.o ) [System.OsPath package changed]
[10 of 34] Compiling PathIsSymbolicLink ( tests\PathIsSymbolicLink.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\PathIsSymbolicLink.o ) [System.Directory.OsPath changed]
[11 of 34] Compiling MinimizeNameConflicts ( tests\MinimizeNameConflicts.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\MinimizeNameConflicts.o ) [System.Win32 package changed]
[12 of 34] Compiling MakeAbsolute     ( tests\MakeAbsolute.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\MakeAbsolute.o ) [System.OsPath package changed]
[13 of 34] Compiling LongPaths        ( tests\LongPaths.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\LongPaths.o ) [System.OsPath package changed]
[14 of 34] Compiling GetPermissions001 ( tests\GetPermissions001.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\GetPermissions001.o ) [System.Directory.Internal.Common changed]
[15 of 34] Compiling GetHomeDirectory002 ( tests\GetHomeDirectory002.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\GetHomeDirectory002.o ) [System.Directory.OsPath changed]
[16 of 34] Compiling GetHomeDirectory001 ( tests\GetHomeDirectory001.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\GetHomeDirectory001.o ) [System.Directory.Internal.Common changed]
[17 of 34] Compiling GetFileSize      ( tests\GetFileSize.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\GetFileSize.o ) [System.Directory.OsPath changed]
[18 of 34] Compiling GetDirContents002 ( tests\GetDirContents002.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\GetDirContents002.o ) [System.Directory.OsPath changed]
[19 of 34] Compiling GetDirContents001 ( tests\GetDirContents001.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\GetDirContents001.o ) [System.OsPath package changed]
[20 of 34] Compiling FindFile001      ( tests\FindFile001.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\FindFile001.o ) [System.OsPath package changed]
[21 of 34] Compiling FileTime         ( tests\FileTime.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\FileTime.o ) [Data.Time.Clock package changed]
[22 of 34] Compiling DoesPathExist    ( tests\DoesPathExist.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\DoesPathExist.o ) [System.Directory.OsPath changed]
[23 of 34] Compiling DoesDirectoryExist001 ( tests\DoesDirectoryExist001.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\DoesDirectoryExist001.o ) [System.Directory.OsPath changed]
[24 of 34] Compiling Directory001     ( tests\Directory001.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\Directory001.o ) [System.Directory.OsPath changed]
[25 of 34] Compiling CurrentDirectory001 ( tests\CurrentDirectory001.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\CurrentDirectory001.o ) [System.Directory.OsPath changed]
[26 of 34] Compiling CreateDirectoryIfMissing001 ( tests\CreateDirectoryIfMissing001.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\CreateDirectoryIfMissing001.o ) [System.OsPath package changed]
[27 of 34] Compiling CreateDirectory001 ( tests\CreateDirectory001.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\CreateDirectory001.o ) [System.Directory.OsPath changed]
[28 of 34] Compiling CopyFileWithMetadata ( tests\CopyFileWithMetadata.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\CopyFileWithMetadata.o ) [System.Directory.Internal changed]
[29 of 34] Compiling CopyFile002      ( tests\CopyFile002.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\CopyFile002.o ) [System.Directory.Internal changed]
[30 of 34] Compiling CopyFile001      ( tests\CopyFile001.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\CopyFile001.o ) [System.OsPath package changed]
[31 of 34] Compiling CanonicalizePath ( tests\CanonicalizePath.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\CanonicalizePath.o ) [System.OsPath package changed]
[32 of 34] Compiling WithCurrentDirectory ( tests\WithCurrentDirectory.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\WithCurrentDirectory.o ) [System.OsPath package changed]
[33 of 34] Compiling Xdg              ( tests\Xdg.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\Xdg.o ) [System.FilePath package changed]
[34 of 34] Compiling Main             ( tests\Main.hs, C:\\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\build\test\test-tmp\Main.o ) [CanonicalizePath changed]
[35 of 35] Linking C:\\Users\\dbind\\GitRepos\\directory\\dist-newstyle\\build\\x86_64-windows\\ghc-9.4.7\\directory-1.3.8.2\\build\\test\\test.exe [Objects changed]
Running 1 test suites...
Test suite test: RUNNING...
Test suite test: PASS
Test suite logged to:
C:\Users\dbind\GitRepos\directory\dist-newstyle\build\x86_64-windows\ghc-9.4.7\directory-1.3.8.2\test\directory-1.3.8.2-test.log
1 of 1 test suites (1 of 1 test cases) passed.

@hasufell
Copy link
Member

CCing @Bodigrim wrt revision

@Bodigrim
Copy link
Contributor

A revision would not help @BinderDavid, he needs a commit to bump a GHC submodule. I guess a PR could help unless @Rufflewind gets to it earlier.

@Rufflewind Rufflewind added the type: a-feature-request This is a request for a new feature. label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: a-feature-request This is a request for a new feature.
Projects
None yet
Development

No branches or pull requests

4 participants