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

Fix the multiple-.redo problem #1

Closed
bocchino opened this issue Nov 30, 2016 · 0 comments
Closed

Fix the multiple-.redo problem #1

bocchino opened this issue Nov 30, 2016 · 0 comments

Comments

@bocchino
Copy link
Owner

bocchino commented Nov 30, 2016

The way that redo creates and maintains its database has some problems. Unless one is careful, it can create .redo directories here and there. This causes inconsistency and confusion. For example, you can do a build that logs its info in one .redo directory, cd somewhere else, and do another build that can't see the info. This confuses redo and causes it to issue warnings and/or refuse to build things.

Currently the only workaround I know is to search upstream and downstream of the directory where you want .redo to go (usually the top level directory of your project) and wipe out the unwanted .redo directories. This is annoying.

I propose to implement the following solution:

  1. By default, redo maintains its .redo directory in the user's home directory.

  2. When redo is run in directory d, if any file .redo-base exists in d or above, then redo uses the highest-level directory containing .redo-base for its .redo directory.

This approach supports the following scenarios:

  1. Use the default. .redo always goes in your home directory. That's okay; the main drawback is that if your .redo database ever gets corrupted or inconsistent and you have to delete it, you are forced to wipe out all dependencies for all projects.

  2. Put an empty file .redo-base in the top-level directory of your project and check it into git. When anyone clones your project and runs redo anywhere in it, .redo will go in the the-top level of your project, unless he or she already has a .redo-base above it.

  3. Same as 2, but your project includes a sub-repo that also has .redo-base checked in. In this case, redo ignores .redo-base in the sub-repo (even when building inside the sub-repo) and puts .redo in the top-level directory of the entire project.

  4. Put .redo-base in your home directory. .redo always goes in your home directory, even if you are building projects or sub-projects with their own .redo-base files.

bocchino added a commit that referenced this issue Nov 30, 2016
bocchino added a commit that referenced this issue Nov 30, 2016
Due to the fix for issue #1.
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