Live data from Hacker News

Taskfile: A Modern Alternative to Makefile

cloudnativeengineer.substack.com

191–200 of 223 posts

Re: Taskfile: A Modern Alternative to Makefile

#191

Sorry for the plug, but I can't help myself everytime I read about task managers to notice you have to learn yet another DSL. DSL are the plague of our field, for one that is useful like SQL, you have a hundred that turn your life into hell. Make's DSL is already full of gotchas, but templated YAML based DSL are just insanity. They have so many footguns, and so little flexibility and ability to be debugged. After try…

I guess that could work for a Python project, where you already have Python installed. But still you would need to set up a venv or similar to keep your system Python clean. Then you cannot run the tasks without creating that venv or similar. How to create the venv and install all the correct dev dependencies into it? You can't use the task runner yet, because you still need to install that ... Maybe a Makefile?

That's why I'm advocating for compiling tools stand alone in another comments.

Having to install doit first is indeed going to be a barrier of entry for a lot of people.

It's still worth it in my experience, but I get how it can deter users.

Re: Taskfile: A Modern Alternative to Makefile

#192
post #36

Earlier quoted context omitted.

UNIX might be standard but it doesn't make it cross platform. You might not like it but a lot of people develop on windows. Build tools that assume a unix environment is present aren't a solution.

> UNIX might be standard but it doesn't make it cross platform. You might not like it but a lot of people develop on windows. I fail to understand what point you tried to make. There are already plenty of Make implementations for Windows. If you think that installing a third party tool like Task is ok, I don't see how doing the same with a Make implementation would exclude it as a valid alternative.

I don't think using Task is better either. I was just replying to OP saying to just use unix tools. Unix tools aren't cross platform so they aren't a good build tool either.

Re: Taskfile: A Modern Alternative to Makefile

#193
post #128

Earlier quoted context omitted.

Gatekeeping the entry to learn something is never good. There’s a big difference in developing trust to contribute to a project and developing knowledge to start with a new language. And I’ve worked with tons and tons of very amazing developers who aren’t comfortable with Make or even git because their careers have been with Visual Studio and other VCS. Therefore I don’t think it’s an adequate judge of skill.

I'm pretty glad they gatekeep pilots and surgeons and all kinds of other occupations. Reading a manual, or failing to, is not gatekeeping. I learned how to write a Makefile in a few minutes, for free, with no one telling me I wasn't allowed to. There is no "gatekeeping" argument here, just whingy babies that no one should waste 10 seconds caring about.

Pilots and surgeons are following rules to avoid killing people.

Make wasn't designed with any of that in mind. It was just one or a few people deciding the easiest path to code, or a style that they preferred.

It turns out most people don't find their decisions to be intuitive or explicable even decades later.

Re: Taskfile: A Modern Alternative to Makefile

#194
post #165
post #76

Earlier quoted context omitted.

Or just don't use spaces in filenames. It just causes trouble for no benefit.

Ah yes - the user should serve the computer, not vice versa, clearly. /s, in case it's necessary.

It's the user serving themselves by naming files in a way that makes them easy to handle everywhere. There is also sorting and completion to consider in commonly-traversed directories.

Re: Taskfile: A Modern Alternative to Makefile

#195
post #27

Earlier quoted context omitted.

I remember how I promoted Git over a decade ago, and I heard from the lead guy that “SVN does the same” and “there are no benefits of using branches” (he never used them). Please listen to your coworkers and don’t be that guy. Technology moves forward, make it great, but it’s time to move on.

git's CLI is famously inconsistent, but git merge was obviously much more reliable than svnmerge.py ever had been. (I hear svn may have improved merge tracking, but I'm not going to spend more time on it.)

Git's CLI has improved over the years. E.g. git switch is a thing now. And it's quite consistent regarding order of arguments.

Re: Taskfile: A Modern Alternative to Makefile

#196
post #179

Earlier quoted context omitted.

To be fair, YAML 1.2 does not suffer from the "Norway Problem", but YAML is still a rather complex format. I feel like the Makefile syntax has some pesky warts, like not breaking when there are spaces in filenames, requiring tabs[1], the ceremony around PHONY targets... If you take the legacy stuff out of make, [1] Apparently it can be fixed with a complex .RECIPEPREFIX incantation which behaves differently in differ…

I use make for (among other things) transforming files; batch compression being the simplest example, so all one requires is a rule saying %.log.xz : %.log and all is well. But if people have colons in filenames, for example for timestamps, all bets are off, and make chokes spectacularly.

And that really sucks in Windows because every absolute path contains a colon. Not that absolute paths are common in makefiles, but it's not something that should break on a major platform.

Re: Taskfile: A Modern Alternative to Makefile

#198
post #105

Earlier quoted context omitted.

What if you use `embed`? Why rebuild the binary if you've only touched test files? Make at least theoretically gives you tools to deal with these (but between Make and Go they're quite hard to use), but Task gives you no chance.

> What if you use `embed` You can add the embedded files to the "sources" list, no issues > Why rebuild the binary if you've only touched test files Yep, this is a thing not currently supported by Task, but they're considering extended globing iirc (with negation, like in gitignores). I think you could do something like that though: env: SOURCES: sh: find . -name *.go | grep -v _test.go kinda ugly, but easy to unders…

Keep digging this hole and you will just reinvent make, only worse.

It's like Greenspun's tenth rule, only for build tools.

Re: Taskfile: A Modern Alternative to Makefile

#200

Earlier quoted context omitted.

git's CLI is famously inconsistent, but git merge was obviously much more reliable than svnmerge.py ever had been. (I hear svn may have improved merge tracking, but I'm not going to spend more time on it.)

Git's CLI has improved over the years. E.g. git switch is a thing now. And it's quite consistent regarding order of arguments.

What bugs me is stuff like

  git branch -c [old] new
  git checkout -b new [old]
  git switch -c new [old]
  git rebase old new # if new only exists upstream?
You have to remember how each command works separately, because any one will lead you astray about some of the others.
Post reply on HN