GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2019-07-07T18:33:53Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/10785ghc-pkg appends colon to db path when piped/redirected2019-07-07T18:33:53Zjgertmghc-pkg appends colon to db path when piped/redirectedQuite simple. Compare the first line of output from
```sh
ghc-pkg list
ghc-pkg list | head
```
In the second command's output, a colon gets appended at the end of the first line, compared to the first command. This is generally undesir...Quite simple. Compare the first line of output from
```sh
ghc-pkg list
ghc-pkg list | head
```
In the second command's output, a colon gets appended at the end of the first line, compared to the first command. This is generally undesired behaviour, since the intent of redirection is to further process the output of the original command.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 7.10.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | ghc-pkg |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"ghc-pkg appends colon to db path when piped/redirected","status":"New","operating_system":"","component":"ghc-pkg","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"OwnedBy","contents":"jgertm"},"version":"7.10.2","keywords":["colon","ghc-pkg","list","pipe","redirect"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Quite simple. Compare the first line of output from\r\n{{{#!sh\r\nghc-pkg list\r\nghc-pkg list | head\r\n}}}\r\n\r\nIn the second command's output, a colon gets appended at the end of the first line, compared to the first command. This is generally undesired behaviour, since the intent of redirection is to further process the output of the original command.","type_of_failure":"OtherFailure","blocking":[]} -->8.0.1jgertmjgertmhttps://gitlab.haskell.org/ghc/ghc/-/issues/9606Improve outdated ghc-pkg cache warning2019-07-07T18:39:50ZNiklas Hambüchenmail@nh2.meImprove outdated ghc-pkg cache warningSometimes you get this:
```
WARNING: cache is out of date: /home/user/.ghc/x86_64-linux-7.8.3/package.conf.d/package.cache.
Use 'ghc-pkg recache' to fix
```
The warning is correct but a bit confusing, because running `ghc-pkg recache` ...Sometimes you get this:
```
WARNING: cache is out of date: /home/user/.ghc/x86_64-linux-7.8.3/package.conf.d/package.cache.
Use 'ghc-pkg recache' to fix
```
The warning is correct but a bit confusing, because running `ghc-pkg recache` does nothing here: It will by default update your global package DB, and the DB the warning is about will still be out of date.
This seems to have frustrated others as well: https://gist.github.com/mcandre/5789498
I suggest we make the message more clear: `You might have to pass --user to update this cache file`.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 7.8.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | ghc-pkg |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | nh2 |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Improve outdated ghc-pkg cache warning","status":"New","operating_system":"","component":"ghc-pkg","related":[],"milestone":"7.10.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.8.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":["nh2"],"type":"Bug","description":"Sometimes you get this:\r\n\r\n{{{\r\nWARNING: cache is out of date: /home/user/.ghc/x86_64-linux-7.8.3/package.conf.d/package.cache.\r\nUse 'ghc-pkg recache' to fix\r\n}}}\r\n\r\nThe warning is correct but a bit confusing, because running `ghc-pkg recache` does nothing here: It will by default update your global package DB, and the DB the warning is about will still be out of date.\r\n\r\nThis seems to have frustrated others as well: https://gist.github.com/mcandre/5789498\r\n\r\nI suggest we make the message more clear: `You might have to pass --user to update this cache file`.","type_of_failure":"OtherFailure","blocking":[]} -->8.0.1https://gitlab.haskell.org/ghc/ghc/-/issues/9133Improve parser error reporting in `ghc-pkg`2019-07-07T18:41:44ZHerbert Valerio Riedelhvr@gnu.orgImprove parser error reporting in `ghc-pkg`Here's what I was confronted recently due to a broken sandbox environment:
```
$ cabal info parsec
cabal: ghc-pkg: Data.Binary.Get.runGet at position 9583: demandInput: not enough bytes
```
The main problem is that this message is not ...Here's what I was confronted recently due to a broken sandbox environment:
```
$ cabal info parsec
cabal: ghc-pkg: Data.Binary.Get.runGet at position 9583: demandInput: not enough bytes
```
The main problem is that this message is not very helpful (other than telling that `ghc-pkg` wasn't able to do something). Duncan told me, that the recent `binary` API now provides better facilities for error reporting. That could be used to improve the UI of `ghc-pkg` when reporting errors.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 7.8.2 |
| Type | Task |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | ghc-pkg |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | duncan |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Improve parser error reporting in `ghc-pkg`","status":"New","operating_system":"","component":"ghc-pkg","related":[],"milestone":"7.10.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.8.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":["duncan"],"type":"Task","description":"Here's what I was confronted recently due to a broken sandbox environment:\r\n\r\n{{{\r\n$ cabal info parsec\r\ncabal: ghc-pkg: Data.Binary.Get.runGet at position 9583: demandInput: not enough bytes\r\n}}}\r\n\r\nThe main problem is that this message is not very helpful (other than telling that `ghc-pkg` wasn't able to do something). Duncan told me, that the recent `binary` API now provides better facilities for error reporting. That could be used to improve the UI of `ghc-pkg` when reporting errors.","type_of_failure":"OtherFailure","blocking":[]} -->8.0.1