Live data from Hacker News

Bazel can now build Haskell

tweag.io

21–30 of 54 posts

Re: Bazel can now build Haskell

#21
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 don't think Bazel is the right tool for that niche. I don't think Bazel shines in any context other than a monorepo.

Re: Bazel can now build Haskell

#22
post #8

A significant hurdle for the universal adoption of Bazel is its too many dependencies.

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 first, by hand. Of course in the long term a little while spent installing is no big deal... but each new adopter has to get through the short term on the way to the long term.

Hopefully a future Bazel installer will "just work" on Windows as a single installation with no instructions.

Re: Bazel can now build Haskell

#23
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…

This is one of the reasons I find people put too much emphasis on programming language features and not enough on tooling. If I want to contribute to your project, learning a new language (well enough to begin submitting patches, anyway) is often a lot easier than figuring out how to build the stupid thing anyway.

Scripts for dependencies, scripts for building, scripts for packaging, and often with their own special snowflake syntaxes for each.

Go has room for improvement to be sure, but I love that I can jump into any project and run `go build`, `go test`, `go install`, etc and they do the right thing. Even if you don't know the language, it's easy to figure out what's happening because the language itself is basically just a vanilla imperative language with a GC.

Not enough languages devote enough care to their tooling, in my opinion.

Re: Bazel can now build Haskell

#24
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…

Man, this might be a dream, but it's one I'd love to see come to some form of fruition. As someone who's learned programming through self-study, the broad swath of tooling out there can be a bit of a barrier to picking up new languages and concepts, especially when the concepts related to building and delivering software are occluded by some of the opinionated decisions all the different tool sets make about how buil…

That's the idea.

Use bazel to describe and build the projects incrementally. The more languages are supported the less project-specific build systems have to be learned.

Use Nix and nixpkgs to pull external dependencies (and bazel).

Re: Bazel can now build Haskell

#25
post #18
post #17

Earlier quoted context omitted.

It's way more than that. It bundles a lot of jars --- building those from source, recursively, is a big task. (I tried building Bazel and its dependencies completely from source for Guix.)

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 sell.

Re: Bazel can now build Haskell

#26
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 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.

Re: Bazel can now build Haskell

#27
post #20

A significant hurdle for the universal adoption of Bazel is its too many dependencies.

You might like https://please.build/ . Also, I think the pants folks are considering a Rust rewrite.

They already have done so for some of it! https://github.com/rust-lang/rust-www/pull/853

Re: Bazel can now build Haskell

#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.

Re: Bazel can now build Haskell

#29
post #20

A significant hurdle for the universal adoption of Bazel is its too many dependencies.

You might like https://please.build/ . Also, I think the pants folks are considering a Rust rewrite.

Looks like please.build doesn't really have Windows support yet...

Re: Bazel can now build Haskell

#30
Seems like SCons: http://scons.org/

> Built-in support for C, C++, D, Java, Fortran, Yacc, Lex, Qt and SWIG, and building TeX and LaTeX documents. Easily extensible through user-defined Builders for other languages or file types.

Godot https://godotengine.org/ uses SCons and it's great; easy, quick and reliable.

Post reply on HN