Unflagging `transient` in `delete_name_file`
elegios opened this issue · 0 comments
elegios commented
I've been debugging a strange error including transient files for quite a while now, and while I can't seem to produce a minimal example that triggers the error (see the fold for a not-at-all-minimal example if desired) I think I've found how to fix it.
The issue appears to be that .tup/db
can end up in a state where a particular node id exists in transient_list
but not node
. I suspect that a call to tup_db_unflag_variant
should be added in delete_name_file
in src/tup/delete_name_file.c
. Testing this locally seems to work thus far, so I figured I'd report it here.
Large example that *seems* consistent
- Clone https://github.com/miking-lang/miking. The actual project needs a bunch of dependencies to build, but to trigger the error it should be enough to just have
tup
. - Edit
tup.config
to the following:CONFIG_USE_INSTALLED_MI=y CONFIG_USE_BUILT_MI=n CONFIG_USE_CHEATED_MI=n
- Run
tup build/mi-cheat
. This should fail and build nothing (we removed the output withtup.config
), but will causetup
to build the database. - Update
tup.config
to the following:CONFIG_USE_INSTALLED_MI=n CONFIG_USE_BUILT_MI=n CONFIG_USE_CHEATED_MI=y
- Run
tup build/mi-cheat
. This should trigger the bug and print something liketup error: Unable to find node entry for tupid: 935
. Expected behavior is to start building the specified target.