This commit is the first step in fixing some internal logic errors.
The code previously used two manifests. These were both the same
file even though the last manifest was only ever read and never written.
The current manifest was never read and only written. This caused
problems. This commit changes DynamicFileTask to use only one manifest.
It also changes DynamicFileTask to be more resilient to internal
mistakes. This commit assures that a manifest is assigned to a
DynamicFileTask instance. Previously empty manifests were created as
needed. This was a problem because the proper manifest was not being
assigned correctly. This commit also changes DynamicFileTask#needed? to
raise an error when there is no manifest. This ensures that this
implementation error will never happen. It does make tests more verbose,
but I think the change is worth it
This commit introduces Filer#manifest which returns the set manifest or
the pipeline's manifest. This makes testing easier because you can use
Filer#manifest= to set on for that test. Pipeline#manifest delegates to
I think there is still problems with this code. The connection between
Project, Pipeline, Filter, and DynamicFileTask is too complicated. This is
especially annoying because DynamicFileTask requires a manifest to
function properly. However, the manifest must be passed down from the
project (then through a pipeline and into a filter) which builds the
actual DynamicFileTask instances. I think this is a code smell.
Introducing more collaboraters is making the tests more complex. Using a
singleton is one possible solution. I will think about this later.