-
Notifications
You must be signed in to change notification settings - Fork 697
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
Ignore ~/.cabal if $XDG_CONFIG_HOME/cabal/config exists. #8877
Conversation
It now warns only when |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It’s my understanding that there’s no way we can test that it does the right thing, is there?
I’m not worried about repetitive warnings: it won’t happen too often, and really the user should make sure that there’s only one thing exists. |
In principle it is possible to do so in an ad-hoc manner (after all, I tested it manually), but I don't know whether cabal's test suite is set up to make it easy. |
What's the status here? Let me add a needs-review label in case it's ready for review... |
I don't remember anything left to do here. There are no tests, though. |
@athas If you could write down some instructions for QA testers so that they can manually check your patch, that would be grand. :) |
Sure. There are the following situations to test, based on which files and directories exist. Their contents do not matter.
|
@athas: it's normally PR author's role, but let me set the label in the interest of merging this, before CI breaks or something. :) This will also unblock QA, which happens after the merge. |
@mergify backport 3.10 |
✅ Backports have been created
|
@mergify unqueue |
☑️ The pull request is not queued |
@mergify queue |
🛑 The pull request has been removed from the queuePull request #8877 has been dequeued due to failing checks or checks timeout. You can take a look at In case of a failure due to a flaky test, you should first retrigger the CI. |
@mergify refresh |
✅ Pull request refreshed |
There's a funny Mergify failure here :
I don't understand why Mergify (apparently) tries to modify the workflow file... |
Googling gives this: Mergifyio/mergify#5055 supposedly resolved by this comment:
I don't see anything like that in the dashboard but on one of the tabs it says that I should be an GH Org admin to fiddle with "Application keys", which I'm not sure whether it's related or not. https://dashboard.mergify.com/github/haskell/application-keys |
Is something more expected of me? It's not that I would mind writing automated tests, but someone gave me the impression that it would not be easy to fit into cabal's current test infrastructure. I'm fine with adding some more furniture, but I don't currently have the time to rework the plumbing. |
@athas: I wasn't the reviewer, so I don't know, but this PR is certainly ready to be merged and 3.10.2.0 release is blocked by it, so we are currently most of all fighting the random technical obstacles to that effect. Thank you for asking, though. :) |
@mergify rebase |
✅ Branch has been successfully rebased |
@athas I think your job is done here, thanks a lot! Let's keep in touch: XDG is a rather fundamental change, and I expect more questions will need to be discussed in the future. |
* Ignore ~/.cabal if $XDG_CONFIG_HOME/cabal/config exists. * Also document this. * Slightly fewer warnings. * Use verbosity flag. * Better text. * Oops (cherry picked from commit 784d13b)
Ignore ~/.cabal if $XDG_CONFIG_HOME/cabal/config exists. (backport #8877)
Manual QA succeeded for the provided steps, if anyone is interested here is the console output: |
Great! 🎉 |
Thanks, this works for me in the semi-wild with cabal 3.10.2.0-alpha1. I had no idea I have cabal configs in both locations and it detected it. Here's my battle report from the Matrix channel: FYI, I'm dog-fooding the centos7 flavour of cabal 3.10.2.0-alpha1 from https://gitlab.haskell.org/haskell/cabal/-/jobs/1651797/artifacts/browse/out/
(and the message is repeated twice, but that's probably unavoidable; IDK) |
We have the option of mentioning We can also link to the manual: https://cabal.readthedocs.io/en/3.10/config.html#configuration-file-discovery |
@Mikolaj Do you think this warrants a patch? |
If I'm wrong and the message duplication is easy to fix, then a patch would be helpful. Then we could also make the mentions of directory I think there's absolutely no rush. The problems are minor and the changes will be backward compatible, so they don't need to be included this release. But I may be misunderstanding any of the above. |
This is a draft implementation of #8577.
There is one flaw in this implementation: the warning is printed many times, and with non-configurable verbosity. Changing that would require one of:
getDefaultDir
is called, which has non-local implications.Please include the following checklist in your PR:
Please also shortly describe how you tested your change. Bonus points for added tests!