Skip to content

Commit

Permalink
Merge pull request #2477 from 0xmohit/remove_os_flag
Browse files Browse the repository at this point in the history
Remove the `--os` flag.
  • Loading branch information
mgsloan committed Aug 12, 2016
2 parents e05e5d8 + 4205e44 commit 0bc1927
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 16 deletions.
2 changes: 2 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ Bug fixes:
[#2361](https://github.com/commercialhaskell/stack/issues/2361)
* Fixes src directory pollution of `style.css` and `highlight.js` with GHC 8's
haddock [#2429](https://github.com/commercialhaskell/stack/issues/2429)
* Remove the `--os` flag
[#2227](https://github.com/commercialhaskell/stack/issues/2227)

## 1.1.2

Expand Down
3 changes: 1 addition & 2 deletions src/Stack/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,7 @@ configFromConfigMonoid configStackRoot configUserConfigPath mresolver mproject C
(Platform defArch defOS) = buildPlatform
arch = fromMaybe defArch
$ (getFirst configMonoidArch) >>= Distribution.Text.simpleParse
os = fromMaybe defOS
$ (getFirst configMonoidOS) >>= Distribution.Text.simpleParse
os = defOS
configPlatform = Platform arch os

configRequireStackVersion = simplifyVersionRange (getIntersectingVersionRange configMonoidRequireStackVersion)
Expand Down
9 changes: 1 addition & 8 deletions src/Stack/Options.hs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ cleanOptsParser = CleanShallow <$> packages <|> doFullClean
-- | Command-line arguments parser for configuration.
configOptsParser :: GlobalOptsContext -> Parser ConfigMonoid
configOptsParser hide0 =
(\stackRoot workDir buildOpts dockerOpts nixOpts systemGHC installGHC arch os ghcVariant jobs includes libs overrideGccPath skipGHCCheck skipMsys localBin modifyCodePage allowDifferentUser -> mempty
(\stackRoot workDir buildOpts dockerOpts nixOpts systemGHC installGHC arch ghcVariant jobs includes libs overrideGccPath skipGHCCheck skipMsys localBin modifyCodePage allowDifferentUser -> mempty
{ configMonoidStackRoot = stackRoot
, configMonoidWorkDir = workDir
, configMonoidBuildOpts = buildOpts
Expand All @@ -218,7 +218,6 @@ configOptsParser hide0 =
, configMonoidInstallGHC = installGHC
, configMonoidSkipGHCCheck = skipGHCCheck
, configMonoidArch = arch
, configMonoidOS = os
, configMonoidGHCVariant = ghcVariant
, configMonoidJobs = jobs
, configMonoidExtraIncludeDirs = includes
Expand Down Expand Up @@ -259,12 +258,6 @@ configOptsParser hide0 =
<> help "System architecture, e.g. i386, x86_64"
<> hide
))
<*> optionalFirst (strOption
( long "os"
<> metavar "OS"
<> help "Operating system, e.g. linux, windows"
<> hide
))
<*> optionalFirst (ghcVariantParser (hide0 /= OuterGlobalOpts))
<*> optionalFirst (option auto
( long "jobs"
Expand Down
6 changes: 0 additions & 6 deletions src/Stack/Types/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -786,8 +786,6 @@ data ConfigMonoid =
-- ^ See: 'configCompilerCheck'
,configMonoidRequireStackVersion :: !IntersectingVersionRange
-- ^ See: 'configRequireStackVersion'
,configMonoidOS :: !(First String)
-- ^ Used for overriding the platform
,configMonoidArch :: !(First String)
-- ^ Used for overriding the platform
,configMonoidGHCVariant :: !(First GHCVariant)
Expand Down Expand Up @@ -867,7 +865,6 @@ parseConfigMonoidJSON obj = do
configMonoidRequireStackVersion <- IntersectingVersionRange <$> unVersionRangeJSON <$>
obj ..:? configMonoidRequireStackVersionName
..!= VersionRangeJSON anyVersion
configMonoidOS <- First <$> obj ..:? configMonoidOSName
configMonoidArch <- First <$> obj ..:? configMonoidArchName
configMonoidGHCVariant <- First <$> obj ..:? configMonoidGHCVariantName
configMonoidJobs <- First <$> obj ..:? configMonoidJobsName
Expand Down Expand Up @@ -956,9 +953,6 @@ configMonoidSkipMsysName = "skip-msys"
configMonoidRequireStackVersionName :: Text
configMonoidRequireStackVersionName = "require-stack-version"

configMonoidOSName :: Text
configMonoidOSName = "os"

configMonoidArchName :: Text
configMonoidArchName = "arch"

Expand Down

0 comments on commit 0bc1927

Please sign in to comment.