fix: Upgrade to newest ghcup-hs master

* Upgrades ghcup-metadata to use newest master branch commit.
  - updates cabal.project

* fixes breaking changes when upgrading to new ghcup-hs
  - `listVersions` function changed type-signature, fixed useages
  - needed some GHCTargetVersion -> Version type conversions
This commit is contained in:
Arjun Kathuria 2023-07-30 12:30:49 +05:30
parent dac7e22520
commit 803b2cfd1b
3 changed files with 6 additions and 6 deletions

View File

@ -7,7 +7,7 @@ package ghcup
source-repository-package
type: git
location: https://github.com/haskell/ghcup-hs.git
tag: v0.1.19.2
tag: a2a605ad892675d317e8415522e2cf12d5e35571
constraints: http-io-streams -brotli,
any.aeson >= 2.0.1.0

View File

@ -157,7 +157,7 @@ generateTable output = do
liftIO $ hPutStrLn handle $ "<table>"
liftIO $ hPutStrLn handle $ "<thead><tr><th>" <> show tool <> " Version</th><th>Tags</th></tr></thead>"
liftIO $ hPutStrLn handle $ "<tbody>"
vers <- reverse <$> listVersions (Just tool) Nothing
vers <- reverse <$> listVersions (Just tool) [] False False (Nothing, Nothing)
forM_ (filter (\ListResult{..} -> not lStray) vers) $ \ListResult{..} -> do
liftIO $ hPutStrLn handle $
"<tr><td>"

View File

@ -81,7 +81,7 @@ validate = do
forM_ (M.toList dls) $ \(t, versions) ->
forM_ (M.toList versions) $ \(v, vi) ->
forM_ (M.toList $ _viArch vi) $ \(arch, pspecs) -> do
checkHasRequiredPlatforms t v (_viTags vi) arch (M.keys pspecs)
checkHasRequiredPlatforms t (_tvVersion v) (_viTags vi) arch (M.keys pspecs)
checkGHCVerIsValid
forM_ (M.toList dls) $ \(t, _) -> checkMandatoryTags t
@ -154,7 +154,7 @@ validate = do
checkGHCVerIsValid = do
GHCupInfo { _ghcupDownloads = dls } <- lift getGHCupInfo
let ghcVers = toListOf (ix GHC % to M.keys % folded) dls
let ghcVers = toListOf (ix GHC % to M.keys % to (map _tvVersion) % folded) dls
forM_ ghcVers $ \v ->
case [ x | (x,"") <- readP_to_S V.parseVersion (T.unpack . prettyVer $ v) ] of
[_] -> pure ()
@ -178,7 +178,7 @@ validate = do
let allTags = M.toList $ availableToolVersions dls GHC
forM allTags $ \(ver, _viTags -> tags) -> case any isBase tags of
False -> do
lift $ logError $ "Base tag missing from GHC ver " <> prettyVer ver
lift $ logError $ "Base tag missing from GHC ver " <> prettyVer (_tvVersion ver)
addError
True -> pure ()
@ -211,7 +211,7 @@ validateTarballs (TarballFilter etool versionRegex) = do
-- download/verify all tarballs
let dlis = either (const []) (\tool -> nubOrd $ dls ^.. each %& indices (maybe (const True) (==) tool)
%> each %& indices (matchTest versionRegex . T.unpack . prettyVer)
%> each %& indices (matchTest versionRegex . T.unpack . prettyVer . _tvVersion)
% (viTestDL % _Just `summing` viSourceDL % _Just `summing` viArch % each % each % each)
)
etool