anki icon indicating copy to clipboard operation
anki copied to clipboard

fix(build): treat proto/i18n's implicit outputs as inputs

Open iamllama opened this issue 1 month ago • 0 comments

I can reliably reproduce it by running rm -rf out/pyenv, rm -rf out/pylib and rm -rf out/pycache sequentially and then ./run https://forums.ankiweb.net/t/anki-build-failed-because-python-3-14-is-installed-on-my-system-in-addition-to-python-3-13/67484/8

Ninja tries to (re)generate out/pylib/anki/_backend_generated.py and out/pylib/anki/_fluent.py by building the anki_proto and anki_i18n crates, whose build scripts handle codegen

However, the crates' build scripts don't run if their implicit outputs change and end up doing nothing after rm -fr out/pylib

The fix proposed is to make the crates' build scripts rerun on changes to implicit outputs that they created via write_file_if_changed

iamllama avatar Nov 20 '25 13:11 iamllama