Merge remote-tracking branch 'origin/pr/943'
This commit is contained in:
commit
b837a93176
@ -92,7 +92,7 @@ url-source:
|
|||||||
# sha256: b48f3d3a508d0c140d1c801e04afc65e80c0d25e7e939a8a41edb387b26b81b3
|
# sha256: b48f3d3a508d0c140d1c801e04afc65e80c0d25e7e939a8a41edb387b26b81b3
|
||||||
|
|
||||||
# This is a way to override platform detection, e.g. when you're running
|
# This is a way to override platform detection, e.g. when you're running
|
||||||
# a Ubuntu derivate based on 18.04, you could do:
|
# a Ubuntu derivative based on 18.04, you could do:
|
||||||
#
|
#
|
||||||
# platform-override:
|
# platform-override:
|
||||||
# arch: A_64
|
# arch: A_64
|
||||||
|
@ -78,7 +78,7 @@ Partial configuration is fine. Command line options always override the config f
|
|||||||
|
|
||||||
## Overriding distro detection
|
## Overriding distro detection
|
||||||
|
|
||||||
If you're running e.g. an Ubuntu derivate based on 18.04 and ghcup is picking bindists that
|
If you're running e.g. an Ubuntu derivative based on 18.04 and ghcup is picking bindists that
|
||||||
don't work well, you could do this in `config.yaml`:
|
don't work well, you could do this in `config.yaml`:
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
@ -610,7 +610,7 @@ Examples:
|
|||||||
## Continuous integration
|
## Continuous integration
|
||||||
|
|
||||||
On Windows, GHCup can be installed automatically on a CI runner
|
On Windows, GHCup can be installed automatically on a CI runner
|
||||||
non-interactively, as below. The paramaters to the PowerShell script are
|
non-interactively, as below. The parameters to the PowerShell script are
|
||||||
specified positionally, after `-ArgumentList`:
|
specified positionally, after `-ArgumentList`:
|
||||||
|
|
||||||
```ps
|
```ps
|
||||||
|
@ -157,7 +157,7 @@ Examples:
|
|||||||
ghcup compile hls --version 1.7.0.0 --ghc 8.10.7 --cabal-update
|
ghcup compile hls --version 1.7.0.0 --ghc 8.10.7 --cabal-update
|
||||||
# compile from master for ghc 9.2.3 using 'git describe' to name the binary and ignore the pinned index state
|
# compile from master for ghc 9.2.3 using 'git describe' to name the binary and ignore the pinned index state
|
||||||
ghcup compile hls -g master --git-describe-version --ghc 9.2.3 -- --index-state=@(date '+%s')
|
ghcup compile hls -g master --git-describe-version --ghc 9.2.3 -- --index-state=@(date '+%s')
|
||||||
# compile a specific commit for ghc 9.2.3 and set a specifc version for the binary name
|
# compile a specific commit for ghc 9.2.3 and set a specific version for the binary name
|
||||||
ghcup compile hls -g a32db0b -o 1.7.0.0-p1 --ghc 9.2.3|]
|
ghcup compile hls -g a32db0b -o 1.7.0.0-p1 --ghc 9.2.3|]
|
||||||
|
|
||||||
|
|
||||||
|
@ -525,7 +525,7 @@ data HTTPNotModified = HTTPNotModified Text
|
|||||||
|
|
||||||
instance Pretty HTTPNotModified where
|
instance Pretty HTTPNotModified where
|
||||||
pPrint (HTTPNotModified etag) =
|
pPrint (HTTPNotModified etag) =
|
||||||
text "Remote resource not modifed, etag was:" <+> pPrint etag
|
text "Remote resource not modified, etag was:" <+> pPrint etag
|
||||||
|
|
||||||
instance HFErrorProject HTTPNotModified where
|
instance HFErrorProject HTTPNotModified where
|
||||||
eBase _ = 240
|
eBase _ = 240
|
||||||
@ -820,7 +820,7 @@ instance Exception ParseError
|
|||||||
|
|
||||||
instance HFErrorProject ParseError where
|
instance HFErrorProject ParseError where
|
||||||
eBase _ = 500
|
eBase _ = 500
|
||||||
eDesc _ = "A parse error occured."
|
eDesc _ = "A parse error occurred."
|
||||||
|
|
||||||
|
|
||||||
data UnexpectedListLength = UnexpectedListLength String
|
data UnexpectedListLength = UnexpectedListLength String
|
||||||
|
@ -1101,8 +1101,8 @@ compileGHC targetGhc crossTarget ov bstrap jobs mbuildConfig patches aargs build
|
|||||||
let possible_files = if isWindows
|
let possible_files = if isWindows
|
||||||
then ((workdir </> "hadrian") </>) <$> ["build.bat"]
|
then ((workdir </> "hadrian") </>) <$> ["build.bat"]
|
||||||
else ((workdir </> "hadrian") </>) <$> ["build", "build.sh"]
|
else ((workdir </> "hadrian") </>) <$> ["build", "build.sh"]
|
||||||
exsists <- forM possible_files (\f -> liftIO (doesFileExist f) <&> (,f))
|
exists <- forM possible_files (\f -> liftIO (doesFileExist f) <&> (,f))
|
||||||
case filter fst exsists of
|
case filter fst exists of
|
||||||
[] -> throwE HadrianNotFound
|
[] -> throwE HadrianNotFound
|
||||||
((_, x):_) -> pure x
|
((_, x):_) -> pure x
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
|
|
||||||
{-|
|
{-|
|
||||||
Module : GHCup.Plaform
|
Module : GHCup.Platform
|
||||||
Description : Retrieving platform information
|
Description : Retrieving platform information
|
||||||
Copyright : (c) Julian Ospald, 2020
|
Copyright : (c) Julian Ospald, 2020
|
||||||
License : LGPL-3.0
|
License : LGPL-3.0
|
||||||
|
@ -240,7 +240,7 @@ recreateSymlink symsource newsym fail' = do
|
|||||||
createSymbolicLink sympoint newsym
|
createSymbolicLink sympoint newsym
|
||||||
|
|
||||||
|
|
||||||
-- copys files, recreates symlinks, fails on all other types
|
-- copies files, recreates symlinks, fails on all other types
|
||||||
install :: FilePath -> FilePath -> Bool -> IO ()
|
install :: FilePath -> FilePath -> Bool -> IO ()
|
||||||
install from to fail' = do
|
install from to fail' = do
|
||||||
fs <- PF.getSymbolicLinkStatus from
|
fs <- PF.getSymbolicLinkStatus from
|
||||||
|
@ -148,7 +148,7 @@ execLogged exe args chdir lfile env = do
|
|||||||
void $ SPIB.fdWrite fileFd (bs' <> "\n")
|
void $ SPIB.fdWrite fileFd (bs' <> "\n")
|
||||||
void $ SPIB.fdWrite stdOutput (bs' <> "\n")
|
void $ SPIB.fdWrite stdOutput (bs' <> "\n")
|
||||||
|
|
||||||
-- Reads fdIn and logs the output in a continous scrolling area
|
-- Reads fdIn and logs the output in a continuous scrolling area
|
||||||
-- of 'size' terminal lines. Also writes to a log file.
|
-- of 'size' terminal lines. Also writes to a log file.
|
||||||
printToRegion :: Fd -> Fd -> Int -> MVar Bool -> Bool -> IO ()
|
printToRegion :: Fd -> Fd -> Int -> MVar Bool -> Bool -> IO ()
|
||||||
printToRegion fileFd fdIn size pState no_color = do
|
printToRegion fileFd fdIn size pState no_color = do
|
||||||
|
@ -277,7 +277,7 @@ rmPlainHLS = do
|
|||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
|
|
||||||
-- | Whether the given GHC versin is installed.
|
-- | Whether the given GHC version is installed.
|
||||||
ghcInstalled :: (MonadIO m, MonadReader env m, HasDirs env, MonadThrow m) => GHCTargetVersion -> m Bool
|
ghcInstalled :: (MonadIO m, MonadReader env m, HasDirs env, MonadThrow m) => GHCTargetVersion -> m Bool
|
||||||
ghcInstalled ver = do
|
ghcInstalled ver = do
|
||||||
ghcdir <- ghcupGHCDir ver
|
ghcdir <- ghcupGHCDir ver
|
||||||
|
@ -31,7 +31,7 @@ import Data.Void (Void)
|
|||||||
|
|
||||||
-- | This reflects the API version of the YAML.
|
-- | This reflects the API version of the YAML.
|
||||||
--
|
--
|
||||||
-- Note that when updating this, CI requires that the file exsists AND the same file exists at
|
-- Note that when updating this, CI requires that the file exists AND the same file exists at
|
||||||
-- 'https://www.haskell.org/ghcup/exp/ghcup-<ver>.yaml' with some newlines added.
|
-- 'https://www.haskell.org/ghcup/exp/ghcup-<ver>.yaml' with some newlines added.
|
||||||
ghcupURL :: URI
|
ghcupURL :: URI
|
||||||
ghcupURL = [uri|https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-0.0.8.yaml|]
|
ghcupURL = [uri|https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-0.0.8.yaml|]
|
||||||
|
@ -205,7 +205,7 @@ int main()
|
|||||||
// CreateProcess, and therefore we fallback to ShellExecuteEx,
|
// CreateProcess, and therefore we fallback to ShellExecuteEx,
|
||||||
// which CAN create elevated processes, at the cost of opening a new separate
|
// which CAN create elevated processes, at the cost of opening a new separate
|
||||||
// window.
|
// window.
|
||||||
// Theorically, this could be fixed (or rather, worked around) using pipes
|
// Theoretically, this could be fixed (or rather, worked around) using pipes
|
||||||
// and IPC, but... this is a question for another day.
|
// and IPC, but... this is a question for another day.
|
||||||
SHELLEXECUTEINFOW sei = {0};
|
SHELLEXECUTEINFOW sei = {0};
|
||||||
|
|
||||||
|
@ -681,7 +681,7 @@ ask_hls() {
|
|||||||
*)
|
*)
|
||||||
echo "Possible choices are:"
|
echo "Possible choices are:"
|
||||||
echo
|
echo
|
||||||
echo "Y - Yes, install the haskell-langauge-server"
|
echo "Y - Yes, install the haskell-language-server"
|
||||||
echo "N - No, don't install anything more (default)"
|
echo "N - No, don't install anything more (default)"
|
||||||
echo
|
echo
|
||||||
echo "Please make your choice and press ENTER."
|
echo "Please make your choice and press ENTER."
|
||||||
|
Loading…
Reference in New Issue
Block a user