Benjy had a good insight. Since v1, we’ve been dea...
# development
h
Benjy had a good insight. Since v1, we’ve been dealing with source roots by stripping them. At least for Python, we can instead work around it by setting
PYTHONPATH
. This solves a couple issues, primarily around the output of tools like Pytest and linters. Naturally, those are outputting stripped files, which is confusing. So, in V1, we wrote some plugins like the coverage plugin to restore the full name. These plugins are expensive to maintain The only blocker is that you must tell Pex
--inherit-path=fallback
to pick up
PYTHONPATH
, but this leaks site packages. Benjy is going to work on https://github.com/pantsbuild/pex/issues/764 to fix this
🎉 1
w
sounds good.
it’s not 100% clear how that impacts which files end up included in reports
h
it’s not 100% clear how that impacts which files end up included in reports
It impacts a lot. The Coverage plugin results in our plugin’s logic determining what gets in the final report, based entirely on the
FileTracer
and
find_executable_files
things; that is, we only report on files “owned” by Pants If we get rid of the plugin, Coverage will report on files like it normally would without Pants. And we now only need to use Coverage’s builtin filtering mechanisms to determine what shows up in reports. We don’t need to also make sure our plugin’s FileTracer is correct
w
sortof… it will only report on them if they’re inside the sandbox
ie, in the closure
h
Yes, that is true
w
given that, i think that while it’s a great idea to try and remove the need for the plugins, i don’t think it actually affects the numerator/denominator aspect of coverage
👍 1
but it could make it easier to reason about, and that’s always good.
👍 1
h
The only way it impacts it is code health: making it easier to iterate on numerator/denominator I’m having a really hard time thinking about everything with the plugin in play
w
yep. no need to push too hard on it right now. might be good to braindump what you have before putting it down, but seems fine to put it down.
👍 1