WIP-haskell-cabal: fetch correct cabal revisions

Fetch cabal revisions from `https://hackage.haskell.org/package/{name}-{version}/revisions/`, rather
than `https://hackage.haskell.org/package/{name}/revisions/`, which fetches revisions for the latest
package version, not the version pinned in `./dist-newstyle/cache/plan.json`.
This commit is contained in:
lbodor 2024-03-27 15:59:28 +11:00 committed by mergify[bot]
parent 4710341e67
commit 26a6c3a340

View File

@ -46,10 +46,10 @@ for i, pkg in enumerate(pkgs):
id = pkg["id"]
version = pkg["pkg-version"]
print(f"[{i+1}/{pkg_len}] Resolving revision for {name}")
print(f"[{i+1}/{pkg_len}] Resolving revision for {name}-{version}")
revisions = requests.get(
f"https://hackage.haskell.org/package/{name}/revisions/",
f"https://hackage.haskell.org/package/{name}-{version}/revisions/",
headers={"Accept": "application/json"},
).json()