Hi Everyone, I want to discuss an issue that I’ve been running into whenever I needed to upgrade GHC versions recently. I know from past experience that some projects only ever need to deal with GHC upgrades once every few years, but with my current hat, I end up doing that quite often with little projects at work that are still actively used but not actively developed.
The recurring issue I run into is that these packages resist GHC upgrades due to very minor problems. Like version bounds that are unnecessarily restrictive, or when
not getting exposed from mtl
anymore, or a failure due to a minor change in type inference, requiring a very simple change to the type class context of a function etc. If it were not for the bureaucracy of these failures happening in transitive dependencies, these would be 2-minute fixes.
Every time this happens, I want to open a PR to the problematic repo, but I find out that there’s already a PR from 6 months ago that fixes the GHC upgrade, sitting there completely ignored. So I end up adding the fix commit to the cabal.project
file as a source-repository-package
and move on, but I feel dissatisfied every time I do so. That’s because:
- There’s no way to share
cabal.project
between repos, so I have to do it in every such project -
source-repository-package
's aren’t actually that ergonomic, because they (and their dependents) are then considered local packages and that causes a variety of ergonomics issues (which I won’t go into). - It saddens me to see that another one of our dependencies is abandoned and we should probably move away from it.
Putting aside the gloomy discussions about the decline of Haskell, I tend to think we have another problem in our hands here, because I see this happening to popular packages as well. I don’t want to name specific packages, but when this issue happens I see that somebody has opened the GHC upgrade fix PR within a few days of the release of the GHC version in question. I also see PRs from other contributors adding new features to the package, all ignored for the last few months.
Regardless of what might or might not be happening to the Haskell ecosystem at large, what I often observe with these popular packages seems to me like a bureaucratic issue. You could justifiably tell me that I should adopt these projects myself then, and I would indeed be willing to do so, but that’s not the kind of process one is typically willing to go through in the middle of upgrading the GHC of an occasionally developed project.
What do you think is the solution here? What do other language ecosystems do? What do you think is the best way I could try to improve the situation?