Problem: we want to make a new release to support latest
GHC versions, but there was a deprecation in recent changes.
Solution: make a major version bump, set the new version to
1.1.0.0.
Problem: text-2.1 has Data.Text.IO.Utf8 whose name conflicts with
our module with the same name.
Solution: our module contains 2 functions: `readFile` and `writeFile`.
They are implemented differently from `text` versions, but look
semantically equivalent. Our functions are also polymorphic in the
monad type, but that's orthogonal to the purpose of this package,
so we can sacrifice this polymorphism.
So it looks like our module doesn't add much value anymore and should
be deleted.
However, it's a good practice to deprecate something before deleting,
so we deprecate this module instead. It will be deleted in a future
version.
Note that the same module for lazy Text remains intact, since there
are apparently no such functions for lazy Text in text-2.1.
Problem: tests do not compile when text-2.1 is used, because
there are is a conflict in module names.
`Data.Text.IO.Utf8` was added to `text` in version 2.1.
GHC reports ambiguous modules error.
Solution: specify the package explicitly using the PackageImports
extension.
Problem: recent Hlint fails on Main.hs thinking that
enabling TemplateHaskell is redundant.
Solution: it seems to be a bug which is fixed upstream,
but the fixed version is not released yet.
So we just ignore that warning.
Problem: node16 is now deprecated and github-runner provided by nixpkgs
no longer supports this runtime. However, "actions/checkout@v3" uses
this runtime.
Solution: Update CI pipeline to use "actions/checkout@v4".
We want to release a version which supports text-2.0.* and newer GHC.
Note: I have deleted the hash from the .cabal file, because it's more
convenient when this file is in the repo.
Problem: We have introduced a new template for Haskell libraries and
need to update this package according to this template.
Solution: Use new template, bump dependencies, remove unused license,
apply formatting and hlint suggestions.
text-2.0 has been released and everything seems to be working just fine.
I tested with it on GHC 8.10.7 and GHC 9.2.1. I could not test on 9.0.1
due to technical difficulties with haskell.nix, but I suppose it works.
The issue with haskell.nix is that text-2.0 broke an internal interface
used by hashable, so we need a new hashable, but it fails to build for
an unknown reason.
Previously, we were pinning Nix dependencies, such as haskell.nix
manually. Now we simply rely on Serokell’s flake registry, which has the
right versions pinned that are available in the binary cache.
Problem: Compilation of the executable on Windows fails with 'Module
`GHC.IO.Encoding.Iconv' does not export `localeEncodingName'`
Solution: Check if we are on Windows, and don't import such module or
use `localeEncodingName` if it's the case.