Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to force-rerun build #69

Open
kylewlacy opened this issue Jul 4, 2024 · 0 comments
Open

Add option to force-rerun build #69

kylewlacy opened this issue Jul 4, 2024 · 0 comments

Comments

@kylewlacy
Copy link
Member

All build outputs, and while that's convenient in most cases, sometimes it would be really handy to rerun an already-cached build.

The are some challenges with this feature:

  1. Deciding what to re-run. You wouldn't ever want to rebuild std from source if you can avoid it, so there needs to be some way to decide which things to rebuild and which things not to rebuild
    • We do track "metadata" for most/all recipes, so deciding what to rebuild will likely involve inspecting the recipe metadata, and ignoring the cache if it meets some condition
  2. How to treat successes or failures. If a build succeeds but leads to a different output, do we prefer the old output or the new output? The old output is more logically consistent, but picking the new output is probably what most people would expect

A quick-and-dirty workaround that I've done a lot: just add a simple .env({ WATERMARK: "asdf" }) when you want to force-rerun a process. Using any random env value will lead to a new process recipe, which will force it to build. If the output of that process is the same, then anything dependent on it won't rebuild, unless you add more new env vars.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant