Warn about revivions in cabal.config #232

This commit is contained in:
Michael Snoyman 2017-12-20 06:45:18 +02:00
parent 4d974136da
commit f9632d734c
No known key found for this signature in database
GPG Key ID: A048E8C057E86876

View File

@ -87,7 +87,11 @@ getStackageCabalConfigR name = track "Handler.StackageHome.getStackageCabalConfi
mapC (Chunk . showPackageLocal)
yield $ Chunk $ toBuilder '\n'
revisionsWarning =
toBuilder (asText "-- NOTE: Due to revisions, this file may not work. See:\n-- https://github.com/fpco/stackage-server/issues/232\n\n")
headerGlobal render = yield $ Chunk $
revisionsWarning ++
toBuilder (asText "-- Stackage snapshot from: ") ++
toBuilder (oldSnapshotUrl render) ++
toBuilder (asText "\n-- Please append these contents to the end of your global cabal config file.\n-- To only use tested packages, uncomment the following line\n-- and comment out other remote-repo lines:\n-- remote-repo: stackage-") ++
@ -97,6 +101,7 @@ getStackageCabalConfigR name = track "Handler.StackageHome.getStackageCabalConfi
toBuilder '\n'
headerLocal render = yield $ Chunk $
revisionsWarning ++
toBuilder (asText "-- Stackage snapshot from: ") ++
toBuilder (oldSnapshotUrl render) ++
toBuilder (asText "\n-- Please place this file next to your .cabal file as cabal.config\n-- To only use tested packages, uncomment the following line:\n-- remote-repo: stackage-") ++