This PR avoids repeatedly invoking R and Python interpreters to query their versions, by caching those versions.
Draft PR because I need to think about whether we need to not cache the .pyenv/shims/python interpreter, which runs different interpreters based on pyenv settings and potentially .python-version files.
Follow-on to #1929
Type of Change
[ ] Bug Fix
[ ] New Feature
[ ] Breaking Change
[ ] Documentation
[ ] Refactor
[ ] Tooling
[x] Performance
Approach
Cache interpreter versions in agent memory, using interpreter path as the key.
Automated Tests
Existing tests have been updated.
Directions for Reviewers
Inspect projects (especially recursively). We should only request each R or Python interpreter version once.
Intent
This PR avoids repeatedly invoking R and Python interpreters to query their versions, by caching those versions.
Draft PR because I need to think about whether we need to not cache the
.pyenv/shims/python
interpreter, which runs different interpreters based on pyenv settings and potentially.python-version
files.Follow-on to #1929
Type of Change
Approach
Cache interpreter versions in agent memory, using interpreter path as the key.
Automated Tests
Existing tests have been updated.
Directions for Reviewers
Inspect projects (especially recursively). We should only request each R or Python interpreter version once.