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

Cannot detect source of 'filename' (when running prove on a non-existent file) #50

Open
rfdrake opened this issue Oct 25, 2015 · 0 comments

Comments

@rfdrake
Copy link

rfdrake commented Oct 25, 2015

This might be something others either ignore or maybe it doesn't happen often enough for anyone to say something. Or it's possible it's been mentioned but wontfix'ed because it breaks the flow of the routines.

I had the occasion to see it a few times when running prove manually from the wrong directory (prove -lv t/testfile.t when working directory was the t/ dir)

I'm not sure where a good place for the check could be, but it would be nice if this was smart enough to say if ( !fileexist && sourcerefundefined ) confess("file/method not found.");

Right now this is the error you get. It's factual but not very helpful.

rdrake@test:~/Test-Harness [master]$ perl -Ilib bin/prove asdf
Cannot detect source of 'asdf'! at lib/TAP/Parser/IteratorFactory.pm line 261.
        TAP::Parser::IteratorFactory::detect_source(TAP::Parser::IteratorFactory=HASH(0x18d12c0), TAP::Parser::Source=HASH(0x18d11b8)) called at lib/TAP/Parser/IteratorFactory.pm line 211
        TAP::Parser::IteratorFactory::make_iterator(TAP::Parser::IteratorFactory=HASH(0x18d12c0), TAP::Parser::Source=HASH(0x18d11b8)) called at lib/TAP/Parser.pm line 472
        TAP::Parser::_initialize(TAP::Parser=HASH(0x18a7028), HASH(0x16bb7c0)) called at lib/TAP/Object.pm line 55
        TAP::Object::new("TAP::Parser", HASH(0x16bb7c0)) called at lib/TAP/Object.pm line 130
        TAP::Object::_construct(TAP::Harness=HASH(0x15e8e68), "TAP::Parser", HASH(0x16bb7c0)) called at lib/TAP/Harness.pm line 852
        TAP::Harness::make_parser(TAP::Harness=HASH(0x15e8e68), TAP::Parser::Scheduler::Job=HASH(0x188d160)) called at lib/TAP/Harness.pm line 651
        TAP::Harness::_aggregate_single(TAP::Harness=HASH(0x15e8e68), TAP::Parser::Aggregator=HASH(0x1687048), TAP::Parser::Scheduler=HASH(0x188d238)) called at lib/TAP/Harness.pm line 743
        TAP::Harness::aggregate_tests(TAP::Harness=HASH(0x15e8e68), TAP::Parser::Aggregator=HASH(0x1687048), "asdf") called at lib/TAP/Harness.pm line 558
        TAP::Harness::__ANON__() called at lib/TAP/Harness.pm line 571
        TAP::Harness::runtests(TAP::Harness=HASH(0x15e8e68), "asdf") called at lib/App/Prove.pm line 546
        App::Prove::_runtests(App::Prove=HASH(0x1184bd0), HASH(0x15b4640), "asdf") called at lib/App/Prove.pm line 504
        App::Prove::run(App::Prove=HASH(0x1184bd0)) called at bin/prove line 9
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