Skip to content
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

Stop depending on aeson-better-errors #2621

Open
janmasrovira opened this issue Feb 5, 2024 · 0 comments
Open

Stop depending on aeson-better-errors #2621

janmasrovira opened this issue Feb 5, 2024 · 0 comments
Assignees
Labels
Milestone

Comments

@janmasrovira
Copy link
Collaborator

The library is not currently maintained. See this comment.

I don't have bandwidth to help maintain this project at the moment. Perhaps one of the other people who have commit access can help though

paulcadman pushed a commit that referenced this issue Feb 7, 2024
This PR updates the stackage LTS resolver to `nightly-2024-02-06` which
uses GHC 9.8.1

## Upgrade notes

You will need to update your HLS to
[2.6.0.0](https://github.com/haskell/haskell-language-server/releases/tag/2.6.0.0),
this release contains support for GHC 9.8.1

## Fixes

### `haskeline` / `repline`

We have removed the custom haskeline / repline forks used in the build.
This is because we had trouble overriding haskeline as it is bundled
with GHC and the stackage resolver uses this bundled version. We were
using a custom fork of haskeline to implement
[mapInputT_](https://github.com/anoma/juvix/blob/15c0685c911a7ce3d2ee8c1597a1e6dd96e707bf/app/Commands/Repl.hs#L409)
in the Juvix REPL, required to implement error handling. This requires
private API from the Haskeline library.

Instead of using a custom fork we use TemplateHaskell to obtain access
to the private API we need. See
[DarkArts.hs](https://github.com/anoma/juvix/blob/15c0685c911a7ce3d2ee8c1597a1e6dd96e707bf/src/Juvix/Prelude/DarkArts.hs)
and
[HaskelineJB.hs](https://github.com/anoma/juvix/blob/15c0685c911a7ce3d2ee8c1597a1e6dd96e707bf/app/HaskelineJH.hs).

To obtain access to the private API, we adapted a method from [a Tweag
blogpost](https://www.tweag.io/blog/2021-01-07-haskell-dark-arts-part-i/)
and [repo](https://github.com/tweag/th-jailbreak) - updating it for GHC
9.8.1.

### `aeson-better-errors`

The `aeson-better-errors` library has not been updated to work with
`mtl-2.3.0` so it cannot work with the new stackage resolver. We are
using a [fork](https://github.com/Vekhir/aeson-better-errors.git) which
has been updated.

We should consider replacing this library in future, see
#2621

###  `path`

The `path` library now includes API `splitDrive` and `dropDrive` so we
can remove our versions of those functions from the prelude.

### `with-utf8`

We no longer need to depend on `with-utf8`. We were using this package
for UTF-8 versions of `readFile` and `writeFile` APIs. These APIs are
now available in the `text` package.

### Compiler warnings

GHC 9.8.1 introduces several new compiler warnings. 

* We have suppressed `missing-role-annotations` and
`missing-poly-kind-signatures`
* We added our own versions of `head` and `tail` to work around the new
`partial-tx` warning introduced for those functions in `Data.List`.
* We fixed up the code to avoid the
[term-variable-capture](https://ghc.gitlab.haskell.org/ghc/doc/users_guide/using-warnings.html#ghc-flag--Wterm-variable-capture)
warning.
@janmasrovira janmasrovira self-assigned this Feb 19, 2024
@paulcadman paulcadman added this to the 0.6.4 milestone Jun 18, 2024
@paulcadman paulcadman modified the milestones: 0.6.4, 0.6.5 Jul 2, 2024
@paulcadman paulcadman modified the milestones: 0.6.5, 0.6.6 Jul 19, 2024
@paulcadman paulcadman modified the milestones: 0.6.6, 0.6.7 Aug 15, 2024
@paulcadman paulcadman modified the milestones: 0.6.8, 0.6.9 Nov 11, 2024
@janmasrovira janmasrovira modified the milestones: 0.6.9, Sanalejo Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants