From d205e9cae1c0ddf7544b4a938ec580add24226a9 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 5 Jan 2015 17:32:32 +0200 Subject: [PATCH] URL structure description --- Stackage-Server-FAQ.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/Stackage-Server-FAQ.md b/Stackage-Server-FAQ.md index 221eb2a..eac38b1 100644 --- a/Stackage-Server-FAQ.md +++ b/Stackage-Server-FAQ.md @@ -86,3 +86,41 @@ The workaround is to edit your `cabal.config` with - Cabal ==1.18.1.3, + Cabal ==1.18.1.4, ``` + +# I'd like to link to the most recent LTS/Nightly, what URL can I use? + +Let's take a quick step back and describe how snapshots work in general. Every snapshot on stackage.org is uniquely identified in two different ways: + +* Its `PackageSetIdent`, which is a SHA1 hash of its bundle file, and is almost never seen by end users +* Its `SnapSlug`, which is just a standard slug + +Every snapshot uploaded- even those [uploaded by users and not an LTS or Nightly release](https://github.com/fpco/stackage/wiki/Experimental-package-releases-via-Stackage-Server), have both of these identifiers. The `SnapSlug` makes up the *canonical* URL for a snapshot, like so: + +* http://www.stackage.org/snapshot/*slug* +* http://www.stackage.org/snapshot/*slug*/docs +* etc + +In addition, for convenience, we have additional non-canonical URLs for the LTS and Nightly snapshots. For example: + +* http://www.stackage.org/lts always points to the most recent LTS release +* http://www.stackage.org/lts/1 always points to the most recent LTS point release in the 1.X series +* http://www.stackage.org/lts/1.0 points to precisely LTS 1.0 +* http://www.stackage.org/nightly always points to the most recent Nightly release +* http://www.stackage.org/nightly/2015-01-01 points to precisely the January 1, 2015 Nightly + +These URLs work not only by themselves, but also take arbitrary suffixes, just like the canonical URLs. For example, if you visit http://www.stackage.org/snapshot/lts-1.0, you'll get a link to http://www.stackage.org/snapshot/lts-1.0/cabal.config?global=true. This URL can also be reached via: + +* http://www.stackage.org/lts/1.0/cabal.config?global=true + +And similarly, you can get the global cabal.config for the newest LTS 1.X release by using the URL: + +* http://www.stackage.org/lts/1/cabal.config?global=true + +or get the newest for all releases via: + +* http://www.stackage.org/lts/cabal.config?global=true + +As such, some useful URLs you may want to bookmark would be: + +* http://www.stackage.org/lts/hoogle +* http://www.stackage.org/lts/docs \ No newline at end of file