Live data from Hacker News

Bazel can now build Haskell

tweag.io

31–40 of 54 posts

Re: Bazel can now build Haskell

#31
post #25
post #18

Earlier quoted context omitted.

I think any big Java app is a mess for distributions. They usually include a ton of jars, since they just get them "for free" when using Maven/Gradle/Ivy. Building the jars should be trivial in theory (especially for Maven), but the different between theory and practice is smaller in theory than in practice :)

Yeah, a lot of Java things require extensive patching to cut dependency cycles or to make the code compile with the current JDK. Say what you want about Autotools, but at least the user won't have to install Autotools to build the software. A build tool that depends on Java and dozens of Java libraries that have dozens of dependencies of their own, each with their own set of bootstrapping problems ... it's a tough se…

True, but as someone who has been part of that ecosystem: your standard Java developer doesn't rebuild everything. They don't want, need or have to do it. The Maven repo is immutable and very reliable. So everybody builds on top of the binaries.

Of course, there's this implicit system of trust, which might be misguided, but there's many billion dollar companies built on top of it.

Re: Bazel can now build Haskell

#32
post #11

There is no language named C/C++. There is C, and there is C++. To be taken seriously, treat them as the very different languages they are.

From the perspective of a build system, the difference between supporting C or C++ and supporting both is minor.

Speaking as someone who has made their own build system, as dumb as that is.

Re: Bazel can now build Haskell

#33
post #28
post #2

I wonder if Bazel takes off across many languages. It wouldn't hurt to have a modern autotools & co. replacement across ecosystems. I don't think it's doable, considering the fact that we have language specific package managers and build tools, but you never know. By "replacement", I mean picking up a random open source project and being able to do the equivalent of: ./configure make make install To be able to build…

Yes, look at how git basically triumphed over all other version control systems. We need a revolution like that in the space of build-tooling.

I'm not sure I like the analogy, I wish a system with a saner UI had won :)

Re: Bazel can now build Haskell

#34
post #8

Earlier quoted context omitted.

sudo apt-get install openjdk-8-jdk sudo apt-get install pkg-config zip g++ zlib1g-dev unzip python That's a fair few things, but it doesn't see that awful. None of those dependencies seem exotic. I wonder if they could get rid of Python by using Jython on top of the JDK.

Right, and a proper packaging "in the box" reduce it to a single install command on most any Linux. Right now it's pretty close to that on a Mac also if you already have brew. The current long pole in the tent is Windows. Bazel brings along its own JVM - so there isn't any Java or Java dependency difficulty (as some other posters have suggested). But the install instructions direct you to provide some dependencies fi…

Maybe they could use this for the JRE bundling: https://docs.oracle.com/javase/9/tools/javapackager.htm#JSWO...

Re: Bazel can now build Haskell

#35
post #5

Given that Nix is already popular in the Haskell ecosystem and it's also polyglot, why not build the monorepo with that instead of Bazel?

Can Nix build incrementally? One random collection of notes I just dug up says that it rebuilds packages from scratch on minor changes. It seems like Nix is addressing a different problem.

I thought that Bazel's notion of "incremental building" was at the project level of granularity too. Is that incorrect?

Re: Bazel can now build Haskell

#36
post #26

Earlier quoted context omitted.

I don't think Bazel is the right tool for that niche. I don't think Bazel shines in any context other than a monorepo.

I cannot agree with you more. The last time I look for build a bazel project with external dependency it was messy and undocumented. It was to use Tensorflow and Opencv in a standalone C++ code, tensorflow use bazel by default.

By external dependencies, do you mean things like arbitrary Git repos? There are standard rules there to accommodate things like that.

As well, this may be new documentation since you last looked, but there's https://docs.bazel.build/versions/master/external.html to read now, at least.

Re: Bazel can now build Haskell

#37
post #5

Earlier quoted context omitted.

Can Nix build incrementally? One random collection of notes I just dug up says that it rebuilds packages from scratch on minor changes. It seems like Nix is addressing a different problem.

I thought that Bazel's notion of "incremental building" was at the project level of granularity too. Is that incorrect?

Bazel recompiles at the source file level, and it's very good at only recompiling only what's necessary; for example, it caches object files for C++, and will only rebuild the object files of changed source files, and then relink.

Re: Bazel can now build Haskell

#39
post #2

I wonder if Bazel takes off across many languages. It wouldn't hurt to have a modern autotools & co. replacement across ecosystems. I don't think it's doable, considering the fact that we have language specific package managers and build tools, but you never know. By "replacement", I mean picking up a random open source project and being able to do the equivalent of: ./configure make make install To be able to build…

I doubt Bazel will take off for most open source projects due to being written in Java, but I do share the sentiment.

I've been meaning to try and write a somewhat saner build system to replace the Auto* hell, at least for C and C++. I'm focused on other things right now but I've been studying and collecting information about the architecture of many other build systems for a while, and some of them are so much ahead of those used in open source projects it's not even funny. At the very least I'll be writing a lengthy blog post with my findings.

Re: Bazel can now build Haskell

#40
post #2

I wonder if Bazel takes off across many languages. It wouldn't hurt to have a modern autotools & co. replacement across ecosystems. I don't think it's doable, considering the fact that we have language specific package managers and build tools, but you never know. By "replacement", I mean picking up a random open source project and being able to do the equivalent of: ./configure make make install To be able to build…

I doubt Bazel will take off for most open source projects due to being written in Java, but I do share the sentiment. I've been meaning to try and write a somewhat saner build system to replace the Auto* hell, at least for C and C++. I'm focused on other things right now but I've been studying and collecting information about the architecture of many other build systems for a while, and some of them are so much ahead…

The java dependency is my biggest hangup wrt to incorporating it into my own environment.

So far, I've avoided having to incorporate the JDK into my stack. Having to bring it in just for a build tool, keeping it up-to-date on developer configurations, just feels like a royal pain.

I realize it's never gonna happen, but having bazel rewritten in Go or C++ or anything else that produces a single binary would be awesome.

Post reply on HN