Hacker News new | past | comments | ask | show | jobs | submit login

Sure, I can write a script to do that.

The script can examine the dependencies, see if any of them changed and then rebuild only if needed.

It's like Greenspun's tenth law[1]:

> Any sufficiently complicated build script contains an ad hoc, informally-specified, bug-ridden, slow implementation of make.

But then, what do I need Meson for?

[1] https://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule




That's not what I meant. Of course, if you wanted to roll your own build system, you could do that. But hopefully you're aware that's not what I'm suggesting.

Meson provides custom targets, so Meson itself would examine the dependencies and rebuild if needed:

https://mesonbuild.com/Custom-build-targets.html

Obviously this might not do what you need specifically, but it does deal with some of the use cases for user-defined functions.


Of course I have custom build scripts that build a target from its dependencies. The point is that there are several such targets as part of building a single plugin. It is the build system that decides whether to run such build script and in what order in order to build the final result, depending on which sources and intermediate targets were updated.

The entire point of having functions is to capture a "recipe" for building one type of target, and then be able to reuse it again and again.


Sounds like Meson isn't a very good match for your use case. That's too bad. Good thing there are other tools like CMake which are a better fit for you. It seems like you have also lost some time attempting to port your build over to Meson and failed, which was probably really frustrating. As a result, you really dislike Meson, going so far as to call it "unfit for human consumption".

Many other people like Meson, and many large projects have gone so far as to switch to using Meson. It's great that it worked for them, and it's OK that it didn't work for you.


> Sounds like Meson isn't a very good match for your use case.

That's exactly what I've been saying.

> As a result, you really dislike Meson, going so far as to call it "unfit for human consumption".

Meson got so many things right, but this one point makes it unusable for many projects, and prevents it from being industry standard.

Let me say it again, a programming language for writing large scale programs (11,000 lines is a large scale program) without functions/subroutines is unfit for human consumption.

It is made worse by giving a blatantly wrong rationale for not having user-defined function.

The only reason I even bothered spending so much time in responding is the hope that they will reverse this idiotic position.


I guess it wouldn’t help for me to recapitulate all of the arguments made by bonzini, who actually was involved in the 11,000 lines (down from 15,000 thanks to switching to Meson). He made his arguments very cogently and you apparently either don’t understand them or don’t care to listen.

Clearly there are people who think the position isn’t idiotic, and there are large projects which decided that Meson was a great choice and chose to migrate to it. This means that Meson is fit for human consumption.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: