Skip to content

cabal-version check doesn't happen early enough #4448

Closed

Description

@ezyang

With https://github.com/danidiaz/wl-pprint-indef/tree/problemo when built you get the error:

Error:
    Mix-in refers to non-existent package 'wl-pprint-indef'
    (did you forget to add the package to build-depends?)
    In the stanza 'executable wl-pprint-string-example'
    In the inplace package 'wl-pprint-indef-1.2'

But everything exists. In fact, the problem is that cabal-version is not set high enough to get the correct semantics in this case.

I'm not sure if the correct fix is to move cabal-version sanity checking earlier, or to add a little extra logic to the cabal-version dependent bits of mixin linking to give a warning when something has gone wrong, but something is worth doing here.

Activity

  1. self-assigned this
    on Apr 16, 2017
  2. hvr commented on Dec 9, 2017

    @hvr
    Member

    Is this something that can be handled in cabal check? or can this be even caught by the parser? i.e. can this be detected statically by looking at the .cabal file?

    /cc @phadej

  3. phadej commented on Dec 9, 2017

    @phadej
    Collaborator

    New parser framework has since annotations. They just don't do anything right now, I'll check this soln

  4. self-assigned this
    on Dec 9, 2017
  5. phadej commented on Dec 25, 2017

    @phadej
    Collaborator

    Fixed in #4971 / #4953. mixins / signature fields are warned about if not cabal-version: 2.0 or later

  6. ezyang commented on Dec 25, 2017

    @ezyang
    ContributorAuthor

    Thank you @phadej! You rock.

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions