I've recently published a plugin for running <base...
# plugins
l
I've recently published a plugin for running basedpyright type checking during
pants check
to avoid managing Node.js for pure python projects. https://github.com/jacoblearned/pants-basedpyright I'd like to add optional support for its baseline feature which would require writing the output files from a
VenvPexProcess
back to disk, but it seems there's no way to get a handle to the
workspace
during
CheckRequest
executions to write the baseline file safely (for good reason). Is my main option here to implement a custom
@goal_rule
to run separately from
pants check
that collects output digests from
CheckResults
and then write those to disk?
w
I don't think you'd necessarily need to write a goal_rule. I wonder if you could shim that functionality into the lint/fix goal, which does allow doing what you're talking about. In this case, you're specifically writing to/from one file, right?
👍 1
l
Yeah, I'd be writing to a single file right now. I think supporting this via the fix goal makes some sense. I'll see how implementing it there turns out, thanks!
w
It's possible
ruff
might be a decent place to start, we use it for formatting and linting - but the point being, we use it for 2 things