From 74d7cd9d2ef3c0f79ac03db0a72b63ead32ee0a8 Mon Sep 17 00:00:00 2001 From: Yuriy Syrovetskiy Date: Fri, 3 Jun 2016 19:02:02 +0300 Subject: [PATCH] documentation --- ChangeLog.md | 3 +++ doc/yaml_configuration.md | 2 ++ src/Stack/Setup.hs | 6 ++++-- src/Stack/Types/Config.hs | 1 + 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 5d9c9dff47..e1049b0cfa 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -10,6 +10,9 @@ Behavior changes: Other enhancements: +* `setup-info` in stack.yaml and in stack-setup.yaml, also `--ghc-bindist` command-line option + now support absolute file path in `url` field. + Bug fixes: ## 1.1.2 diff --git a/doc/yaml_configuration.md b/doc/yaml_configuration.md index 2a07963876..bb8dcd5923 100644 --- a/doc/yaml_configuration.md +++ b/doc/yaml_configuration.md @@ -421,6 +421,8 @@ setup-info: url: "https://example.com/ghc-7.10.2-i386-unknown-mingw32-foo.tar.xz" ``` +`url` may be either URL or (since UNRELEASED) absolute file path. + ### pvp-bounds (Since 0.1.5) diff --git a/src/Stack/Setup.hs b/src/Stack/Setup.hs index bc84ebd09d..50f0a4d538 100644 --- a/src/Stack/Setup.hs +++ b/src/Stack/Setup.hs @@ -767,9 +767,11 @@ downloadFromInfo programsDir downloadInfo tool = do let DownloadInfo{downloadInfoContentLength=contentLength, downloadInfoSha1=sha1} = downloadInfo when (isJust contentLength) $ - $logWarn "`content-length` should not be specified when `url` is a file path" + $logWarn "`content-length` in not checked \n\ + \and should not be specified when `url` is a file path" when (isJust sha1) $ - $logWarn "`sha1` should not be specified when `url` is a file path" + $logWarn "`sha1` is not checked and \n\ + \should not be specified when `url` is a file path" return path _ -> fail $ "`url` must be either an HTTP URL or absolute file path: " ++ url diff --git a/src/Stack/Types/Config.hs b/src/Stack/Types/Config.hs index 45e663656d..663787b8b5 100644 --- a/src/Stack/Types/Config.hs +++ b/src/Stack/Types/Config.hs @@ -1559,6 +1559,7 @@ parseGHCVariant s = -- | Information for a file to download. data DownloadInfo = DownloadInfo { downloadInfoUrl :: Text + -- ^ URL or absolute file path , downloadInfoContentLength :: Maybe Int , downloadInfoSha1 :: Maybe ByteString } deriving (Show)