If I specify an invalid file in a `python_source` ...
# development
b
If I specify an invalid file in a
python_source
target, I get a rather misleading error 🤔
Copy code
pants.engine.target.InvalidFieldException: The 'source' field in target src/to/target:the_target must have 1 file, but it had 0 files.
Stacktrace shows:
"/home/joshuacannon/work/pants/src/python/pants/engine/target.py", line 1616
as the raiser
w
mm… rather than validating where it does,
SingleSourceField
should probably override
default_glob_match_error_behavior
to fail, which would cause it to fail before the validation with a better message
you get a warning rendered first, yea?
b
Oh hey check that out 😂 I was too dumb to look above the red error to see the yellow warn 😂
w
still! this should be fixed
🙌 1