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

Redo gets confused with multiple files with same contents #2

Open
zdule opened this issue Jul 17, 2016 · 1 comment
Open

Redo gets confused with multiple files with same contents #2

zdule opened this issue Jul 17, 2016 · 1 comment

Comments

@zdule
Copy link

zdule commented Jul 17, 2016

Just noticed something

If a target depends on two files which happen to have the same contents, changing one of them might not cause a rebuild.

Here's a small example
Two empty files are created a and b, and concat.do is created to concatenate them:

redo-ifchange a b
echo "File a:" > $3
cat a >> $3
echo "\nFile b:">> $3
cat b >> $3

If you redo target concat and than change file a, redo won't notice the change.

This might be a rare and degenerate example and might not be worth fixing.

@dinkelk
Copy link

dinkelk commented Jul 24, 2016

This version of redo stores hash information for targets within files (inside of a .redo directory) named with the hash of the contents. So if dependencies a and b both have the same contents, then they will share a .redo file with the filename being the hash of their contents (ie. something like ab20482feed). Since two different targets are using the same metadata file, I am not surprised by the issues you are having.

I would recommend using either this version of redo implemented in Haskell, or this version implemented in python, both which solve this problem.

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

2 participants