Open asherf opened 2 years ago
This happens because isort uses absolute paths. We post-process it to strip from the console: https://github.com/pantsbuild/pants/blob/33e341a9814cbc82fd390779eb7e6055f9a4bd13/src/python/pants/backend/python/lint/isort/rules.py#L154-L157
That works for the console, but this workunit is showing ~ProcessResult
, before the post-processing.
I believe there are two fixes we could do:
Process()
have something like a strip_chroot_prefix
argument, and then Rust will strip it rather than Python.
artifacts()
on LintResults
.
LintResults
rather than the `ProcessResult.@stuhood thoughts?
- Move post-processing into the Rust engine. Have
Process()
have something like astrip_chroot_prefix
argument, and then Rust will strip it rather than Python.
This sounds reasonable to me.
Similar to the existing support, this would need to be on a best-effort basis though: if we run a Process
remotely, then we can't know what the sandbox will look like, and can't strip it (same as today). So the support would probably be best implemented inside of the local::CommandRunner
as the result is created.
@Eric-Arellano FYI