From 243ff44acce6b550747dcb4b9fa8a960b76e3fb0 Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Fri, 2 Jan 2026 08:42:05 +0100 Subject: [PATCH 1/2] Add GHCs 9.14.1 and 9.12.3 and Cabal 3.16.1.0 --- README.md | 7 +++++-- dist/index.js | 2 +- lib/versions.json | 3 +++ src/versions.json | 3 +++ 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 775ee35..1b31d63 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,9 @@ E.g., `8.10` will be resolved to `8.10.7`, and so will `8`. - `latest-nightly` (requires the resp. `ghcup-release-channel`, e.g. `https://ghc.gitlab.haskell.org/ghcup-metadata/ghcup-nightlies-0.0.7.yaml`) - `latest` (default) -- `9.12.2` `9.12` +- `9.14.1` `9.14` +- `9.12.3` `9.12` +- `9.12.2` - `9.12.1` - `9.10.3` `9.10` - `9.10.2` @@ -136,7 +138,8 @@ Suggestion: Try to support at least the three latest major versions of GHC. - `head` (the [cabal-head](https://github.com/haskell/cabal/releases/tag/cabal-head) release of the most recent build of the `master` branch) - `latest` (default, recommended) -- `3.16.0.0` `3.16` +- `3.16.1.0` `3.16` +- `3.16.0.0` - `3.14.2.0` `3.14` - `3.14.1.1` - `3.14.1.0` diff --git a/dist/index.js b/dist/index.js index 107acc0..8958c4d 100644 --- a/dist/index.js +++ b/dist/index.js @@ -37741,7 +37741,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"win32":{"ghc":[{"from":"9.4.3","to": /***/ ((module) => { "use strict"; -module.exports = /*#__PURE__*/JSON.parse('{"ghc":["9.12.2","9.12.1","9.10.3","9.10.2","9.10.1","9.8.4","9.8.2","9.8.1","9.6.7","9.6.6","9.6.5","9.6.4","9.6.3","9.6.2","9.6.1","9.4.8","9.4.7","9.4.6","9.4.5","9.4.4","9.4.3","9.4.2","9.4.1","9.2.8","9.2.7","9.2.6","9.2.5","9.2.4","9.2.3","9.2.2","9.2.1","9.0.2","9.0.1","8.10.7","8.10.6","8.10.5","8.10.4","8.10.3","8.10.2","8.10.1","8.8.4","8.8.3","8.8.2","8.8.1","8.6.5","8.6.4","8.6.3","8.6.2","8.6.1","8.4.4","8.4.3","8.4.2","8.4.1","8.2.2","8.0.2","7.10.3"],"cabal":["3.16.0.0","3.14.2.0","3.14.1.1","3.14.1.0","3.12.1.0","3.10.3.0","3.10.2.1","3.10.2.0","3.10.1.0","3.8.1.0","3.6.2.0","3.6.0.0","3.4.1.0","3.4.0.0","3.2.0.0","3.0.0.0","2.4.1.0"],"stack":["3.7.1","3.5.1","3.3.1","3.1.1","2.15.7","2.15.5","2.15.3","2.15.1","2.13.1","2.11.1","2.9.3","2.9.1","2.7.5","2.7.3","2.7.1","2.5.1","2.3.3","2.3.1","2.1.3","2.1.1","1.9.3","1.9.1","1.7.1","1.6.5","1.6.3","1.6.1","1.5.1","1.5.0","1.4.0","1.3.2","1.3.0","1.2.0"],"ghcup":["0.1.50.2"]}'); +module.exports = /*#__PURE__*/JSON.parse('{"ghc":["9.14.1","9.12.3","9.12.2","9.12.1","9.10.3","9.10.2","9.10.1","9.8.4","9.8.2","9.8.1","9.6.7","9.6.6","9.6.5","9.6.4","9.6.3","9.6.2","9.6.1","9.4.8","9.4.7","9.4.6","9.4.5","9.4.4","9.4.3","9.4.2","9.4.1","9.2.8","9.2.7","9.2.6","9.2.5","9.2.4","9.2.3","9.2.2","9.2.1","9.0.2","9.0.1","8.10.7","8.10.6","8.10.5","8.10.4","8.10.3","8.10.2","8.10.1","8.8.4","8.8.3","8.8.2","8.8.1","8.6.5","8.6.4","8.6.3","8.6.2","8.6.1","8.4.4","8.4.3","8.4.2","8.4.1","8.2.2","8.0.2","7.10.3"],"cabal":["3.16.1.0","3.16.0.0","3.14.2.0","3.14.1.1","3.14.1.0","3.12.1.0","3.10.3.0","3.10.2.1","3.10.2.0","3.10.1.0","3.8.1.0","3.6.2.0","3.6.0.0","3.4.1.0","3.4.0.0","3.2.0.0","3.0.0.0","2.4.1.0"],"stack":["3.7.1","3.5.1","3.3.1","3.1.1","2.15.7","2.15.5","2.15.3","2.15.1","2.13.1","2.11.1","2.9.3","2.9.1","2.7.5","2.7.3","2.7.1","2.5.1","2.3.3","2.3.1","2.1.3","2.1.1","1.9.3","1.9.1","1.7.1","1.6.5","1.6.3","1.6.1","1.5.1","1.5.0","1.4.0","1.3.2","1.3.0","1.2.0"],"ghcup":["0.1.50.2"]}'); /***/ }) diff --git a/lib/versions.json b/lib/versions.json index c4a06d8..e8a0894 100644 --- a/lib/versions.json +++ b/lib/versions.json @@ -1,5 +1,7 @@ { "ghc": [ + "9.14.1", + "9.12.3", "9.12.2", "9.12.1", "9.10.3", @@ -58,6 +60,7 @@ "7.10.3" ], "cabal": [ + "3.16.1.0", "3.16.0.0", "3.14.2.0", "3.14.1.1", diff --git a/src/versions.json b/src/versions.json index 18acc68..07a3093 100644 --- a/src/versions.json +++ b/src/versions.json @@ -1,5 +1,7 @@ { "ghc": [ + "9.14.1", + "9.12.3", "9.12.2", "9.12.1", "9.10.3", @@ -58,6 +60,7 @@ "7.10.3" ], "cabal": [ + "3.16.1.0", "3.16.0.0", "3.14.2.0", "3.14.1.1", From eb29c237a18b47554a426cb75d69844f689dc049 Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Fri, 2 Jan 2026 08:56:41 +0100 Subject: [PATCH 2/2] Use GHCup vanilla and prereleases channels by default --- dist/index.js | 8 ++++++-- lib/installer.d.ts | 2 +- lib/installer.js | 2 +- lib/setup-haskell.js | 6 +++++- src/installer.ts | 4 ++-- src/setup-haskell.ts | 7 ++++++- 6 files changed, 21 insertions(+), 8 deletions(-) diff --git a/dist/index.js b/dist/index.js index 8958c4d..8668052 100644 --- a/dist/index.js +++ b/dist/index.js @@ -35296,7 +35296,7 @@ async function ghcupBin(os, arch) { async function addGhcupReleaseChannel(channel, os, arch) { core.info(`Adding ghcup release channel: ${channel}`); const bin = await ghcupBin(os, arch); - await exec(bin, ['config', 'add-release-channel', channel.toString()]); + await exec(bin, ['config', 'add-release-channel', channel]); } async function ghcup(tool, version, os, arch) { core.info(`Attempting to install ${tool} ${version} using ghcup`); @@ -35715,8 +35715,12 @@ async function run(inputs) { core.debug(`run: inputs = ${JSON.stringify(inputs)}`); core.debug(`run: os = ${JSON.stringify(os)}`); core.debug(`run: opts = ${JSON.stringify(opts)}`); + // Andreas Abel, 2026-01-01, https://github.com/haskell-actions/setup/issues/78 + // Add ghcup vanilla and prereleases channels by default. + (0, installer_1.addGhcupReleaseChannel)('vanilla', os, arch); + (0, installer_1.addGhcupReleaseChannel)('prereleases', os, arch); if (opts.ghcup.releaseChannel) { - await core.group(`Preparing ghcup environment`, async () => (0, installer_1.addGhcupReleaseChannel)(opts.ghcup.releaseChannel, os, arch)); + await core.group(`Preparing ghcup environment`, async () => (0, installer_1.addGhcupReleaseChannel)(opts.ghcup.releaseChannel.toString(), os, arch)); } for (const [t, { resolved }] of Object.entries(opts).filter(o => o[1].enable)) { await core.group(`Preparing ${t} environment`, async () => (0, installer_1.resetTool)(t, resolved, os, arch)); diff --git a/lib/installer.d.ts b/lib/installer.d.ts index bd287ba..f7dfdfc 100644 --- a/lib/installer.d.ts +++ b/lib/installer.d.ts @@ -1,4 +1,4 @@ import { Arch, OS, Tool } from './opts'; export declare function installTool(tool: Tool, version: string, os: OS, arch: Arch): Promise; export declare function resetTool(tool: Tool, _version: string, os: OS, arch: Arch): Promise; -export declare function addGhcupReleaseChannel(channel: URL, os: OS, arch: Arch): Promise; +export declare function addGhcupReleaseChannel(channel: string, os: OS, arch: Arch): Promise; diff --git a/lib/installer.js b/lib/installer.js index bb1e89f..3199ae5 100644 --- a/lib/installer.js +++ b/lib/installer.js @@ -320,7 +320,7 @@ async function ghcupBin(os, arch) { async function addGhcupReleaseChannel(channel, os, arch) { core.info(`Adding ghcup release channel: ${channel}`); const bin = await ghcupBin(os, arch); - await exec(bin, ['config', 'add-release-channel', channel.toString()]); + await exec(bin, ['config', 'add-release-channel', channel]); } async function ghcup(tool, version, os, arch) { core.info(`Attempting to install ${tool} ${version} using ghcup`); diff --git a/lib/setup-haskell.js b/lib/setup-haskell.js index 0c7e167..48a6b43 100644 --- a/lib/setup-haskell.js +++ b/lib/setup-haskell.js @@ -73,8 +73,12 @@ async function run(inputs) { core.debug(`run: inputs = ${JSON.stringify(inputs)}`); core.debug(`run: os = ${JSON.stringify(os)}`); core.debug(`run: opts = ${JSON.stringify(opts)}`); + // Andreas Abel, 2026-01-01, https://github.com/haskell-actions/setup/issues/78 + // Add ghcup vanilla and prereleases channels by default. + (0, installer_1.addGhcupReleaseChannel)('vanilla', os, arch); + (0, installer_1.addGhcupReleaseChannel)('prereleases', os, arch); if (opts.ghcup.releaseChannel) { - await core.group(`Preparing ghcup environment`, async () => (0, installer_1.addGhcupReleaseChannel)(opts.ghcup.releaseChannel, os, arch)); + await core.group(`Preparing ghcup environment`, async () => (0, installer_1.addGhcupReleaseChannel)(opts.ghcup.releaseChannel.toString(), os, arch)); } for (const [t, { resolved }] of Object.entries(opts).filter(o => o[1].enable)) { await core.group(`Preparing ${t} environment`, async () => (0, installer_1.resetTool)(t, resolved, os, arch)); diff --git a/src/installer.ts b/src/installer.ts index c5c5fc3..96f76ea 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -354,13 +354,13 @@ async function ghcupBin(os: OS, arch: Arch): Promise { } export async function addGhcupReleaseChannel( - channel: URL, + channel: string, os: OS, arch: Arch ): Promise { core.info(`Adding ghcup release channel: ${channel}`); const bin = await ghcupBin(os, arch); - await exec(bin, ['config', 'add-release-channel', channel.toString()]); + await exec(bin, ['config', 'add-release-channel', channel]); } async function ghcup( diff --git a/src/setup-haskell.ts b/src/setup-haskell.ts index b8d0134..84734d9 100644 --- a/src/setup-haskell.ts +++ b/src/setup-haskell.ts @@ -40,9 +40,14 @@ export default async function run( core.debug(`run: os = ${JSON.stringify(os)}`); core.debug(`run: opts = ${JSON.stringify(opts)}`); + // Andreas Abel, 2026-01-01, https://github.com/haskell-actions/setup/issues/78 + // Add ghcup vanilla and prereleases channels by default. + addGhcupReleaseChannel('vanilla', os, arch); + addGhcupReleaseChannel('prereleases', os, arch); + if (opts.ghcup.releaseChannel) { await core.group(`Preparing ghcup environment`, async () => - addGhcupReleaseChannel(opts.ghcup.releaseChannel!, os, arch) + addGhcupReleaseChannel(opts.ghcup.releaseChannel!.toString(), os, arch) ); }