This repository has been archived by the owner on Aug 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Fix warnings #547
Merged
Merged
Fix warnings #547
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{-# OPTIONS_GHC -Wno-deprecations #-} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See #548. |
||
----------------------------------------------------------------------------- | ||
-- | | ||
-- Module : Hadrian.Haskell.Cabal.Parse | ||
|
@@ -16,29 +17,28 @@ module Hadrian.Haskell.Cabal.Parse | |
|
||
import Data.List.Extra | ||
import Development.Shake | ||
import qualified Distribution.ModuleName as ModuleName | ||
import qualified Distribution.Package as C | ||
import qualified Distribution.PackageDescription as C | ||
import qualified Distribution.ModuleName as ModuleName | ||
import qualified Distribution.Package as C | ||
import qualified Distribution.PackageDescription as C | ||
import qualified Distribution.PackageDescription.Configuration as C | ||
import qualified Distribution.PackageDescription.Parsec as C | ||
import qualified Distribution.Simple.Compiler as C (packageKeySupported, languageToFlags, extensionsToFlags, compilerInfo) | ||
import qualified Distribution.Simple.GHC as GHC | ||
import qualified Distribution.Simple.Program.Db as Db | ||
import qualified Distribution.Simple as Hooks (simpleUserHooks, autoconfUserHooks, defaultMainWithHooksNoReadArgs, compilerFlavor, CompilerFlavor(GHC)) | ||
import qualified Distribution.Simple.UserHooks as Hooks | ||
import qualified Distribution.Simple.Program.Builtin as C | ||
import qualified Distribution.Simple.Utils as C (findHookedPackageDesc) | ||
import qualified Distribution.Simple.Program.Types as C (programDefaultArgs, programOverrideArgs) | ||
import qualified Distribution.Simple.Configure as C (getPersistBuildConfig) | ||
import qualified Distribution.Simple.Build as C (initialBuildSteps) | ||
import qualified Distribution.Types.ComponentRequestedSpec as C (defaultComponentRequestedSpec) | ||
import qualified Distribution.InstalledPackageInfo as Installed | ||
import qualified Distribution.Simple.PackageIndex as PackageIndex | ||
import qualified Distribution.Types.LocalBuildInfo as C | ||
import qualified Distribution.Text as C | ||
import qualified Distribution.Types.CondTree as C | ||
import qualified Distribution.Types.MungedPackageId as C (mungedName) | ||
import qualified Distribution.Verbosity as C | ||
import qualified Distribution.PackageDescription.Parsec as C | ||
import qualified Distribution.Simple.Compiler as C (packageKeySupported, languageToFlags, extensionsToFlags, compilerInfo) | ||
import qualified Distribution.Simple.GHC as GHC | ||
import qualified Distribution.Simple.Program.Db as Db | ||
import qualified Distribution.Simple as Hooks (simpleUserHooks, autoconfUserHooks, defaultMainWithHooksNoReadArgs, compilerFlavor, CompilerFlavor(GHC)) | ||
import qualified Distribution.Simple.UserHooks as Hooks | ||
import qualified Distribution.Simple.Program.Builtin as C | ||
import qualified Distribution.Simple.Utils as C (findHookedPackageDesc) | ||
import qualified Distribution.Simple.Program.Types as C (programDefaultArgs, programOverrideArgs) | ||
import qualified Distribution.Simple.Configure as C (getPersistBuildConfig) | ||
import qualified Distribution.Simple.Build as C (initialBuildSteps) | ||
import qualified Distribution.Types.ComponentRequestedSpec as C (defaultComponentRequestedSpec) | ||
import qualified Distribution.InstalledPackageInfo as Installed | ||
import qualified Distribution.Simple.PackageIndex as PackageIndex | ||
import qualified Distribution.Types.LocalBuildInfo as C | ||
import qualified Distribution.Text as C | ||
import qualified Distribution.Types.MungedPackageId as C (mungedName) | ||
import qualified Distribution.Verbosity as C | ||
|
||
import Base | ||
import Builder hiding (Builder) | ||
|
@@ -102,7 +102,7 @@ parseCabal context@Context {..} = do | |
addFlag ('+':name) = C.insertFlagAssignment (C.mkFlagName name) True | ||
addFlag name = C.insertFlagAssignment (C.mkFlagName name) True | ||
|
||
let (Right (pd,_)) = C.finalizePackageDescription flags (const True) platform (C.compilerInfo compiler) [] gpd | ||
let (Right (pd,_)) = C.finalizePD flags C.defaultComponentRequestedSpec (const True) platform (C.compilerInfo compiler) [] gpd | ||
-- depPkgs are all those packages that are needed. These should be found in | ||
-- the known build packages. Even if they are not build in this stage. | ||
let depPkgs = map (findPackageByName' . C.unPackageName . C.depPkgName) | ||
|
@@ -200,7 +200,7 @@ parsePackageData context@Context {..} = do | |
-- We should use the gpd, and | ||
-- the flagAssignment and compiler, hostPlatform, ... information | ||
-- from the lbi. And then compute the finaliz PD (flags, satisfiable dependencies, platform, compiler info, deps, gpd.) | ||
-- | ||
-- | ||
-- let (Right (pd,_)) = C.finalizePackageDescription flags (const True) platform (compilerInfo compiler) [] gpd | ||
-- | ||
-- However when using the new-build path's this might change. | ||
|
@@ -221,6 +221,8 @@ parsePackageData context@Context {..} = do | |
lbi' = lbi { C.localPkgDescr = pd' } | ||
liftIO $ C.initialBuildSteps cPath pd' lbi' C.silent | ||
|
||
-- TODO: Get rid of deprecated 'externalPackageDeps' and drop -Wno-deprecations | ||
-- See: https://github.com/snowleopard/hadrian/issues/548 | ||
let extDeps = C.externalPackageDeps lbi' | ||
deps = map (C.display . snd) extDeps | ||
dep_direct = map (fromMaybe (error "dep_keys failed") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #549.