mirror of
https://github.com/haskell/haskell-ide-engine.git
synced 2024-09-11 11:05:30 +03:00
Replace lastest by latest
This commit is contained in:
parent
1876ab5ce0
commit
2c82368779
@ -28,10 +28,10 @@ See the project's `README` for detailed information about installing `hie`.
|
||||
The build script `install.hs` defines several targets using the `shake` build system. The targets are roughly:
|
||||
|
||||
* `hie-*`: builds and installs the `hie` binaries. Also renames the binaries to contain the correct version-number.
|
||||
* `build-lastest`: builds ad installs `hie` for the lastest available and supported `ghc` version.
|
||||
* `build-latest`: builds ad installs `hie` for the latest available and supported `ghc` version.
|
||||
* `build-all`: builds and installs `hie` binaries for all supported `ghc` versions. This option may take a long time and computer resources so use it with caution.
|
||||
* `build-data`: builds the hoogle-db required by `hie`
|
||||
* `build`: builds ad installs `hie` for the lastest supported `ghc` version (like `build-lastest`) and the hoogle-db (like `build-data`)
|
||||
* `build`: builds ad installs `hie` for the latest supported `ghc` version (like `build-latest`) and the hoogle-db (like `build-data`)
|
||||
* `cabal-*`: execute the same task as the original target, but with `cabal` instead of `stack`
|
||||
|
||||
Each `stack-*.yaml` contains references to packages in the submodules. Calling `stack` with one of those causes the build to fail if the submodules have not been initialized already. The file `shake.yaml` solves this issue invoking the `git` binary itself to update the submodules. Moreover, it specifies the correct version of `shake` and is used for installing all run-time dependencies such as `cabal` and `hoogle` if necessary.
|
||||
|
@ -86,11 +86,12 @@ helpMessage versions@BuildableVersions {..} = do
|
||||
-- All targets with their respective help message.
|
||||
generalTargets = [helpTarget]
|
||||
|
||||
defaultTargets = [buildTarget, buildLastestTarget, buildAllTarget, buildDataTarget]
|
||||
defaultTargets = [buildTarget, buildLatestTarget, buildAllTarget, buildDataTarget]
|
||||
++ map hieTarget (getDefaultBuildSystemVersions versions)
|
||||
|
||||
stackTargets =
|
||||
[ stackTarget buildTarget
|
||||
, stackTarget buildLatestTarget
|
||||
, stackTarget buildAllTarget
|
||||
, stackTarget buildDataTarget
|
||||
]
|
||||
@ -100,6 +101,7 @@ helpMessage versions@BuildableVersions {..} = do
|
||||
cabalTargets =
|
||||
[ cabalGhcsTarget
|
||||
, cabalTarget buildTarget
|
||||
, cabalTarget buildLatestTarget
|
||||
, cabalTarget buildAllTarget
|
||||
, cabalTarget buildDataTarget
|
||||
]
|
||||
@ -127,10 +129,10 @@ hieTarget version =
|
||||
("hie-" ++ version, "Builds hie for GHC version " ++ version)
|
||||
|
||||
buildTarget :: TargetDescription
|
||||
buildTarget = ("build", "Build hie with the lastest available GHC and the data files")
|
||||
buildTarget = ("build", "Build hie with the latest available GHC and the data files")
|
||||
|
||||
buildLastestTarget :: TargetDescription
|
||||
buildLastestTarget = ("build-lastest", "Build hie with the lastest available GHC")
|
||||
buildLatestTarget :: TargetDescription
|
||||
buildLatestTarget = ("build-latest", "Build hie with the latest available GHC")
|
||||
|
||||
buildDataTarget :: TargetDescription
|
||||
buildDataTarget =
|
||||
@ -148,8 +150,8 @@ buildAllWarning = "WARNING: This command may take a long time and computer resou
|
||||
buildAllWarningAlt :: String
|
||||
buildAllWarningAlt = "Consider build only the needed ghc versions using:\n"
|
||||
++ " " ++ buildCommand (hieTarget "<ghc-version>") ++ "\n"
|
||||
++ "or the lastest available one with:\n"
|
||||
++ " " ++ buildCommand buildLastestTarget ++ "\n"
|
||||
++ "or the latest available one with:\n"
|
||||
++ " " ++ buildCommand buildLatestTarget ++ "\n"
|
||||
|
||||
-- special targets
|
||||
|
||||
|
@ -57,7 +57,7 @@ defaultMain = do
|
||||
, cabalVersions = ghcVersions
|
||||
}
|
||||
|
||||
let lastestVersion = last hieVersions
|
||||
let latestVersion = last hieVersions
|
||||
|
||||
putStrLn $ "run from: " ++ buildSystem
|
||||
|
||||
@ -84,7 +84,7 @@ defaultMain = do
|
||||
|
||||
-- default-targets
|
||||
phony "build" $ need [buildSystem ++ "-build"]
|
||||
phony "build-lastest" $ need [buildSystem ++ "-build-lastest"]
|
||||
phony "build-latest" $ need [buildSystem ++ "-build-latest"]
|
||||
phony "build-all" $ need [buildSystem ++ "-build-all"]
|
||||
phony "build-data" $ need [buildSystem ++ "-build-data"]
|
||||
forM_
|
||||
@ -95,8 +95,8 @@ defaultMain = do
|
||||
|
||||
-- stack specific targets
|
||||
when isRunFromStack (phony "stack-install-cabal" (need ["cabal"]))
|
||||
phony "stack-build-lastest" (need ["stack-hie-" ++ last hieVersions])
|
||||
phony "stack-build" (need ["build-data", "stack-build-lastest"])
|
||||
phony "stack-build-latest" (need ["stack-hie-" ++ last hieVersions])
|
||||
phony "stack-build" (need ["build-data", "stack-build-latest"])
|
||||
phony "stack-build-all" $ do
|
||||
printInStars (buildAllWarning ++ ".\n" ++ buildAllWarningAlt)
|
||||
need (["build-data"] ++ (reverse $ map ("stack-hie-" ++) hieVersions))
|
||||
@ -115,8 +115,8 @@ defaultMain = do
|
||||
)
|
||||
|
||||
-- cabal specific targets
|
||||
phony "cabal-build-lastest" (need ["cabal-hie-" ++ last ghcVersions])
|
||||
phony "cabal-build" (need ["build-data", "cabal-build-lastest"])
|
||||
phony "cabal-build-latest" (need ["cabal-hie-" ++ last ghcVersions])
|
||||
phony "cabal-build" (need ["build-data", "cabal-build-latest"])
|
||||
phony "cabal-build-all" $ do
|
||||
printInStars (buildAllWarning ++ ".\n" ++ buildAllWarningAlt)
|
||||
need (["cabal-build-data"] ++ (map ("cabal-hie-" ++) ghcVersions))
|
||||
|
Loading…
Reference in New Issue
Block a user