posit-dev / publisher

MIT License
3 stars 0 forks source link

Cache interpreter versions #1932

Open mmarchetti opened 3 days ago

mmarchetti commented 3 days ago

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.