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

enhance auto(…) to detect missing dependencies #263

Closed
RubyTuesdayDONO opened this issue Mar 9, 2013 · 2 comments · Fixed by #663
Closed

enhance auto(…) to detect missing dependencies #263

RubyTuesdayDONO opened this issue Mar 9, 2013 · 2 comments · Fixed by #663

Comments

@RubyTuesdayDONO
Copy link
Contributor

i'm not sure whether this is by design or not, but it would aid troubleshooting if auto(…) could (optionally?) detect when one of its tasks has unsatisfied dependencies. although developers should certainly be careful, it would be so helpful if auto(…) were to call out something like, task 'unreachable' has unsatisfied dependency on task 'nonexistent'.

var async = require('async'); 
async.auto({ 
    unreachable: [ 'nonexistent', function(callback) { 
        console.log('this message will not appear'); 
        callback(); 
    } ] 
}, function(err,res) { 
    if(err) { 
        console.dir(err); 
        process.exit(1); 
    } else { 
        process.exit(0); 
    } 
} 
@brianmaissy
Copy link
Contributor

The simple case of a nonexistent dependency should definitely be implemented, since it costs almost nothing and would solve a common programmer error. To find loops in the dependencies would also be possible, but would take some extra processing. Still not a bad idea I think.

Obviously beyond that there's nothing much we can do.

@RubyTuesdayDONO
Copy link
Contributor Author

dependency cycles could either throw an error or be converted into equal siblings with no children … better to throw an error in my use-cases (and probably simpler), although there are applications for everything :p

@caolan caolan closed this as completed Mar 28, 2014
Mickael-van-der-Beek pushed a commit to Mickael-van-der-Beek/async that referenced this issue Nov 18, 2014
Mickael-van-der-Beek pushed a commit to Mickael-van-der-Beek/async that referenced this issue Nov 18, 2014
ipyramiddev added a commit to ipyramiddev/async-300 that referenced this issue Dec 10, 2022
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

Successfully merging a pull request may close this issue.

3 participants