Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cabal-install-parsers does not pick up remote-repo field #459

Closed
andreasabel opened this issue Jan 4, 2021 · 2 comments
Closed

cabal-install-parsers does not pick up remote-repo field #459

andreasabel opened this issue Jan 4, 2021 · 2 comments

Comments

@andreasabel
Copy link
Contributor

Synopsis: cabal-install-parsers does not pick up remote-repo field.

See haskell-hvr/cabal-plan#70 (comment)

According to https://cabal.readthedocs.io/en/latest/installing-packages.html#legacy-repositories :

  remote-repo: hackage.haskell.org:http://hackage.haskell.org/packages/archive

This is just syntactic sugar for

  repository hackage.haskell.org
    url: http://hackage.haskell.org/packages/archive

although, in (and only in) the specific case of Hackage, the URL http://hackage.haskell.org/packages/archive will be silently translated to http://hackage.haskell.org/.

This is not implemented by

-- | Find a @01-index.tar@ for particular repository
cfgRepoIndex
:: Config Identity
-> RepoName
-> Maybe FilePath
cfgRepoIndex cfg repo
| repo `M.member` cfgRepositories cfg =
Just (runIdentity (cfgRemoteRepoCache cfg) </> repo </> "01-index.tar")
| otherwise = Nothing

but maybe should, since users may have legacy .cabal/config files.

@phadej
Copy link
Collaborator

phadej commented Jan 4, 2021

These legacy config files have to be very old (I haven't seen any new one written in five years).

@andreasabel
Copy link
Contributor Author

I one started out with v1-cabal, it is not so unlike to have a config file from these times. I am the constructive proof.
Old or not, a spec is a spec...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants