mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-01-11 19:58:28 +01:00
Merge pull request #340 from juhp/diff-fpco-time
add snapshot diff previous link and time to snapshot date
This commit is contained in:
commit
c4676e524c
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Server for stable, curated Haskell package sets
|
Server for stable, curated Haskell package sets
|
||||||
|
|
||||||
This repo is part of the [Stackage project](https://github.com/fpco/stackage),
|
This repo is part of the [Stackage project](https://github.com/commercialhaskell/stackage),
|
||||||
and the live server can be viewed at https://www.stackage.org.
|
and the live server can be viewed at https://www.stackage.org.
|
||||||
|
|
||||||
## Building locally
|
## Building locally
|
||||||
|
|||||||
@ -138,7 +138,7 @@ withFoundation appLogFunc appSettings inner = do
|
|||||||
then do
|
then do
|
||||||
fp <- runSimpleApp $ getStackageContentDir "."
|
fp <- runSimpleApp $ getStackageContentDir "."
|
||||||
gitRepoDev fp loadWebsiteContent
|
gitRepoDev fp loadWebsiteContent
|
||||||
else gitRepo "https://github.com/fpco/stackage-content.git" "master" loadWebsiteContent
|
else gitRepo "https://github.com/commercialhaskell/stackage-content.git" "master" loadWebsiteContent
|
||||||
let runContentUpdates =
|
let runContentUpdates =
|
||||||
Concurrently $
|
Concurrently $
|
||||||
forever $
|
forever $
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import Import
|
|||||||
|
|
||||||
getBuildPlanR :: SnapName -> Handler TypedContent
|
getBuildPlanR :: SnapName -> Handler TypedContent
|
||||||
getBuildPlanR _slug = track "Handler.BuildPlan.getBuildPlanR" $ do
|
getBuildPlanR _slug = track "Handler.BuildPlan.getBuildPlanR" $ do
|
||||||
error "temporarily disabled, please open on issue on https://github.com/fpco/stackage-server/issues/ if you need it"
|
error "temporarily disabled, please open on issue on https://github.com/commercialhaskell/stackage-server/issues/ if you need it"
|
||||||
{-
|
{-
|
||||||
fullDeps <- (== Just "true") <$> lookupGetParam "full-deps"
|
fullDeps <- (== Just "true") <$> lookupGetParam "full-deps"
|
||||||
spec <- parseSnapshotSpec $ toPathPiece slug
|
spec <- parseSnapshotSpec $ toPathPiece slug
|
||||||
|
|||||||
@ -53,7 +53,8 @@ instance ToJSON SnapshotInfo where
|
|||||||
getStackageDiffR :: SnapName -> SnapName -> Handler TypedContent
|
getStackageDiffR :: SnapName -> SnapName -> Handler TypedContent
|
||||||
getStackageDiffR name1 name2 = track "Handler.StackageHome.getStackageDiffR" $ do
|
getStackageDiffR name1 name2 = track "Handler.StackageHome.getStackageDiffR" $ do
|
||||||
cacheSeconds $ 60 * 60 * 48
|
cacheSeconds $ 60 * 60 * 48
|
||||||
Entity sid1 _ <- lookupSnapshot name1 >>= maybe notFound return
|
Entity sid1 prevSnap <- lookupSnapshot name1 >>= maybe notFound return
|
||||||
|
mprevprevSnapName <- map snd <$> snapshotBefore (snapshotName prevSnap)
|
||||||
Entity sid2 _ <- lookupSnapshot name2 >>= maybe notFound return
|
Entity sid2 _ <- lookupSnapshot name2 >>= maybe notFound return
|
||||||
snapDiff <- getSnapshotDiff sid1 sid2
|
snapDiff <- getSnapshotDiff sid1 sid2
|
||||||
selectRep $ do
|
selectRep $ do
|
||||||
@ -97,7 +98,7 @@ getStackageCabalConfigR name = track "Handler.StackageHome.getStackageCabalConfi
|
|||||||
yield $ Chunk $ toBuilder '\n'
|
yield $ Chunk $ toBuilder '\n'
|
||||||
|
|
||||||
revisionsWarning =
|
revisionsWarning =
|
||||||
toBuilder (asText "-- NOTE: Due to revisions, this file may not work. See:\n-- https://github.com/fpco/stackage-server/issues/232\n\n")
|
toBuilder (asText "-- NOTE: Due to revisions, this file may not work. See:\n-- https://github.com/commercialhaskell/stackage-server/issues/232\n\n")
|
||||||
|
|
||||||
headerGlobal render = yield $ Chunk $
|
headerGlobal render = yield $ Chunk $
|
||||||
revisionsWarning ++
|
revisionsWarning ++
|
||||||
@ -155,8 +156,8 @@ getStackageCabalConfigR name = track "Handler.StackageHome.getStackageCabalConfi
|
|||||||
toBuilder (pliName p) ++
|
toBuilder (pliName p) ++
|
||||||
constraint p
|
constraint p
|
||||||
|
|
||||||
yearMonthDay :: FormatTime t => t -> String
|
yearMonthDayTime :: FormatTime t => t -> String
|
||||||
yearMonthDay = formatTime defaultTimeLocale "%Y-%m-%d"
|
yearMonthDayTime = formatTime defaultTimeLocale "%Y-%m-%d %H:%M %Z"
|
||||||
|
|
||||||
getSnapshotPackagesR :: SnapName -> Handler () -- FIXME move to OldLinks?
|
getSnapshotPackagesR :: SnapName -> Handler () -- FIXME move to OldLinks?
|
||||||
getSnapshotPackagesR name = track "Handler.StackageHome.getSnapshotPackagesR" $
|
getSnapshotPackagesR name = track "Handler.StackageHome.getSnapshotPackagesR" $
|
||||||
|
|||||||
@ -311,7 +311,7 @@ div#style-menu-holder {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fixes: https://github.com/fpco/stackage-server/issues/222 */
|
/* Fixes: https://github.com/commercialhaskell/stackage-server/issues/222 */
|
||||||
/* #synopsis { */
|
/* #synopsis { */
|
||||||
/* display: none; */
|
/* display: none; */
|
||||||
/* } */
|
/* } */
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
<li> <a href="/snapshots">Snapshots</a>
|
<li> <a href="/snapshots">Snapshots</a>
|
||||||
<li> <a href="/lts">LTS</a>
|
<li> <a href="/lts">LTS</a>
|
||||||
<li> <a href="/nightly">Nightly</a>
|
<li> <a href="/nightly">Nightly</a>
|
||||||
<li> <a href="https://github.com/fpco/stackage#frequently-asked-questions">FAQ</a>
|
<li> <a href="https://github.com/commercialhaskell/stackage#frequently-asked-questions">FAQ</a>
|
||||||
<li> <a href="/blog">Blog</a>
|
<li> <a href="/blog">Blog</a>
|
||||||
|
|
||||||
$maybe msg <- mmsg
|
$maybe msg <- mmsg
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
<h3>Stable Haskell package sets
|
<h3>Stable Haskell package sets
|
||||||
<ul>
|
<ul>
|
||||||
<li>A distribution of compatible Haskell packages from <a href="https://hackage.haskell.org">Hackage</a> that build together
|
<li>A distribution of compatible Haskell packages from <a href="https://hackage.haskell.org">Hackage</a> that build together
|
||||||
<li>Stackage is a community project: <a href="https://github.com/fpco/stackage/blob/master/MAINTAINERS.md#adding-a-package"><b>how to add packages to Stackage</b></a>
|
<li>Stackage is a community project: <a href="https://github.com/commercialhaskell/stackage/blob/master/MAINTAINERS.md#adding-a-package"><b>how to add packages to Stackage</b></a>
|
||||||
<li><a href="https://haskellstack.org">stack</a> makes using Stackage easy
|
<li><a href="https://haskellstack.org">stack</a> makes using Stackage easy
|
||||||
<div .span6>
|
<div .span6>
|
||||||
$maybe post <- mrecentBlog
|
$maybe post <- mrecentBlog
|
||||||
@ -43,7 +43,7 @@
|
|||||||
About Stackage
|
About Stackage
|
||||||
<p>
|
<p>
|
||||||
Stackage provides consistent sets of Haskell packages, known to build together and pass their tests before becoming <a href="/nightly">Stackage Nightly</a> snapshots and <a href="/lts">LTS</a>
|
Stackage provides consistent sets of Haskell packages, known to build together and pass their tests before becoming <a href="/nightly">Stackage Nightly</a> snapshots and <a href="/lts">LTS</a>
|
||||||
(<a href="https://github.com/fpco/lts-haskell#readme">Long Term Support</a>) releases.
|
(<a href="https://github.com/commercialhaskell/lts-haskell#readme">Long Term Support</a>) releases.
|
||||||
<p>
|
<p>
|
||||||
It is a distribution of a subset of packages from <a href="https://hackage.haskell.org">Hackage</a>, each package chosen at a version to make the set self-consistent. Note that Stackage does not patch any packages.
|
It is a distribution of a subset of packages from <a href="https://hackage.haskell.org">Hackage</a>, each package chosen at a version to make the set self-consistent. Note that Stackage does not patch any packages.
|
||||||
<p>
|
<p>
|
||||||
@ -54,10 +54,10 @@
|
|||||||
Stackage is a community project: Haskell users around the world work together to keep Stackage snapshots up to date with recent package versions:
|
Stackage is a community project: Haskell users around the world work together to keep Stackage snapshots up to date with recent package versions:
|
||||||
Stackage itself and all the tools surrounding it are open-source.
|
Stackage itself and all the tools surrounding it are open-source.
|
||||||
See #
|
See #
|
||||||
\<a href="https://github.com/fpco/stackage/blob/master/MAINTAINERS.md#adding-a-package"><b>how to add packages to Stackage</b></a>.
|
\<a href="https://github.com/commercialhaskell/stackage/blob/master/MAINTAINERS.md#adding-a-package"><b>how to add packages to Stackage</b></a>.
|
||||||
<p>
|
<p>
|
||||||
Have more questions? We have a #
|
Have more questions? We have a #
|
||||||
\<a href="https://github.com/fpco/stackage#frequently-asked-questions">FAQ section on Github</a>.
|
\<a href="https://github.com/commercialhaskell/stackage#frequently-asked-questions">FAQ section on Github</a>.
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Stackage's infrastructure, build machines, initial creation and ongoing maintenance were proudly sponsored by <a href="https://www.fpcomplete.com">FP Complete</a> from 2014 to 2024.
|
Stackage's infrastructure, build machines, initial creation and ongoing maintenance were proudly sponsored by <a href="https://www.fpcomplete.com">FP Complete</a> from 2014 to 2024.
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
<p style="font-size:0.8em">
|
<p style="font-size:0.8em">
|
||||||
<i>Note that Stackage only displays results for the latest LTS and Nightly snapshot.
|
<i>Note that Stackage only displays results for the latest LTS and Nightly snapshot.
|
||||||
\ #
|
\ #
|
||||||
<a href="https://github.com/fpco/stackage-server/issues/305">Learn more.
|
<a href="https://github.com/commercialhaskell/stackage-server/issues/305">Learn more.
|
||||||
^{hoogleForm}
|
^{hoogleForm}
|
||||||
$if null results
|
$if null results
|
||||||
<p>Your search produced no results.
|
<p>Your search produced no results.
|
||||||
|
|||||||
@ -255,7 +255,7 @@ h2.changes-title {
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* https://github.com/fpco/stackage-server/issues/39 */
|
/* https://github.com/commercialhaskell/stackage-server/issues/39 */
|
||||||
div.plain-text {
|
div.plain-text {
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
If you believe this is in error, please
|
If you believe this is in error, please
|
||||||
<a href="https://github.com/fpco/stackage-content/edit/master/spam-packages.yaml">send a pull request
|
<a href="https://github.com/commercialhaskell/stackage-content/edit/master/spam-packages.yaml">send a pull request
|
||||||
to remove this classification.
|
to remove this classification.
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@ -1,5 +1,10 @@
|
|||||||
<h1>Compare Stackage snapshots
|
<h1>Compare Stackage snapshots
|
||||||
|
|
||||||
|
$maybe prevprev <- mprevprevSnapName
|
||||||
|
<div .snapshot-nav>
|
||||||
|
<a href=@{StackageDiffR prevprev name1}>
|
||||||
|
\< previous diff
|
||||||
|
|
||||||
<div .container .content>
|
<div .container .content>
|
||||||
<div .packages>
|
<div .packages>
|
||||||
<table .table>
|
<table .table>
|
||||||
|
|||||||
@ -3,7 +3,7 @@ $newline never
|
|||||||
<h1>
|
<h1>
|
||||||
#{snapshotTitle snapshot}
|
#{snapshotTitle snapshot}
|
||||||
<p>
|
<p>
|
||||||
Published on #{yearMonthDay (snapshotCreated snapshot)}
|
Published on #{yearMonthDayTime (snapshotCreated snapshot)}
|
||||||
<span .separator>
|
<span .separator>
|
||||||
<span>
|
<span>
|
||||||
<a href=@{StackageDiffR previousSnapName name}>View changes
|
<a href=@{StackageDiffR previousSnapName name}>View changes
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user