Closed awdeorio closed 2 years ago
Should we replace check_shebang()
with another function to check that the mapper and reducer is an executable? We could just emphasize in the p5 spec that the students should include the shebang at the top of their files.
Yep, I think it would be nice to provide sane error messages. Perhaps a dummy input with an empty string?
What do you mean by a dummy input with empty string?
What do you mean by a dummy input with empty string?
One way to check if a mapper or reducer executable is valid is to execute it with an empty string input. Just to check if it throws an error. Or perhaps there's a more elegant way to do this. I don't think checking the executable bit is adequate because the shebang could be messed up.
The current implementation will produce an error for anything other than a Python mapper or reducer. We should support any executable. The only thing in the way is
check_shebang()
, which I recall we added to avoid a confusing (lack of) error.