diff options
author | Tamar Christina <tamar@zhox.com> | 2018-03-29 14:22:09 +0100 |
---|---|---|
committer | Tamar Christina <tamar@zhox.com> | 2018-03-31 10:11:53 +0100 |
commit | 4de585a5c1ac3edc2914cebcac1753b514051a89 (patch) | |
tree | 09bfb4251808007bb4ad79c6f10f3e4fbe3e9312 /docs | |
parent | afb686a88901d7d0c93627806d7e4d0444aa17e8 (diff) | |
download | haskell-4de585a5c1ac3edc2914cebcac1753b514051a89.tar.gz |
Remove MAX_PATH restrictions from RTS, I/O manager and various utilities
Summary:
This shims out fopen and sopen so that they use modern APIs under the hood
along with namespaced paths.
This lifts the MAX_PATH restrictions from Haskell programs and makes the new
limit ~32k.
There are only some slight caveats that have been documented.
Some utilities have not been upgraded such as lndir, since all these things are
different cabal packages I have been forced to copy the source in different places
which is less than ideal. But it's the only way to keep sdist working.
Test Plan: ./validate
Reviewers: hvr, bgamari, erikd, simonmar
Reviewed By: bgamari
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #10822
Differential Revision: https://phabricator.haskell.org/D4416
Diffstat (limited to 'docs')
-rw-r--r-- | docs/users_guide/8.6.1-notes.rst | 48 |
1 files changed, 46 insertions, 2 deletions
diff --git a/docs/users_guide/8.6.1-notes.rst b/docs/users_guide/8.6.1-notes.rst index 548702159c..6300a3f3e4 100644 --- a/docs/users_guide/8.6.1-notes.rst +++ b/docs/users_guide/8.6.1-notes.rst @@ -82,8 +82,10 @@ Runtime system else. This fixes ``iuuc`` on Windows given the proper search directories (e.g ``-L/mingw64/lib``). - - The GHC runtime linker now uses ``LIBRARY_PATH`` and the runtime loader now also - searches ``LD_LIBRARY_PATH``. +- The GHC runtime linker now uses ``LIBRARY_PATH`` and the runtime loader now also + searches ``LD_LIBRARY_PATH``. + +- The GHC runtime on Windows is no longer constrained by MAX_PATH. Template Haskell ~~~~~~~~~~~~~~~~ @@ -107,6 +109,48 @@ Template Haskell Build system ~~~~~~~~~~~~ +Windows Paths +~~~~~~~~~~~~~ + +Windows paths are not all the same. The different kinds of paths each have +different meanings. The MAX_PATH limitation is not a limitation of the Operating +System nor the File System. It is a limitation of the default namespace enforced +by the Win32 API for backwards compatibility. + +The NT Kernel however allows you ways to opt out of this path preprocessing by +the Win32 APIs. This is done by explicitly using the desired namespace in the +PATH. + +The namespaces are: + + - file namespace: \\?\ + - device namespace: \\.\ + - nt namespace: \ + +Each of these turn off Path processing completely by the Win32 API and the paths +are passed untouched to the filesystem. + +Paths with a drive letter are `legacy` paths. The drive letters are actually +meaningless to the kernel. Just like Unix operating systems, drive letters are +just a mount point. You can view your mount points by using the `mountvol` +command. + +The Haskell I/O manager will now automatically promote paths in the legacy +format to Win32 file namespace. By default the I/O manager will do two things to +your paths: + + - replace / with \\ + - expand relative paths to absolute paths + +If you want to opt out of all preprocessing just expliticly use namespaces in +your paths. Due to this change, if you need to open raw devices (e.g. COM ports) +you need to use the device namespace explicitly. (e.g. `\\.\COM1`). GHC and +Haskell programs in general no longer support opening devices in the `legacy` +format. + +See https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247.aspx for +more details. + Included libraries ------------------ |