GithubHelp home page GithubHelp logo

Comments (3)

andreasabel avatar andreasabel commented on May 31, 2024

After some research, looking at the source code of cabal-plan(passing the safety pig ;-)), I could fix the problem by replacing in my .cabal/config

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

with

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

However, according to https://cabal.readthedocs.io/en/latest/installing-packages.html#legacy-repositories this is just expanding a synonym:

  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/.

from cabal-plan.

nomeata avatar nomeata commented on May 31, 2024

JFTR: I just ran into this as well

from cabal-plan.

sellout avatar sellout commented on May 31, 2024

I just ran into this, and wanted to make the workaround/fix more explicit in case anyone else still has an ancient .cabal/config around.

Basically, the remote-repo field in Cabal config files is “legacy” (read: obsolete and not well supported). To fix it, rewrite any

remote-repo: {{repository}}:{{url}}

to

repository {{repository}}
  url: {{url}}

Since providing a better error message here would basically entail parsing remote-repo anyway, it seems like it’s no harder to just support the legacy syntax. I.e., I feel like this issue should be closed, and instead, it would be nice if Cabal itself warned on legacy syntax.

from cabal-plan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.