livingsocial / rake-pipeline

An extension to Rake for dealing with a directory of inputs, a number of filters, and a directory of outputs
MIT License
276 stars 38 forks source link

Cannot pass inputs from one filter to the next #115

Closed joefiorini closed 12 years ago

joefiorini commented 12 years ago

I can no longer pass output from one filter to the next. I created an example with an Assetfile based on the Writing Filters section in GETTING_STARTED.md. When I run rakep against the latest head I get the following exception:


/Users/joe/Projects/oss/rake-pipeline/lib/rake-pipeline.rb:350:in `block in setup_filters': Temporary files cannot be input! /Users/joe/Sites/test-layouts/_tmp/rake-pipeline-3ea479df1be59c42b0b3e6f10af7e15863ca2c67/rake-pipeline-5399765c-tmp-1/a.js is inside a pipeline's tmp directory (Rake::Pipeline::TmpInputError)
    from /Users/joe/Projects/oss/rake-pipeline/lib/rake-pipeline.rb:349:in `each'
    from /Users/joe/Projects/oss/rake-pipeline/lib/rake-pipeline.rb:349:in `setup_filters'
    from /Users/joe/Projects/oss/rake-pipeline/lib/rake-pipeline.rb:370:in `block in setup_filters'
    from /Users/joe/Projects/oss/rake-pipeline/lib/rake-pipeline.rb:355:in `each'
    from /Users/joe/Projects/oss/rake-pipeline/lib/rake-pipeline.rb:355:in `inject'
    from /Users/joe/Projects/oss/rake-pipeline/lib/rake-pipeline.rb:355:in `setup_filters'
    from /Users/joe/Projects/oss/rake-pipeline/lib/rake-pipeline.rb:334:in `setup'
    from /Users/joe/Projects/oss/rake-pipeline/lib/rake-pipeline.rb:322:in `block in invoke'
    from <internal:prelude>:10:in `synchronize'
    from /Users/joe/Projects/oss/rake-pipeline/lib/rake-pipeline.rb:317:in `invoke'
    from /Users/joe/Projects/oss/rake-pipeline/lib/rake-pipeline/project.rb:121:in `each'
    from /Users/joe/Projects/oss/rake-pipeline/lib/rake-pipeline/project.rb:121:in `block in invoke'
    from <internal:prelude>:10:in `synchronize'
    from /Users/joe/Projects/oss/rake-pipeline/lib/rake-pipeline/project.rb:112:in `invoke'
    from /Users/joe/Projects/oss/rake-pipeline/lib/rake-pipeline/cli.rb:19:in `build'
    from /Users/joe/.rbenv/versions/1.9.3-p194/gemsets/test-layouts/gems/thor-0.16.0/lib/thor/task.rb:27:in `run'
    from /Users/joe/.rbenv/versions/1.9.3-p194/gemsets/test-layouts/gems/thor-0.16.0/lib/thor/invocation.rb:120:in `invoke_task'
    from /Users/joe/.rbenv/versions/1.9.3-p194/gemsets/test-layouts/gems/thor-0.16.0/lib/thor.rb:275:in `dispatch'
    from /Users/joe/.rbenv/versions/1.9.3-p194/gemsets/test-layouts/gems/thor-0.16.0/lib/thor/base.rb:425:in `start'
    from /Users/joe/Projects/oss/rake-pipeline/bin/rakep:4:in `<top (required)>'
    from /Users/joe/.rbenv/versions/1.9.3-p194/gemsets/test-layouts/bin/rakep:23:in `load'
    from /Users/joe/.rbenv/versions/1.9.3-p194/gemsets/test-layouts/bin/rakep:23:in `<main>'

I am pretty sure this is a bug, shouldn't that work?

joefiorini commented 12 years ago

I've tried a couple more of the examples provided in this repo to troubleshoot this problem. If I revert the work done in be2e7ecaec5e765119958b189ba2729635db5482 then it works fine. Would you accept a pull request reverting this commit?

wagenet commented 12 years ago

@joefiorini I'm pretty sure this has been fixed. Can you verify?

ahawkins commented 12 years ago

@wagenet @joefiorini this was fixed with #109