Skip to content

Commit

Permalink
Expand documentation of convenience snapshot locations
Browse files Browse the repository at this point in the history
  • Loading branch information
mpilgrem committed Jan 1, 2025
1 parent 541546e commit 73aac53
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
4 changes: 3 additions & 1 deletion doc/configure/global_flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,9 @@ The `--setup-info-yaml <url>` command option specifies the location of a
Default: `https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master`

The `--snapshot-location-base <url>` command option specifies the base location
of snapshots.
of snapshots. For further information, see the documentation for the
corresponding non-project specific configuration
[option](yaml/non-project.md#snapshot-location-base).

## `--help` or `-h` command flags

Expand Down
4 changes: 3 additions & 1 deletion doc/configure/yaml/non-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -1495,7 +1495,9 @@ skip-msys: true
Default: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/
(as set in the `pantry` library)

Command line equivalent (takes precedence): `--snapshot-location-base` option
Command line equivalent (takes precedence):
[`--snapshot-location-base`](../global_flags.md#--snapshot-location-base-command-option)
option

Sets the base location of the LTS Haskell or Stackage Nightly snapshots.

Expand Down
20 changes: 16 additions & 4 deletions doc/topics/snapshot_location.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,37 @@ There are essentially four different ways of specifying a snapshot location:
4. Via a _convenience synonym_, which provides a short form for some common
URLs. These are:

* GitHub: `github:user/repo:path` is treated as:
* GitHub: `github:user/repo:path` is treated as:

~~~text
https://raw.githubusercontent.com/user/repo/master/path
~~~

* LTS Haskell: `lts-X.Y` is treated (by default) as:
* LTS Haskell: `lts-X.Y` is treated (by default) as:

~~~text
github:commercialhaskell/stackage-snapshots:lts/X/Y.yaml
~~~

* Stackage Nightly: `nightly-YYYY-MM-DD` is treated (by default) as:
and, consequently, expands to:

~~~text
https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/X/Y.yaml
~~~

* Stackage Nightly: `nightly-YYYY-MM-DD` is treated (by default) as:

~~~text
github:commercialhaskell/stackage-snapshots:nightly/YYYY/M/D.yaml
~~~

!!! info
and, consequently, expands to:

~~~text
https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/nightly/YYYY/M/D.yaml
~~~

!!! info "Overriding the default snapshot location base"

By default, LTS Haskell and Stackage Nightly snapshot configurations are
retrieved from the `stackage-snapshots` GitHub repository of user
Expand Down

0 comments on commit 73aac53

Please sign in to comment.