You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c8bb80b
Browse filesBrowse the repository at this point in the historyBrowse files
fix: skip package refresh for deleted environments (#1833)
Fixes#1824
## Problem
Deleting and recreating a virtual environment (for example `make
clean-venv` followed by `make venv`) surfaced an **"Error refreshing
packages"** notification.
### Explanation
The package watcher observes `site-packages`. Deleting the environment
fires delete events, which schedule a debounced refresh. That refresh
then ran `pip list` against the interpreter that had just been removed,
so the failure was an expected consequence of the deletion rather than
an actionable problem — but it was reported to the user as an error.
## Fix
`watchPackageChangesForEnvironment` now verifies the environment
executable exists before refreshing.
- If the executable is missing, the refresh is not attempted
- Because a deletion is usually followed by a recreation, the watcher
retries on the existing 500ms debounce interval for up to 30 seconds
- If the executable never returns, the watcher stops retrying and logs
at debug level.
- Genuine stat failures and genuine refresh failures are still logged as
errors.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments