My colleague has been trying to install OPAM and the packages he needs for a closed source project he’s joined. He’s not an OCaml guy, and he’s hitting pain points that I’ve only felt a little bit of, which are serious issues in our community.
The basic issue is that people just aren’t maintaining their packages. They don’t maintain their package constraints, they don’t update their code to work with recent OCaml versions, and many of them don’t even have github repos, so you can’t easily do some of the work for them. These are the pain points that used to weigh down the haskell world, turning eager people (like myself) away from their ecosystem.
The organization that my colleague is contributing to uses 4.02.0 by default in their VMs. My colleague first decided not to veer from this choice before he knew better, so he installed OPAM and then 4.02.0. Merlin, however, doesn’t support this version. So my friend said ‘to heck with it’, and installed 4.04.3. Well, there was another library that hadn’t updated their OPAM file to support anything past 4.04.1 (currently escapes me which one – I posted a github issue on their project page). As he was about to finish his build, he found out that mlgmp doesn’t support anything past 4.03. Not only that, mlgmp doesn’t even have a github site. So now he’s going to try 4.02.3 and hope for the best. At every recompilation, OPAM goes and rebuilds things over and over again, making things even slower (I made another post about this).
Needless to say, this is an atrocious user experience. I would not blame anyone for leaving OCaml and never looking back after this kind of experience.
We need to figure out how to improve this situation, but I’m not sure what to do. There needs to be some curation work here, I think. A subset of packages could attain ‘curated’ status, which would place expectations on their maintainers when they break. Some packages are already in this subset implicitly –
merlin, containers etc. At the very least, there should be a minimal expectation for every package to be on github in order to be included in OPAM. It would also be nice if there was a mechanism to pass down ownership of a package in OPAM if a package author doesn’t update his package or respond to queries.