{"id":38491694,"url":"https://github.com/andreasabel/stacker","last_synced_at":"2026-01-17T05:43:21.094Z","repository":{"id":328218240,"uuid":"1113373547","full_name":"andreasabel/stacker","owner":"andreasabel","description":"Bump stackage snapshots in `stack*.yaml` files","archived":false,"fork":false,"pushed_at":"2026-01-14T19:03:32.000Z","size":141,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-14T19:16:54.115Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andreasabel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-09T22:21:13.000Z","updated_at":"2026-01-14T18:34:13.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/andreasabel/stacker","commit_stats":null,"previous_names":["andreasabel/stack-snapshots","andreasabel/stacker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andreasabel/stacker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasabel%2Fstacker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasabel%2Fstacker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasabel%2Fstacker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasabel%2Fstacker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreasabel","download_url":"https://codeload.github.com/andreasabel/stacker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasabel%2Fstacker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28500955,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T04:31:57.058Z","status":"ssl_error","status_checked_at":"2026-01-17T04:31:45.816Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-17T05:43:20.354Z","updated_at":"2026-01-17T05:43:21.087Z","avatar_url":"https://github.com/andreasabel.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stacker\n\nBump snapshots (aka resolvers) in `stack*.yaml` files.\n\nThe `stacker` tools goes through the given fiels (or all `stack*.yaml` files in the current directory),\ninspects the value of the `snapshot:` (or `resolver:`) field and upgrades it in the following way:\n\n1. If the value is pointing to a LTS snapshot, e.g., `lts-24.10`,\n   it will bump it to the latest version of this LTS\n   (at the time of writing this is `lts-24.23`).\n\n2. If the value is pointing to a nightly release and this nightly\n   belongs to a GHC major version for which an LTS exists,\n   it will bump it to the latest LTS for this GHC version.\n   For instance, `nightly-2024-12-15` is for GHC 9.10.1,\n   but there is LTS series 24 for GHC 9.10,\n   so the snapshot will be bumped to `lts-24.23`,\n   the latest of the LTS series 24.\n\n3. If the value is pointing to a nightly release for a GHC major version\n   that has no LTS yet, it will be bumped to the latest nightly snapshot\n   for this GHC major version.\n   For instance, snapshot `nightly-2025-10-10` is for GHC 9.12.2,\n   and there is no LTS series for GHC 9.12 yet (at the time of writing),\n   so the snapshot value will be bumped to `nightly-2025-12-09`,\n   the latest nightly (at the time of writing this).\n\n## Synopsis\n\n`stacker` understands the following essential commands:\n\n| Command              | Description                                                                      |\n|----------------------|----------------------------------------------------------------------------------|\n| `bump [FILES...]`    | Updates FILES (all `stack*.yaml` files if none specified)                        |\n| `dry-run [FILES...]` | Shows what updates would be performed by the respective `bump` (default command) |\n| `config`             | Configures `stacker`                                                             |\n| `update`             | Updates its database of stackage snapshots                                       |\n| `info`               | Prints table mapping GHC major versions to their latest snapshots                |\n\nThese can be modified with the following option(s):\n\n| Option        | Values                  | Description                                                        |\n|---------------|-------------------------|--------------------------------------------------------------------|\n| `--color`     | `always`,`never`,`auto` | Colored output? (Default: `auto`)                                  |\n| `--recursive` | (flag)                  | Search for `stack*.yaml` files in all subdirectories (short: `-r`) |\n\nWhen `--color=auto` is used (the default), colors are disabled\nif the `NO_COLOR` environment variable is set to any value,\nfollowing the standard described at https://no-color.org.\nColors can still be forced on with `--color=always` even when `NO_COLOR` is set.\n\n**Note:** The `--recursive` flag can only be used with `bump` and `dry-run` commands\nwhen no explicit FILES are specified. If you provide explicit file arguments,\nyou cannot use the `--recursive` flag.\n\nIt also has the following inessential commands (standard options) that just give information about itself:\n\n| Command           | Alternatives        | Description                                                                         |\n|-------------------|---------------------|-------------------------------------------------------------------------------------|\n| `version`         | `--version`, `-V`   | Prints version and copyright info                                                   |\n| `numeric-version` | `--numeric-version` | Prints just the version number                                                      |\n| `license`         | `--license`         | Prints the license text (BSD 3-clause)                                              |\n| `help`            | `--help`, `-h`      | Prints `--version`, one paragraph description of functionality, and list of options |\n\n`stacker` runs on the 3 major platforms Linux, macOS, and Windows.\n\n## Data files\n\n`stacker` comes with 3 data files that are copied into its\nXDG-conform application directory (`$XDG_STATE_HOME/stacker`)\nwhenever the program is invoked and they do not exist there yet.\n\n1. `lts.csv` containing a map from LTS version to GHC version, e.g.\n   ```\n   ...\n   22.42,9.6.6\n   22.43,9.6.6\n   22.44,9.6.7\n   23.1,9,8.4\n   23.2,9.8.4\n   ...\n   23.28,9.8.4\n   24.1,9.10.1\n   ...\n   ```\n\n2. `nightly.csv` containing a map from nightly version to GHC version, e.g.\n   ```\n   ...\n   2024-01-01,9.8.1\n   ...\n   2025-07-07,9.10.2\n   ...\n   2025-12-08,9.12.2\n   2025-12-09,9.12.2\n   ```\n\n3. `ghc.csv` containing a map from GHC version to its latest LTS or nightly snapshot, e.g.\n   ```\n   ...\n   9.2.8,lts-20.26\n   9.4.5,lts-21.7\n   ...\n   9.4.8,lts-21.25\n   9.6.3,lts-22.6\n   ...\n   9.6.6,lts-22.43\n   9.6.7,lts-22.44\n   ...\n   9.10.3,lts-24.23\n   9.12.2,nightly-2025-12-09\n   ```\n\nThese data files determine the results of `bump` (and its preview by `dry-run`).\n\n## `bump` command\n\n`stacker bump` looks for all `stack*.yaml` files in the current directory and updates them as described above.\n\nAlternatively, you can specify specific files to bump:\n```\nstacker bump stack-9.6.yaml stack-9.8.yaml\n```\n\nTo search for `stack*.yaml` files recursively in all subdirectories:\n```\nstacker bump --recursive\n```\nor\n```\nstacker bump -r\n```\n\nOnly the content of the `snapshot:` and `resolver:` fields will be updated,\neverything else will remain literally the same, including comments and whitespace.\n\n## `dry-run` command\n\nThis command is also run if no command is given to `stacker`.\nIt prints a table with all `stack*.yaml` files in the current directory,\ntheir `snapshot` (which can also be given in the `resolver` field), and what action to take (if any).\n\nAlternatively, you can specify specific files to check:\n```\nstacker dry-run stack-9.6.yaml stack-9.8.yaml\n```\n\nTo search for `stack*.yaml` files recursively in all subdirectories:\n```\nstacker dry-run --recursive\n```\nor\n```\nstacker dry-run -r\n```\n\nExample output:\n```\nstack-9.2.yaml    lts-20.26            ✓ up to date\nstack-9.4.yaml    lts-21.25            ✓ up to date\nstack-9.6.yaml    lts-22.43            → bump to lts-22.44\nstack-9.8.yaml    lts-23.1             → bump to lts-23.28\nstack-9.10.yaml   nightly-2024-07-07   → bump to lts-24.23\nstack-9.12.yaml   nightly-2025-10-03   → bump to nightly-2025-12-09\n```\nWhen coloring is on, the `stack*.yml` column is printed in bold, `✓ up to date` in green and any bump action in bright yellow.\n\nInternally, `bump` and `dry-run` share the analysis phase that reads the `stack*.yaml` and creates for each an action plan,\nyet `dry-run` just pretty-prints this plan as detailed above whereas `bump` executes it.\n\n## Configuration (optional)\n\n`stacker update` regenerates its information about GHC versions and Stackage snapshots from the repository\nhttps://github.com/commercialhaskell/stackage-snapshots .\n\nIf you have a clone of this repository already, you might want to configure `stacker` to use it\nso it does not make its own clone (which takes ~2GB of disk space).\n\nBy default, `stacker` stores information about the stackage snapshots\nin its XDG-conform application directory (`$XDG_STATE_HOME/stacker`),\nby creating a shallow git clone of said repository there\n(typically `$XDG_STATE_HOME/stacker/stackage-snapshots`).\n\nWith the command\n```\n   stacker config repo path/to/dir\n```\nthe stackage-snapshots repository will be instead searched for in `path/to/dir`.\nThe effect of the `config` command is to write file `config.yaml`\nin the XDG-conform configuration directory (`$XDG_CONFIG_HOME/stacker`)\nwith the following content:\n```yaml\n# stacker configuration\n\nrepo: /absolute/path/to/dir\n```\nwhere `/absolute/path/to/dir` is the `path/to/dir` turned into an absolute path.\n\nWhenever `stacker` is started with an essential command,\nit will attempt to read this configuration file and extract the value of `repo`, if it is given.\nWe shall refer to this value as `$REPO`.\nIt defaults to `$XDG_STATE_HOME/stacker/stackage-snapshots` if not configured.\n\n## `update` command\n\n`stacker update` first prints the path to the repo (value of `$REPO`).\nIf the repo does not exist,\nit will be created as a shallow git clone of https://github.com/commercialhaskell/stackage-snapshots .\n\nOnce created, it will only be updated by `stacker update`, and then only if its `master` branch is checked out.\nIf another branch is checked out, the `update` command exits with an error.\n\nThe `update` command then regenerates then three files `lts.csv`, `nightly.csv` and `ghc.csv` in `$XDG_STATE_HOME/stacker/`.\n\n## `info` command\n\n`stacker info` prints the following things in YAML format:\n1. `repo: $REPO`\n2. A map between each latest major GHC version and its corresponding latest LTS or nightly snapshot,\n   as read from `ghc.csv`.  Example:\n   ```yaml\n   snapshots:\n     ...\n     9.2.8: lts-20.26\n     9.4.8: lts-21.25\n     9.6.7: lts-22.44\n     9.8.4: lts-23.28\n     9.10.3: lts-24.23\n     9.12.2: nightly-2025-12-09\n   ```\n\n## Testing\n\nThis project is accompanied by a golden value testsuite (framework `tasty-golden`) that tests the `dry-run` and `bump` commands.\n\n## License\n\nBSD 3-clause.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreasabel%2Fstacker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreasabel%2Fstacker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreasabel%2Fstacker/lists"}