-
Notifications
You must be signed in to change notification settings - Fork 711
Is ~/.cabal/config supposed to be used when exists, in the absence of envvars and XDG folder? #10713
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
Comments
Folks, what's needed to make progress on this issue? Could you please decide what is the expected behavior? Is it a bug in documentation or a bug in implementation? |
The existence of the Lines 63 to 67 in ed1e4d7
|
This backwards compatibility logic is pretty convoluted. Maybe it is better to start removing it. |
@athas so you are saying that in the passage I quoted |
@Mikolaj @ulysses4ever @geekosaur @ffaf1 et al., any chance you can discuss the issue and decide who is correct, documentation or implementation, please? |
I suggest simplifying the implementation by removing some of the convoluted backwards compatibility logic. The implementation reflects the behaviour that was decided on in the various PRs and issues that led to it. The documentation does explain all of the mechanisms, although perhaps it is too scattered. Of course I have no opposition to improving the clarity of the documentation. |
I worry somewhat about the repercussions of changing the logic, especially since I still have to maintain a mode-0 file |
A simplification would be to say that |
Regarding the documentation, yes, let's please improve it and let's make sure it explains the current implementation clearly. Regarding simplifying the backward compatibility logic, IMHO, that train has sailed and now we are precisely in the period where predictable backward compatibility is essential. So, unless things are very broken, which I hope they are not, I'd recommend to wait with simplifying or removing the machinery until backward compatibility is not needed for 99.99% of users (e.g., thanks to old tools, tutorials and workflows that don't understand XDG being obsolete also due to other format or semantics changes and so won't be expected to inter-operate with new cabal binaries). I guess that's a few years of waiting. This is tricky --- let's not forget we spent a lot of time discussing and approving this imperfect scheme and then IIRC we tweaked it radically once close enough to when it was released and, apparently, this is still not perfect. But it works. |
I am also reluctant to reopen that can of worms, but I do believe that if any change to the implementation is done, it should solely be to remove special cases. The best timing of such changes is not something I know much about. I don't know when the backwards compatibility stops being necessary, but it is my impression that the rate of users updating their Haskell tooling has increased significantly since the good old days when everyone used a |
I expect that backward compatibility setup has ensured that people haven't moved to use new locations, except if they got brand new machines and made new clean setups. In that light, two years is a short time. |
For the record, I was against backward shimming, and I'm still against The fact that writing clear documentation is hard is a hint that design is too convoluted. EDIT: The problem with |
I have made a PR that adds further clarification to the documentation: #10972 |
I must note that I need to use |
I don't see a hard coded
And specifying fully explicit config with all paths explicitly pointing somewhere shouldn't be an issue there. Rather the opposite, the less external and implicit factors affecting stuff there are the easier it should be to write environment independent tests. |
I didn't dig up exactly what was failing, just that it's documented (and I keep getting reminded every time I run it) that it doesn't work with XDG paths and I have to force it to look in the right place for my XDG config. |
Documented where? https://github.com/haskell/cabal/tree/master/bootstrap#updating-bootstrap-plans Not there ATM at least. Nor in the script itself. |
Oh, I erred, it's
|
cabal/doc/config.rst
Lines 80 to 86 in ed1e4d7
The documentation means that unless
--config-file
/$CABAL_DIR
/$CABAL_CONFIG
are set explicitly,~/.cabal/config
won't ever be used even if it exists and~/.config/cabal
does not. Yet, reading https://github.com/haskell/cabal/blob/master/cabal-install/src/Distribution/Client/Config.hs, I believe this is untrue. Could it please be reconciled?Cf. haskell-CI/haskell-ci#655
The text was updated successfully, but these errors were encountered: