Live data from Hacker News

Please – A cross-language build system

please.build

201–210 of 257 posts

Re: Please – A cross-language build system

#201

Earlier quoted context omitted.

> Here's an example of a minimal makefile: Your example does not contradict what I wrote. You manually specified the tool to be run ($CC) and all of the arguments to that tool. It's true that there is a level of indirection through the $CC variable, but you're still operating at the level of specifying a tool's command-line. > There's no reason this shouldn't be possible with make; it just hasn't been implemented so.…

> You manually specified the tool to be run ($CC) and all of the arguments to that tool Notably, I didn't specify the arguments to be used to compile the source files. But if you insist: linklibrary = $(CC) -shared -o $1 $2 libfoo.so: $(OBJ) $(call linklibrary,$@,$(OBJ)) Notably, linklibrary can be defined according the platform, or according to dynamically set variables, giving you the same level of flexibility as m…

> Then you specify that the source files depend on the makefile.

Then you gratuitously rebuild everything whenever the Makefile changes, even if you only changed a comment.

Also this scheme is incorrect if the Makefile was written to allow command-line overrides of variables like CFLAGS, as many Makefiles do.

But these are just details. The larger point is this. The language of Bazel is defined such that builds are automatically correct and reproducible.

While it's true that Make has some facilities like "call" that support some amount of abstraction, it is up to you to ensure the correctness. If you get it wrong, your builds are back to being non-reproducible.

It's like the difference between programming in a memory safe vs a memory unsafe language. Sure, every thing you can do in the memory safe language can be done in the unsafe language. But the unsafe language has far more footguns and requires more diligence from the programmer to get reasonable results.

Re: Please – A cross-language build system

#202

Earlier quoted context omitted.

> Here's an example of a minimal makefile: Your example does not contradict what I wrote. You manually specified the tool to be run ($CC) and all of the arguments to that tool. It's true that there is a level of indirection through the $CC variable, but you're still operating at the level of specifying a tool's command-line. > There's no reason this shouldn't be possible with make; it just hasn't been implemented so.…

> You manually specified the tool to be run ($CC) and all of the arguments to that tool Notably, I didn't specify the arguments to be used to compile the source files. But if you insist: linklibrary = $(CC) -shared -o $1 $2 libfoo.so: $(OBJ) $(call linklibrary,$@,$(OBJ)) Notably, linklibrary can be defined according the platform, or according to dynamically set variables, giving you the same level of flexibility as m…

‘same level of flexibility as make’ should read ‘same level of flexibility as bazel

Re: Please – A cross-language build system

#203
post #18

Earlier quoted context omitted.

So what language do you build with it? And why was it better than the traditional build system of that language?

I've used it for Python, C, and some Go. The huge benifit of bazel-like build systems isn't that it's better then a languages build system, it's that it's the best every language build system. It's consistent between all languages and supports a lot of functionality. For example the proto_library and grpc_library rules make building microservices extremely easy. You can build an entire service in like 3 lines of boil…

[deleted]

Re: Please – A cross-language build system

#204

Earlier quoted context omitted.

> Here's an example of a minimal makefile: Your example does not contradict what I wrote. You manually specified the tool to be run ($CC) and all of the arguments to that tool. It's true that there is a level of indirection through the $CC variable, but you're still operating at the level of specifying a tool's command-line. > There's no reason this shouldn't be possible with make; it just hasn't been implemented so.…

> You manually specified the tool to be run ($CC) and all of the arguments to that tool Notably, I didn't specify the arguments to be used to compile the source files. But if you insist: linklibrary = $(CC) -shared -o $1 $2 libfoo.so: $(OBJ) $(call linklibrary,$@,$(OBJ)) Notably, linklibrary can be defined according the platform, or according to dynamically set variables, giving you the same level of flexibility as m…

> ‘Nobody's done it yet, ergo it's not possible or easy’ is not a valid argument.

Ultimately, make and co are text oriented, while bazel and co are object oriented. Hacking object oriented capabilities into a text-oriented language isn't particularly fruitful or ergonomic.

Re: Please – A cross-language build system

#206
post #140

> If you're familiar with Blaze / Bazel, Buck or Pants you will probably find Please very familiar Yes, so why would I use Please over any of them? I've spent close to 10min reading and have no idea why this exists or why anyone would use it. It looks like Bazel with a different config format, in which case why wouldn't one just use Bazel?

From their FAQ: >Why use Please instead of Bazel, Buck or Pants? >All four of these systems are quite closely related in the scheme of things, being inspired by (or in Bazel's case, a direct open sourcing of) Google's Blaze. >Several of us had worked at Google and used Blaze extensively there; we were excited about it being open sourced as Bazel but by then we were already using Please internally. It's a great system…

That's a lot of text to say three things: doesn't use JVM, has test sandboxing, and the DSL is "more correct". This doesn't tell me what I want to know.

Re: Please – A cross-language build system

#207
post #45

Earlier quoted context omitted.

Devs on Unix are by the far the worst when it comes to writing cross platform code. This is written in go! How isn't it cross platform?!

Maybe if windows were free to use, folks who are volunteering their time and energy would be more prone to support it. Alas...

Macos is free to use?

Re: Please – A cross-language build system

#208

"Please supports Linux, macOS and FreeBSD at the moment" Let me know when I can actually use this on any machine I have to work on, instead of going "fuck you, Windows users". Writing cross-platform build tooling isn't rocket science, it's a choice. And the choice made here is stupidly disappointing in near as makes no difference 2021.

It’s not just a choice. It’s also the kind of tooling the people developing the system have at their disposal. For example, if all I have is a MacBook running macOS and Docker, how can I reasonably expect to port this to Windows? I haven’t owned a Windows machine for 10 years. I am the author of Buildbarn, a build cluster implementation for Bazel/Pants/.... Buildbarn also doesn’t support Windows. If someone sent me h…

What are you doing that requires kernel specific code? Shouldn't you just be using cross platform libraries?

Re: Please – A cross-language build system

#209
post #166

Earlier quoted context omitted.

Make does support multiple outputs, though the syntax sucks. Most of what you are annoyed with though is like being annoyed at C for the same reasons: Make is a programming language with a built-in dependency mechanism, and as such you can use it to build whatever you want... now, does it already come with whatever you want? No. I can appreciate wanting something which does. But such systems usually then give you wha…

> Make does support multiple outputs, though the syntax sucks. No, it doesn’t. There’s NO syntax for multiple outputs. If you can show me what the syntax is and prove me wrong, I’d love to see it. At best, there are workarounds for the lack of multiple output support, with various tradeoffs. > Make is a programming language with a built-in dependency mechanism, and as such you can use it to build whatever you want...…

The big advantage of make to me is I understand it and can figure out what happens when things go wrong. When something doesn't work the way I want with cmake or autotools (I haven't used Bazel etc.), I have to randomly start googling things. Sometimes I literally resort to editing the generated cmake Makefiles because I have no idea how to tell cmake what I want it to do...

Re: Please – A cross-language build system

#210
post #208

Earlier quoted context omitted.

It’s not just a choice. It’s also the kind of tooling the people developing the system have at their disposal. For example, if all I have is a MacBook running macOS and Docker, how can I reasonably expect to port this to Windows? I haven’t owned a Windows machine for 10 years. I am the author of Buildbarn, a build cluster implementation for Bazel/Pants/.... Buildbarn also doesn’t support Windows. If someone sent me h…

What are you doing that requires kernel specific code? Shouldn't you just be using cross platform libraries?

I make use of openat() and friends to safely populate and interact with build environments on disk.

I perform scanning of process tables to kill lingering processes. Go has no functions for that in its standard library. There are some third party libraries for that, but they are all of pretty poor quality. They are slow.

Post reply on HN