guardian / guardian/dotcom-rendering

Remove `Make`?

Open
#16,265 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
274
Forks
34
Avg merge
2d 22h
Merged PRs (30d)
121

Description

We're currently using [Make](https://en.wikipedia.org/wiki/Make_(software)) to orchestrate various tasks. Look at our [makefile](https://github.com/guardian/dotcom-rendering/blob/f55d96b72f808dc088505eb2524ed478f12cf1a7/dotcom-rendering/makefile), I don't think its doing anything particularly complex that, for example, we couldn't do with `scripts` in `package.json`. Could we remove `Make`?

Pros:
- One less tool to understand
- Reduced opportunity for divergence (see also https://github.com/guardian/dotcom-rendering/pull/16234/changes#r3472737901)

Cons:
- Task changing is slightly cleaner in Make compared to `package.json` scripts. However, I wonder if removing the chaining makes this more explicit? For example, in CI we perform [`make riffraff-bundle`](https://github.com/guardian/dotcom-rendering/blob/f55d96b72f808dc088505eb2524ed478f12cf1a7/.github/workflows/container.yml#L32-L34) which [implicitly runs `webpack` and `cdk synth`](https://github.com/guardian/dotcom-rendering/blob/f55d96b72f808dc088505eb2524ed478f12cf1a7/dotcom-rendering/makefile#L28). Does performing each task separately reduce complexity?

Alternatively, if we're happy with the DX of using Make, to solve the divergence issue, Make could call `package.json` scripts. That is, rather than the makefile having a task that runs `webpack`, could it instead run `pnpm run build`? And the container file will do the same?

Contributor guide

Open the contributing guide

Research direction

Start by reading dotcom-rendering/makefile, package.json, and .github/workflows/container.yml, then compare how the current Make targets chain webpack and cdk synth with the existing package scripts. Review the linked pull request for the reported divergence. Done means the project has agreed on and implemented either removing Make or making it delegate consistently to package scripts.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, typescript, webpack
Domain
build-system, ci-cd, developer-experience
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.