Cabal 2.0 support
This commit is contained in:
parent
e027652494
commit
a4eee30930
@ -1,3 +1,7 @@
|
|||||||
|
## 1.5.2.4
|
||||||
|
|
||||||
|
* Cabal 2.0 support
|
||||||
|
|
||||||
## 1.5.2.3
|
## 1.5.2.3
|
||||||
|
|
||||||
* Fix race condition which leads dev server to stay in compilation mode. [#1380](https://github.com/yesodweb/yesod/issues/1380)
|
* Fix race condition which leads dev server to stay in compilation mode. [#1380](https://github.com/yesodweb/yesod/issues/1380)
|
||||||
|
|||||||
@ -255,7 +255,11 @@ getAvailableFlags :: D.GenericPackageDescription -> Set.Set String
|
|||||||
getAvailableFlags =
|
getAvailableFlags =
|
||||||
Set.fromList . map (unFlagName . D.flagName) . D.genPackageFlags
|
Set.fromList . map (unFlagName . D.flagName) . D.genPackageFlags
|
||||||
where
|
where
|
||||||
|
#if MIN_VERSION_Cabal(2, 0, 0)
|
||||||
|
unFlagName = D.unFlagName
|
||||||
|
#else
|
||||||
unFlagName (D.FlagName fn) = fn
|
unFlagName (D.FlagName fn) = fn
|
||||||
|
#endif
|
||||||
|
|
||||||
-- | This is the main entry point. Run the devel server.
|
-- | This is the main entry point. Run the devel server.
|
||||||
devel :: DevelOpts -- ^ command line options
|
devel :: DevelOpts -- ^ command line options
|
||||||
@ -276,9 +280,20 @@ devel opts passThroughArgs = do
|
|||||||
#else
|
#else
|
||||||
cabal <- D.findPackageDesc "."
|
cabal <- D.findPackageDesc "."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if MIN_VERSION_Cabal(1, 20, 0)
|
||||||
|
gpd <- D.readGenericPackageDescription D.normal cabal
|
||||||
|
#else
|
||||||
gpd <- D.readPackageDescription D.normal cabal
|
gpd <- D.readPackageDescription D.normal cabal
|
||||||
|
#endif
|
||||||
|
|
||||||
let pd = D.packageDescription gpd
|
let pd = D.packageDescription gpd
|
||||||
D.PackageIdentifier (D.PackageName packageName) _version = D.package pd
|
D.PackageIdentifier packageNameWrapped _version = D.package pd
|
||||||
|
#if MIN_VERSION_Cabal(2, 0, 0)
|
||||||
|
packageName = D.unPackageName packageNameWrapped
|
||||||
|
#else
|
||||||
|
D.PackageName packageName = packageNameWrapped
|
||||||
|
#endif
|
||||||
|
|
||||||
-- Which file contains the code to run
|
-- Which file contains the code to run
|
||||||
develHsPath <- checkDevelFile
|
develHsPath <- checkDevelFile
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
name: yesod-bin
|
name: yesod-bin
|
||||||
version: 1.5.2.3
|
version: 1.5.2.4
|
||||||
license: MIT
|
license: MIT
|
||||||
license-file: LICENSE
|
license-file: LICENSE
|
||||||
author: Michael Snoyman <michael@snoyman.com>
|
author: Michael Snoyman <michael@snoyman.com>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user