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:
parent
dac7e22520
commit
803b2cfd1b
@ -7,7 +7,7 @@ package ghcup
|
|||||||
source-repository-package
|
source-repository-package
|
||||||
type: git
|
type: git
|
||||||
location: https://github.com/haskell/ghcup-hs.git
|
location: https://github.com/haskell/ghcup-hs.git
|
||||||
tag: v0.1.19.2
|
tag: a2a605ad892675d317e8415522e2cf12d5e35571
|
||||||
|
|
||||||
constraints: http-io-streams -brotli,
|
constraints: http-io-streams -brotli,
|
||||||
any.aeson >= 2.0.1.0
|
any.aeson >= 2.0.1.0
|
||||||
|
@ -157,7 +157,7 @@ generateTable output = do
|
|||||||
liftIO $ hPutStrLn handle $ "<table>"
|
liftIO $ hPutStrLn handle $ "<table>"
|
||||||
liftIO $ hPutStrLn handle $ "<thead><tr><th>" <> show tool <> " Version</th><th>Tags</th></tr></thead>"
|
liftIO $ hPutStrLn handle $ "<thead><tr><th>" <> show tool <> " Version</th><th>Tags</th></tr></thead>"
|
||||||
liftIO $ hPutStrLn handle $ "<tbody>"
|
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
|
forM_ (filter (\ListResult{..} -> not lStray) vers) $ \ListResult{..} -> do
|
||||||
liftIO $ hPutStrLn handle $
|
liftIO $ hPutStrLn handle $
|
||||||
"<tr><td>"
|
"<tr><td>"
|
||||||
|
@ -81,7 +81,7 @@ validate = do
|
|||||||
forM_ (M.toList dls) $ \(t, versions) ->
|
forM_ (M.toList dls) $ \(t, versions) ->
|
||||||
forM_ (M.toList versions) $ \(v, vi) ->
|
forM_ (M.toList versions) $ \(v, vi) ->
|
||||||
forM_ (M.toList $ _viArch vi) $ \(arch, pspecs) -> do
|
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
|
checkGHCVerIsValid
|
||||||
forM_ (M.toList dls) $ \(t, _) -> checkMandatoryTags t
|
forM_ (M.toList dls) $ \(t, _) -> checkMandatoryTags t
|
||||||
@ -154,7 +154,7 @@ validate = do
|
|||||||
|
|
||||||
checkGHCVerIsValid = do
|
checkGHCVerIsValid = do
|
||||||
GHCupInfo { _ghcupDownloads = dls } <- lift getGHCupInfo
|
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 ->
|
forM_ ghcVers $ \v ->
|
||||||
case [ x | (x,"") <- readP_to_S V.parseVersion (T.unpack . prettyVer $ v) ] of
|
case [ x | (x,"") <- readP_to_S V.parseVersion (T.unpack . prettyVer $ v) ] of
|
||||||
[_] -> pure ()
|
[_] -> pure ()
|
||||||
@ -178,7 +178,7 @@ validate = do
|
|||||||
let allTags = M.toList $ availableToolVersions dls GHC
|
let allTags = M.toList $ availableToolVersions dls GHC
|
||||||
forM allTags $ \(ver, _viTags -> tags) -> case any isBase tags of
|
forM allTags $ \(ver, _viTags -> tags) -> case any isBase tags of
|
||||||
False -> do
|
False -> do
|
||||||
lift $ logError $ "Base tag missing from GHC ver " <> prettyVer ver
|
lift $ logError $ "Base tag missing from GHC ver " <> prettyVer (_tvVersion ver)
|
||||||
addError
|
addError
|
||||||
True -> pure ()
|
True -> pure ()
|
||||||
|
|
||||||
@ -211,7 +211,7 @@ validateTarballs (TarballFilter etool versionRegex) = do
|
|||||||
|
|
||||||
-- download/verify all tarballs
|
-- download/verify all tarballs
|
||||||
let dlis = either (const []) (\tool -> nubOrd $ dls ^.. each %& indices (maybe (const True) (==) tool)
|
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)
|
% (viTestDL % _Just `summing` viSourceDL % _Just `summing` viArch % each % each % each)
|
||||||
)
|
)
|
||||||
etool
|
etool
|
||||||
|
Loading…
Reference in New Issue
Block a user