-
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
Don't error if package index is missing (fix #10504) #10506
Conversation
As per my comments in #10504 I've come around to seeing this as the correct fix. If the missing package index causes problems down the line we'll error anyway. If not, then this is intended behavior and warning is fine. The semantics of active-repositories is that it picks which of the repositories cabal pulls from are active and in what order -- it was not designed to choose which repositories cabal connects to entirely. |
3214a1d
to
557e7bf
Compare
The test failure is interesting: -Error: [Cabal-7160]
-The package list for 'repo.invalid' does not exist. Run 'cabal update' to download it.
+Warning: The package list for 'repo.invalid' does not exist. Run 'cabal update' to download it.
+Error: [Cabal-7100]
+There is no package named 'a-b-s-e-n-t'.
+You may need to run 'cabal update' to get the latest list of available packages. Arguably, failing earlier in this case is preferable because the reason we failed is not that something is inherently wrong with the So, in this case, I'd argue that reverting the error mode makes the error message worse. |
557e7bf
to
88c4e3d
Compare
For posterity: on today's Cabal meeting people agreed that we want to revert it, if only temporarily, until a better solution is found, in the interest of releasing 3.14 without this overly strict behavior. |
All of the packages Cabal needs may already be present in the local package database; we don't know yet! This is a partial revert of #8944. See: #8944 (comment)
88c4e3d
to
d58a75e
Compare
@mergify backport 3.14 |
✅ Backports have been created
|
Cherry picked MercuryTechnologies@ec242b1
Would be great to have a test...
Template Α: This PR modifies behaviour or interface
Include the following checklist in your PR: