I used to be a Java developer for a long time, but recently, I joined a Haskell team. In the java world, if you have a large project, with several teams working on it, a common approach is to use an artifact server such as Maven to ease and speed-up the development. Numerous build tools, such as Ant, Maven, Gradle, can build the project and upload a jar file to the artifact server that can be used by the rest of the team without pain. Therefore, by splitting the project into smaller sub-projects, the build time is also drastically reduced.
On the Haskell side,
we are using cabal
to build the project.
Our project takes about 10-15 minutes to build without optimization on.
It takes a few hours if compiler optimization is turned on, which is painful.
I wonder, how we can do the same thing as we do in Java here. Is there an easy way to compile and upload the binary of the packages (libraries) to an artifact server and use the prebuilt binaries at the build time? I know that since Haskell generates machine code (rather than byte code in Java) there might be compatibility issues, but we can probably have different binaries for different architectures/OSs stored on the artifact server.