Skip to content
Snippets Groups Projects
Commit 4a714778 authored by Ben Gamari's avatar Ben Gamari :turtle:
Browse files

ci: Don't constrain to patched package versions

Previously we constrained the CI install plans to use only patched
versions of any packages for which we had patches. This was an attempt
to decouple ourselves from the evolution of Hackage a bit. Specifically,
I was worried that if we didn't constrain the install plan to the
patched versions then we would end up having spurious build failures
every time a new minor package version is released (since
cabal-install would prefer the new release over our patched
version). Admittedly this is just a hack to work around the fact
that version bounds are generally quite loose, but it seemed like a
reasonable trade-off at the time.

However, this ended up making it hard to support older major versions
of a package simultaneously with the newest version if the latter
doesn't require a patch. Let's try doing away with the constraints.
parent 5dd75ff5
No related branches found
No related tags found
No related merge requests found
...@@ -44,7 +44,7 @@ import NeatInterpolation ...@@ -44,7 +44,7 @@ import NeatInterpolation
import Options.Applicative import Options.Applicative
import Types import Types
import MakeConstraints import qualified MakeConstraints
import Utils import Utils
newtype BrokenPackages = BrokenPackages { getBrokenPackageNames :: S.Set PkgName } newtype BrokenPackages = BrokenPackages { getBrokenPackageNames :: S.Set PkgName }
...@@ -232,7 +232,6 @@ buildPackage cfg pname version = do ...@@ -232,7 +232,6 @@ buildPackage cfg pname version = do
-- prepare the test package -- prepare the test package
createDirectoryIfMissing True dirName createDirectoryIfMissing True dirName
copyFile "cabal.project" (dirName </> "cabal.project") copyFile "cabal.project" (dirName </> "cabal.project")
copyFile "cabal.project.local" (dirName </> "cabal.project.local")
appendFile (dirName </> "cabal.project") "packages: .\n" appendFile (dirName </> "cabal.project") "packages: .\n"
TIO.writeFile TIO.writeFile
(dirName </> concat ["test-", display pname, ".cabal"]) (dirName </> concat ["test-", display pname, ".cabal"])
...@@ -346,7 +345,6 @@ setup cfg = do ...@@ -346,7 +345,6 @@ setup cfg = do
] ]
removePathForcibly "cabal.project" removePathForcibly "cabal.project"
removePathForcibly "cabal.project.local"
runProcess_ runProcess_
$ setEnv env $ setEnv env
$ proc "build-repo.sh" ["build-repo"] $ proc "build-repo.sh" ["build-repo"]
...@@ -357,17 +355,11 @@ setup cfg = do ...@@ -357,17 +355,11 @@ setup cfg = do
$ setEnv env $ setEnv env
$ proc "build-repo.sh" ["build-repository-blurb"] $ proc "build-repo.sh" ["build-repository-blurb"]
projectLocalFile <- openFile "cabal.project.local" WriteMode
runProcess_
$ setStdout (useHandleClose projectLocalFile)
$ setEnv env
$ proc "build-repo.sh" ["build-constraints"]
extraFragments <- mapM readFile (configExtraCabalFragments cfg) extraFragments <- mapM readFile (configExtraCabalFragments cfg)
constraints <- makeConstraints (configPatchDir cfg) constraints <- MakeConstraints.makeConstraints (configPatchDir cfg)
appendFile "cabal.project" $ show $ vcat $ appendFile "cabal.project" $ show $ vcat $
[ constraints [ "with-compiler: " <> PP.text (configCompiler cfg)
, "with-compiler: " <> PP.text (configCompiler cfg) , MakeConstraints.allowNewer MakeConstraints.bootPkgs
] ++ map PP.text extraFragments ] ++ map PP.text extraFragments
runProcess_ $ proc "cabal" ["new-update"] runProcess_ $ proc "cabal" ["new-update"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment