Commit 3829315
authored
Add watcher for pip installs (#1420)
Fixes #548
This pull request enhances the Python environment management by
improving how changes to virtual environments and installed packages are
detected and handled. The main focus is on ensuring that updates to the
environment and package lists are automatically and efficiently
refreshed when relevant files are created or deleted.
**Improvements to environment and package monitoring:**
* Renamed the `watcher` for `activate` files to `activationWatcher` for
clarity and consistency.
* Added a new `packageWatcher` that monitors `METADATA` files within
`site-packages/*.dist-info` directories to detect package installations
and uninstallations, triggering a debounced refresh of the package list
for all Python projects.
* Introduced `packageDebouncedRefresh`, which efficiently refreshes
package lists across all environments when relevant changes are
detected, and logs errors if package refresh fails.1 parent 58868b7 commit 3829315
1 file changed
+39
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
43 | 78 | | |
0 commit comments