jimweirich/rake — pull request #209 by randycoulman (2013-07-07 00:10:02+00:00)
Title: Regenerate and reload any imported files.

In some cases, loading an imported file will modify the task that
generates that file. However, since that task was already invoked
prior to the import, it will not be re-invoked. This can result in
the imported file never being re-generated.

Consider building a C program with Rake. We might have a task to generate the dependencies for each of the .c files and then import those dependencies. In the main `Rakefile`, we know that `foo.d` depends on `foo.c`, but we don't yet know that `foo.d` also depends on `foo.h` until we import `foo.d`. If `foo.h` changes, `foo.d` should be re-generated, but it never will be, because once we know about the new dependency, `foo.d`'s file task has already been executed.

I'm pretty sure there's a better way to implement the solution for this problem; what I have here works, but broke another test until I removed some guards from `util_loader`. Please feel free to come up with a better solution. I have included a new functional test that fails without a solution to this issue.