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
new-build produces bad error message on missing cabal.project #3636
Sigh... I suppose the labels mean that I really should do this...? I'm just (semi-)joking, I'd be happy to, given the hint.
Aside: Why are we relying on overriding defaults in this manner? Shouldn't we just have a (huge) sum type for every single error that Cabal/cabal-install can show and then be forced to implement a human-readable error message? (I'm sure I'm doing a "couldn't we just..." type thing here, but...)
(Assigning to self in the hope of finally starting to contribute to Cabal again.)
@BardurArantsson, if you want to rip out and rewrite all of the error reporting code in cabal-install, I will support the endeavor. But I'd want to see some sort of style guideline come out of it, saying, "This is how we deal with error reporting in cabal-install" (and ideally also, "here's why"). So that if I'm a not-paying-very-much-attention developer and I need to add an error, I know what to do, it is not hard to do "the right thing".
Could someone check what this does now (since #3774 added proper messages), and suggest changes to the error message that would make it more appropriate for the situation where there is no explicit cabal.project file. The current message is written assuming there is one and the user groks this.
If someone (@alanz ?) wants to look at this, you'd want to extend the plumbing so that the exception we throw contains info on whether or not the project config was from an implicit project file on an explicit one (perhaps even with file path location). This would probably require extending the ProjectConfig itself with a field that says if it originated from a implicit or explicit cabal.project (again, perhaps with file path).
Activity
BardurArantsson commentedon Jul 28, 2016
Oh, and the exact cabal-install version I'm running is commit b7b666e
dcoutts commentedon Aug 11, 2016
Just need to add
displayExceptionmethod to theinstance Exception BadPackageLocationsto give a nice human readable message.BardurArantsson commentedon Aug 12, 2016
Sigh... I suppose the labels mean that I really should do this...? I'm just (semi-)joking, I'd be happy to, given the hint.
Aside: Why are we relying on overriding defaults in this manner? Shouldn't we just have a (huge) sum type for every single error that Cabal/cabal-install can show and then be forced to implement a human-readable error message? (I'm sure I'm doing a "couldn't we just..." type thing here, but...)
(Assigning to self in the hope of finally starting to contribute to Cabal again.)
ezyang commentedon Aug 12, 2016
@BardurArantsson, if you want to rip out and rewrite all of the error reporting code in cabal-install, I will support the endeavor. But I'd want to see some sort of style guideline come out of it, saying, "This is how we deal with error reporting in cabal-install" (and ideally also, "here's why"). So that if I'm a not-paying-very-much-attention developer and I need to add an error, I know what to do, it is not hard to do "the right thing".
alanz commentedon Aug 29, 2016
Ping @BardurArantsson: Are you still working on this? I'm looking for a trivial getting started issue.
BardurArantsson commentedon Aug 29, 2016
No, it fell through the cracks. Feel free to take a swing at it.
Add test documenting existing (bad) behaviour
Produce better error message for missing config
dcoutts commentedon Sep 8, 2016
Could someone check what this does now (since #3774 added proper messages), and suggest changes to the error message that would make it more appropriate for the situation where there is no explicit cabal.project file. The current message is written assuming there is one and the user groks this.
If someone (@alanz ?) wants to look at this, you'd want to extend the plumbing so that the exception we throw contains info on whether or not the project config was from an implicit project file on an explicit one (perhaps even with file path location). This would probably require extending the ProjectConfig itself with a field that says if it originated from a implicit or explicit cabal.project (again, perhaps with file path).
ezyang commentedon Sep 8, 2016
Same old:
dcoutts commentedon Sep 15, 2016
@ezyang what is
cabal-shakedoing? Does its top level exception handler useshowordisplayException?ezyang commentedon Sep 15, 2016
Oh, the alias was pointing at an old binary. OK this is fixed in HEAD.
Use stderr for Cabal's diagnostic messages instead of stdout
Use stderr for Cabal's diagnostic messages instead of stdout
Use stderr for Cabal's diagnostic messages instead of stdout
Use stderr for Cabal's diagnostic messages instead of stdout
Use stderr for Cabal's diagnostic messages instead of stdout