[Git][ghc/ghc][master] 4 commits: Add os-string as a boot package

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Thu Feb 8 05:38:19 UTC 2024



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
9060d55b by Ben Gamari at 2024-02-08T00:37:13-05:00
Add os-string as a boot package

Introduces `os-string` submodule. This will be necessary for
`filepath-1.5`.

- - - - -
9d65235a by Ben Gamari at 2024-02-08T00:37:13-05:00
gitignore: Ignore .hadrian_ghci_multi/

- - - - -
d7ee12ea by Ben Gamari at 2024-02-08T00:37:13-05:00
hadrian: Set -this-package-name

When constructing the GHC flags for a package Hadrian must take care to
set `-this-package-name` in addition to `-this-unit-id`. This hasn't
broken until now as we have not had any uses of qualified package
imports. However, this will change with `filepath-1.5` and the
corresponding `unix` bump, breaking `hadrian/multi-ghci`.

- - - - -
f2dffd2e by Ben Gamari at 2024-02-08T00:37:13-05:00
Bump filepath to 1.5.0.0

Required bumps of the following submodules:

 * `directory`
 * `filepath`
 * `haskeline`
 * `process`
 * `unix`
 * `hsc2hs`
 * `Win32`
 * `semaphore-compat`

and the addition of `os-string` as a boot package.

- - - - -


20 changed files:

- .gitignore
- .gitmodules
- compiler/ghc.cabal.in
- ghc/ghc-bin.cabal.in
- hadrian/src/Hadrian/Haskell/Cabal.hs
- hadrian/src/Packages.hs
- hadrian/src/Rules/ToolArgs.hs
- hadrian/src/Settings/Builders/Ghc.hs
- hadrian/src/Settings/Default.hs
- hadrian/src/Settings/Packages.hs
- libraries/Cabal
- libraries/Win32
- libraries/directory
- libraries/filepath
- libraries/ghc-boot/ghc-boot.cabal.in
- libraries/ghci/ghci.cabal.in
- + libraries/os-string
- libraries/process
- libraries/semaphore-compat
- libraries/unix


Changes:

=====================================
.gitignore
=====================================
@@ -60,6 +60,7 @@ _*
 */ghc-stage1
 .shake.*
 .hadrian_ghci
+.hadrian_ghci_multi/
 .hie-bios
 
 # -----------------------------------------------------------------------------


=====================================
.gitmodules
=====================================
@@ -117,3 +117,6 @@
 [submodule "utils/hpc"]
 	path = utils/hpc
 	url = https://gitlab.haskell.org/hpc/hpc-bin.git
+[submodule "libraries/os-string"]
+	path = libraries/os-string
+	url = https://gitlab.haskell.org/ghc/packages/os-string


=====================================
compiler/ghc.cabal.in
=====================================
@@ -116,7 +116,7 @@ Library
                    time       >= 1.4 && < 1.13,
                    containers >= 0.6.2.1 && < 0.8,
                    array      >= 0.1 && < 0.6,
-                   filepath   >= 1   && < 1.5,
+                   filepath   >= 1   && < 1.6,
                    template-haskell == 2.21.*,
                    hpc        >= 0.6 && < 0.8,
                    transformers >= 0.5 && < 0.7,
@@ -128,7 +128,7 @@ Library
                    ghci == @ProjectVersionMunged@
 
     if os(windows)
-        Build-Depends: Win32  >= 2.3 && < 2.14
+        Build-Depends: Win32  >= 2.3 && < 2.15
     else
         Build-Depends: unix   >= 2.7 && < 2.9
 


=====================================
ghc/ghc-bin.cabal.in
=====================================
@@ -36,14 +36,14 @@ Executable ghc
                    bytestring >= 0.9 && < 0.13,
                    directory  >= 1   && < 1.4,
                    process    >= 1   && < 1.7,
-                   filepath   >= 1   && < 1.5,
+                   filepath   >= 1   && < 1.6,
                    containers >= 0.5 && < 0.8,
                    transformers >= 0.5 && < 0.7,
                    ghc-boot      == @ProjectVersionMunged@,
                    ghc           == @ProjectVersionMunged@
 
     if os(windows)
-        Build-Depends: Win32  >= 2.3 && < 2.14
+        Build-Depends: Win32  >= 2.3 && < 2.15
     else
         Build-Depends: unix   >= 2.7 && < 2.9
 


=====================================
hadrian/src/Hadrian/Haskell/Cabal.hs
=====================================
@@ -10,18 +10,25 @@
 -- Cabal files.
 -----------------------------------------------------------------------------
 module Hadrian.Haskell.Cabal (
-    pkgVersion, pkgUnitId, pkgSynopsis, pkgDescription, pkgSimpleIdentifier,
+    pkgPackageName, pkgVersion, pkgUnitId,
+    pkgSynopsis, pkgDescription, pkgSimpleIdentifier,
     pkgDependencies, pkgGenericDescription, cabalArchString, cabalOsString
     ) where
 
 import Development.Shake
-import Distribution.PackageDescription (GenericPackageDescription)
+import Distribution.PackageDescription (GenericPackageDescription, unPackageName, PackageDescription (package))
+import qualified Distribution.Types.PackageId as Cabal
+import qualified Distribution.Types.GenericPackageDescription as Cabal
 
 import Hadrian.Haskell.Cabal.Type
 import Hadrian.Oracles.Cabal
 import Hadrian.Package
 import {-# SOURCE #-} Hadrian.Haskell.Hash (pkgUnitId)
 
+-- | The name of the package as written in the package's cabal file.
+pkgPackageName :: Package -> Action String
+pkgPackageName =
+    fmap (unPackageName . Cabal.pkgName . package . Cabal.packageDescription) . pkgGenericDescription
 
 -- | Read a Cabal file and return the package version. The Cabal file is tracked.
 pkgVersion :: Package -> Action String
@@ -52,7 +59,8 @@ pkgDescription = fmap description . readPackageData
 -- returns a crude overapproximation of actual dependencies. The Cabal file is
 -- tracked.
 pkgDependencies :: Package -> Action [PackageName]
-pkgDependencies = fmap (map pkgName . packageDependencies) . readPackageData
+pkgDependencies =
+    fmap (map Hadrian.Package.pkgName . packageDependencies) . readPackageData
 
 -- | Read a Cabal file and return the 'GenericPackageDescription'. The Cabal
 -- file is tracked.


=====================================
hadrian/src/Packages.hs
=====================================
@@ -8,7 +8,7 @@ module Packages (
     ghcCompact, ghcConfig, ghcExperimental, ghcHeap, ghcInternal, ghci, ghciWrapper, ghcPkg, ghcPrim,
     ghcToolchain, ghcToolchainBin, haddock, haskeline,
     hsc2hs, hp2ps, hpc, hpcBin, integerGmp, integerSimple, iserv, iservProxy,
-    libffi, mtl, parsec, pretty, primitive, process, remoteIserv, rts,
+    libffi, mtl, osString, parsec, pretty, primitive, process, remoteIserv, rts,
     runGhc, semaphoreCompat, stm, templateHaskell, terminfo, text, time, timeout, touchy,
     transformers, unlit, unix, win32, xhtml,
     lintersCommon, lintNotes, lintCodes, lintCommitMsg, lintSubmoduleRefs, lintWhitespace,
@@ -40,7 +40,7 @@ ghcPackages =
     , exceptions, filepath, genapply, genprimopcode, ghc, ghcBignum, ghcBoot, ghcBootTh, ghcPlatform
     , ghcCompact, ghcConfig, ghcExperimental, ghcHeap, ghcInternal, ghci, ghciWrapper, ghcPkg, ghcPrim
     , ghcToolchain, ghcToolchainBin, haddock, haskeline, hsc2hs
-    , hp2ps, hpc, hpcBin, integerGmp, integerSimple, iserv, libffi, mtl
+    , hp2ps, hpc, hpcBin, integerGmp, integerSimple, iserv, libffi, mtl, osString
     , parsec, pretty, process, rts, runGhc, stm, semaphoreCompat, templateHaskell
     , terminfo, text, time, touchy, transformers, unlit, unix, win32, xhtml
     , timeout
@@ -58,7 +58,7 @@ array, base, binary, bytestring, cabalSyntax, cabal, checkPpr, checkExact, count
   ghcCompact, ghcConfig, ghcExperimental, ghcHeap, ghci, ghcInternal, ghciWrapper, ghcPkg, ghcPrim,
   ghcToolchain, ghcToolchainBin, haddock, haskeline, hsc2hs,
   hp2ps, hpc, hpcBin, integerGmp, integerSimple, iserv, iservProxy, remoteIserv, libffi, mtl,
-  parsec, pretty, primitive, process, rts, runGhc, semaphoreCompat, stm, templateHaskell,
+  osString, parsec, pretty, primitive, process, rts, runGhc, semaphoreCompat, stm, templateHaskell,
   terminfo, text, time, touchy, transformers, unlit, unix, win32, xhtml,
   timeout,
   lintersCommon, lintNotes, lintCodes, lintCommitMsg, lintSubmoduleRefs, lintWhitespace
@@ -112,6 +112,7 @@ iserv               = util "iserv"
 iservProxy          = util "iserv-proxy"
 libffi              = top  "libffi"
 mtl                 = lib  "mtl"
+osString            = lib  "os-string"
 parsec              = lib  "parsec"
 pretty              = lib  "pretty"
 primitive           = lib  "primitive"


=====================================
hadrian/src/Rules/ToolArgs.hs
=====================================
@@ -154,6 +154,7 @@ toolTargets = [ binary
               , process
               , exceptions
               , filepath
+              , osString
               -- , ghc     -- # depends on ghc library
               -- , runGhc  -- # depends on ghc library
               , ghcBoot


=====================================
hadrian/src/Settings/Builders/Ghc.hs
=====================================
@@ -254,13 +254,17 @@ packageGhcArgs = do
     -- sets `-this-unit-id ghc` when hadrian is building stage0, which will
     -- overwrite this one.
     pkgId   <- expr $ pkgUnitId stage package
+    pkgName <- expr $ pkgPackageName package
     mconcat [ arg "-hide-all-packages"
             , arg "-no-user-package-db"
             , arg "-package-env -"
             , packageDatabaseArgs
             -- We want to pass -this-unit-id for executables as well for multi-repl to
             -- work with executable packages but this is buggy on GHC-9.0.2
-            , (isLibrary package || (ghc_ver >= makeVersion [9,2,1])) ?  arg ("-this-unit-id " ++ pkgId)
+            , (isLibrary package || (ghc_ver >= makeVersion [9,2,1])) ? mconcat
+                [ arg ("-this-unit-id " ++ pkgId)
+                , arg ("-this-package-name " ++ pkgName)
+                ]
             , map ("-package-id " ++) <$> getContextData depIds ]
 
 includeGhcArgs :: Args


=====================================
hadrian/src/Settings/Default.hs
=====================================
@@ -104,6 +104,7 @@ stage0Packages = do
              , hpc
              , hpcBin
              , mtl
+             , osString
              , parsec
              , semaphoreCompat
              , time


=====================================
hadrian/src/Settings/Packages.hs
=====================================
@@ -157,6 +157,10 @@ packageArgs = do
 
           ]
 
+        , package unix ? builder (Cabal Flags) ? arg "+os-string"
+        , package directory ? builder (Cabal Flags) ? arg "+os-string"
+        , package win32 ? builder (Cabal Flags) ? arg "+os-string"
+
         --------------------------------- iserv --------------------------------
         -- Add -Wl,--export-dynamic enables GHCi to load dynamic objects that
         -- refer to the RTS.  This is harmless if you don't use it (adds a bit


=====================================
libraries/Cabal
=====================================
@@ -1 +1 @@
-Subproject commit ae3c40a20bf98870488e3b40fc4495009b026e33
+Subproject commit ec71ed5b44d7a35e3b421c0d3f1f9f52cc434992


=====================================
libraries/Win32
=====================================
@@ -1 +1 @@
-Subproject commit efab7f1146da9741dc54fb35476d4aaabeff8d6d
+Subproject commit 350ebd43f9a8d9e1ca767b0000f95bdfb42a5471


=====================================
libraries/directory
=====================================
@@ -1 +1 @@
-Subproject commit a0c9361817db13917df7777f669a97c4d787f44e
+Subproject commit fc38cbfc5c7c4b631ed89d6b41bbe00ee96c8b21


=====================================
libraries/filepath
=====================================
@@ -1 +1 @@
-Subproject commit cdb5171f7774569b1a8028a78392cfa79f732b5c
+Subproject commit b55465e3d174ccd63914e7146079435503204187


=====================================
libraries/ghc-boot/ghc-boot.cabal.in
=====================================
@@ -78,7 +78,7 @@ Library
                    bytestring >= 0.10 && < 0.13,
                    containers >= 0.5 && < 0.8,
                    directory  >= 1.2 && < 1.4,
-                   filepath   >= 1.3 && < 1.5,
+                   filepath   >= 1.3 && < 1.6,
                    deepseq    >= 1.4 && < 1.6,
                    ghc-platform >= 0.1,
                    ghc-boot-th == @ProjectVersionMunged@


=====================================
libraries/ghci/ghci.cabal.in
=====================================
@@ -81,7 +81,7 @@ library
         bytestring       >= 0.10 && < 0.13,
         containers       >= 0.5 && < 0.8,
         deepseq          >= 1.4 && < 1.6,
-        filepath         == 1.4.*,
+        filepath         >= 1.4 && < 1.6,
         ghc-boot         == @ProjectVersionMunged@,
         ghc-heap         == @ProjectVersionMunged@,
         template-haskell == 2.21.*,


=====================================
libraries/os-string
=====================================
@@ -0,0 +1 @@
+Subproject commit fb2711ba1f43fd609de0e231e161025ee8ed3216


=====================================
libraries/process
=====================================
@@ -1 +1 @@
-Subproject commit 5ba847afd894b560b7a7c2569c99bb9f4c8cb282
+Subproject commit dfdae0a7036b42d352a515214e6116424dd08ec9


=====================================
libraries/semaphore-compat
=====================================
@@ -1 +1 @@
-Subproject commit c8fc7b1757b4eecbd10239038fbc6602340105b1
+Subproject commit 8cd32a85388c7b51786a7aedd15404e2e4896f1b


=====================================
libraries/unix
=====================================
@@ -1 +1 @@
-Subproject commit 0b3dbc9901fdf2d752c4ee7a7cee7b1ed20e76bd
+Subproject commit 00bf6dd7a4a78f1d9d4fead303dc727e1055ffbd



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e8fb2451ae07d3797afd4cdefa545afc7c5523b6...f2dffd2e70eafa04d4e3613a495c9530890f4c31

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e8fb2451ae07d3797afd4cdefa545afc7c5523b6...f2dffd2e70eafa04d4e3613a495c9530890f4c31
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240208/91e623c5/attachment-0001.html>


More information about the ghc-commits mailing list