Skip to content

Don't implement allow-newer/allow-older by modifying PackageDescription #4203

Open

Description

@ezyang

It seems cleaner to hook it straight into the dep solver, rather than try to ninja it in by package description modification. If you do it by modification, you have to worry about making sure the "correct" package description is used anywhere you want to look at deps, and sometimes you get spurious warnings because it looks like you modify build-depends which affects our source level checks, but actually we didn't.

The lack of cleanliness here is hurting me because I want BuildInfo to reflect the written syntax as closely as possible (when I make the modification for #4155), but I have to keep targetBuildDepends around as a real field if people are editing it.

Previously @kosmikus requested this in #3466.

Activity

  1. Ericson2314 commented on Jan 3, 2017

    @Ericson2314
    Collaborator

    This would be in the same spirit as removing cabal-install's mysterious other injected extra bounds which cause #4169 right?

  2. ezyang commented on Jan 3, 2017

    @ezyang
    ContributorAuthor

    Yep, I think so, thanks for posting the reference!

  3. 23Skidoo commented on Jan 3, 2017

    @23Skidoo
    Member

    The problem here is that we won't be able to implement ./Setup.hs configure --alow-newer in this way, and IIRC that interface is used by Stack (it was added per @snoyberg's request).

  4. hvr commented on Jan 3, 2017

    @hvr
    Member

    @23Skidoo relevant: #3581

  5. 23Skidoo commented on Jan 3, 2017

    @23Skidoo
    Member

    OK, if Stack doesn't need that interface, then we can remove it.

  6. Ericson2314 commented on Feb 1, 2018

    @Ericson2314
    Collaborator

    Because of #4527, this only covers other cases of modifying bounds in situ like #4169, and #4383 if it's merged, right?

  7. 23Skidoo commented on Feb 1, 2018

    @23Skidoo
    Member

    #4527 only removed the --allow-{newer,older} command-line options from setup scripts, the main issue this ticket is about is still there.

  8. Ericson2314 commented on Feb 1, 2018

    @Ericson2314
    Collaborator

    @23Skidoo Ah the code in Cabal is still there and not dead via something else?

  9. 23Skidoo commented on Feb 1, 2018

    @23Skidoo
    Member

    Yes, it's spread across lib:Cabal and cabal-install. See D.C.Dependency.removeBounds, which uses D.PD.transformAllBuildDepends.

  10. Ericson2314 commented on Feb 1, 2018

    @Ericson2314
    Collaborator

    Thanks!

  11. added
    re: allow-newer
    on May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions