Fixed a bug where codegen would crash due to a missing flag.
Review Request #2368 - Created June 15, 2015 and submitted
|jsirois, patricklaw, zundel|
Specifically, the error message (or warning, depending on the flag) printed if a
target generates the same sources as one of its parents.
Also fixed a bug where an exception message was in the wrong namespace, which would
have crashed nastily if it was ever thrown.
Added/updated simple_codegen_task test-cases to cover these things.
Added tests in test_simple_codegen_task.py.
CI went green: https://travis-ci.org/pantsbuild/pants/builds/66922872
CI went green.
Thanks for the tests!
That was subtle. I think sticking to the widespread practice of ordering nested exception classes up towards the top of a class declaration would have helped here. DuplicateSourceError has the same eye-balling issue. Its correctly nested, but that would be more obvious if it were declared just under
class IsolatedCodegenStrategy(CodegenStrategy):before the constructor.