You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RFC remove allow-older and allow-newer support from Setup.hs #3581
Shortly: revert changes made in #3163 & #3165, as well as followed --allow-older changes.
Motivation: Such functionality isn't necessary (not used by anyone) to be provided by Cabal/Setup.hs†, and results into duplicate code (starting from argument parsing etc). --exact-configuration should be enough for everyone to force "I know what I'm doing". For the situations were "I almost know what I do, help me with rest", one could/should use external tools (e.g. cabal-install could have cabal solver command to produce configuration file).
Optional:
Add --exact-configuration to cabal-install
Add cabal solver (we now use cabal configure -v2 --dry-run, but it feels semantically wrong).
Alternative: leave --allow-newer in Cabal, only remove followed --allow-older changes. IMHO this would lead to confusion. --allow-older hasn't hit Hackage AFAIK.
Note: this is proposal to remove them only from Cabal-the-library, cabal-install will continue to have them.
changed the title [-]RFC remove allow-older and allow-newer supoort from Setup.hs[/-][+]RFC remove allow-older and allow-newer support from Setup.hs[/+]on Jul 21, 2016
@kosmikus The situation is that Cabal the library has a miniature dependency solver, which picks dependencies when a user runs ./Setup configure. This solver is run even when you say --dependency="foo=foo-0.5-blahblah" because you may not have specified a complete set of dependencies and flags. Of course, if you're running cabal-install, by the time you get to the setup script you know exactly what dependencies you want. So you can then say ./Setup configure --exact-configuration --dependency="foo=foo-0.5-blahblah" and then no solver is run; we just take the command line arguments on faith.
exact-configuration is completely undocumented and I know about it from reading the configure source code.
Motivation: Such functionality isn't necessary (not used by anyone)
Well, the reason it was added was because a user requested it. If @snoyberg no longer needs it, we can reconsider, but I don't think removing it buys us that much. #3165 added ~100 lines total, and more than half of those were comments and tests.
We don't need such a flag. I recall a discussion that likely caused this to be implemented.
stack build --allow-newer is more permissive than cabal-install's allow-newer. It causes all version constraints to instead be warnings. As far as I know, cabal-install does not have this capability. I guess it would mean installing all the latest versions, maybe?
Nix currently runs Setup.hs, and not cabal configure (or any cabal command), so this is needed to avoid modifying cabal files afaik (which on nix is fairly involved). I was using this.
Activity
[-]RFC remove allow-older and allow-newer supoort from Setup.hs[/-][+]RFC remove allow-older and allow-newer support from Setup.hs[/+]ezyang commentedon Jul 21, 2016
OK, fine. But we need a test which demonstrates that
--exact-configurationis sufficient to override the package'sbuild-depends.kosmikus commentedon Jul 21, 2016
Seems I'm missing a whole lot. In particular, I have not the slightest idea what
--exact-configurationis or does. Where can I read up on this?ezyang commentedon Jul 21, 2016
@kosmikus The situation is that Cabal the library has a miniature dependency solver, which picks dependencies when a user runs
./Setup configure. This solver is run even when you say--dependency="foo=foo-0.5-blahblah"because you may not have specified a complete set of dependencies and flags. Of course, if you're runningcabal-install, by the time you get to the setup script you know exactly what dependencies you want. So you can then say./Setup configure --exact-configuration --dependency="foo=foo-0.5-blahblah"and then no solver is run; we just take the command line arguments on faith.exact-configurationis completely undocumented and I know about it from reading theconfiguresource code.23Skidoo commentedon Jul 22, 2016
Well, the reason it was added was because a user requested it. If @snoyberg no longer needs it, we can reconsider, but I don't think removing it buys us that much. #3165 added ~100 lines total, and more than half of those were comments and tests.
snoyberg commentedon Jul 22, 2016
CCing @mgsloan, who will know more about this than I do.
Implement `--allow-older` (dual to `--allow-newer`) (#3466)
mgsloan commentedon Aug 10, 2016
We don't need such a flag. I recall a discussion that likely caused this to be implemented.
stack build --allow-neweris more permissive than cabal-install's allow-newer. It causes all version constraints to instead be warnings. As far as I know, cabal-install does not have this capability. I guess it would mean installing all the latest versions, maybe?Remove --allow-{newer,older} support from Cabal
acertain commentedon Aug 27, 2018
Nix currently runs
Setup.hs, and notcabal configure(or any cabal command), so this is needed to avoid modifying cabal files afaik (which on nix is fairly involved). I was using this.EDIT: Nevermind, nix has
doJailbreak