haskell / haskell/cabal

local noindex repository cannot update on windows

Open
#8,018 1 comment 0 reactions 0 assignees View on GitHub
cabal-install: cmd/update platform: windows
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

I installed cabal-3.6.2.0 on windows 11 with ghcup. I am using ghc-8.10.7

In `C:\cabal\config` I have two repositories that should contain the same packages:

```
repository localNoindex
url: file+noindex:///cabal/localrepo/package

repository local
url: file:///cabal/localrepo
secure: True
root-keys: 1f7fe92197eeb58a214d89b7e7ff1043cadddc5aa4fe185b3571ae8bab65cb14
7ced667343b4bca5c5b36f9f1b24e3ac9d48344eda1f48f644d4bb4dd9cc2458
8e9e98bab40e7a3e2ed33be2209ab3d7e85955d36c91ff9b615f8d4c1ebe433f
```
The directories look like:
```
$ ls /c/cabal/localrepo/package
hgeometry-0.13.tar.gz
$ tar xf hgeometry-0.13.tar.gz && ls hgeometry-0.13 # same as on hackage
LICENSE Setup.hs changelog docs hgeometry.cabal
README.md benchmark changelog.org doctests.hs src
```

`localNoindex` does not work:
```
$ cabal update localNoindex
Downloading the latest package list from localNoindex
cabal-3.6.2.0.exe: Error while updating index for localNoindex repository
dieVerbatim: user error (cabal-3.6.2.0.exe: Cannot read .cabal file inside
hgeometry-0.13.tar.gz
)
```
`local` works just fine but it needs extra steps to stay up-to-date (following https://hackage.haskell.org/package/hackage-repo-tool).

Contributor guide

Open the contributing guide

Research direction

Start by reproducing `cabal update localNoindex` with the Windows configuration described in the issue, then compare it with the working `local` repository path. Trace the repository update handling for `file+noindex` and the `.tar.gz` package, and consider the issue done when the no-index repository updates successfully on Windows.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.