Skip to content

Commit

Permalink
Merge pull request #4330 from fosskers/init-comments
Browse files Browse the repository at this point in the history
Remove suggestions for legacy `packages` syntax
  • Loading branch information
mihaimaruseac committed Oct 2, 2018
2 parents 19e4863 + 64cae4d commit cf9b94d
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/Stack/Init.hs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ renderStackYaml p ignoredPackages dupPackages =
[ ("user-message" , userMsgHelp)
, ("resolver" , resolverHelp)
, ("packages" , packageHelp)
, ("extra-deps" , "# Dependency packages to be pulled from upstream that are not in the resolver\n# using the same syntax as the packages field.\n# (e.g., acme-missiles-0.3)")
, ("extra-deps" , extraDepsHelp)
, ("flags" , "# Override default flag values for local packages and extra-deps")
, ("extra-package-dbs", "# Extra package databases containing global packages")
]
Expand Down Expand Up @@ -274,15 +274,23 @@ renderStackYaml p ignoredPackages dupPackages =
, "packages:"
, "- some-directory"
, "- https://example.com/foo/bar/baz-0.0.2.tar.gz"
, "- location:"
, " git: https://github.com/commercialhaskell/stack.git"
, " commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a"
, "- location: https://github.com/commercialhaskell/stack/commit/e7b331f14bcffb8367cd58fbfc8b40ec7642100a"
, " subdirs:"
, " - auto-update"
, " - wai"
]

extraDepsHelp = commentHelp
[ "Dependency packages to be pulled from upstream that are not in the resolver."
, "These entries can reference officially published versions as well as"
, "forks / in-progress versions pinned to a git hash. For example:"
, ""
, "extra-deps:"
, "- acme-missiles-0.3"
, "- git: https://github.com/commercialhaskell/stack.git"
, " commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a"
, ""
]

footerHelp =
let major = toMajorVersion $ C.mkVersion' Meta.version
in commentHelp
Expand Down

0 comments on commit cf9b94d

Please sign in to comment.