jondot / jondot/blade

Incremental builds

Open
#8 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
816
Forks
36
PR merge metrics
No merged PRs in 30d

Description

When blade is integrated as a build script to automatically be run on each build then build times can become quite long because blade is generating all images – even if nothing has changed. Therefore it would be great if blade could detect when it has to rebuild images and otherwise just keep things as is and skip images that didn't change.

I think in order to achieve this there are several possibilities. The easiest could be that blade simply checks the last change dates of the source file and the destination file and compares those. If the destination file was last changed after the source file was changed then it could skip rebuilding the image, otherwise it would behave like now.

Alternatively blade could also generate a file (something like `Bladefile.lock`) which lists the date the source images were last built and check if that date is after the source images last change date and the Bladefiles last change date then it would skip the image if both cases were given.

If implemented there should also be a possibility to force rebuilding all images, something like `blade --no-skip-unchanged` is what I'm thinking of. We could also make it opt-in like so: `blade --skip-unchanged`.

What do you think? Unfortunately I can't do these changes myself since I don't speak Go (yet).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing how blade generates images when run as a build script, then review the proposed Bladefile.lock approach and the --skip-unchanged or --no-skip-unchanged option. Decide which change-detection strategy and command-line behavior should be used; done means unchanged images are skipped while a force option rebuilds all images.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
build-system, cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.