Commit eaa7e14
committed
refactor(robot): remove unnecessary finalizers and dispose chain
Remove redundant _release_watchers_finalizer from _ImportEntry — file
watcher cleanup is already handled explicitly by _remove_file_watcher()
during invalidation and by server_shutdown() at LS shutdown.
Remove the _dispose_finalizer/dispose() chain through ImportsManager,
DocumentsCacheHelper, RobotFrameworkLanguageProvider, CodeAnalyzer, and
CLI. With the per-entry finalizers gone, these only cleared dicts that
Python already cleans up at process exit.
Fix broken finalizer in Workspace.add_file_watchers() where the closure
captured the entry object, preventing it from ever being garbage
collected.
Set atexit=False on sentinel finalizers so they only fire during normal
GC (needed for LS live cleanup), not at interpreter shutdown.1 parent 9b89623 commit eaa7e14
File tree
3 files changed
+18
-37
lines changed- packages
- analyze/src/robotcode/analyze/code
- language_server/src/robotcode/language_server/common/parts
- robot/src/robotcode/robot/diagnostics
3 files changed
+18
-37
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
398 | 398 | | |
399 | 399 | | |
400 | 400 | | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
401 | 407 | | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
| 408 | + | |
408 | 409 | | |
409 | 410 | | |
410 | 411 | | |
| |||
Lines changed: 0 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
415 | 415 | | |
416 | 416 | | |
417 | 417 | | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | 418 | | |
427 | 419 | | |
428 | 420 | | |
| |||
Lines changed: 11 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | 116 | | |
135 | 117 | | |
136 | 118 | | |
137 | 119 | | |
138 | | - | |
139 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
140 | 125 | | |
141 | 126 | | |
142 | 127 | | |
| |||
1429 | 1414 | | |
1430 | 1415 | | |
1431 | 1416 | | |
1432 | | - | |
| 1417 | + | |
| 1418 | + | |
1433 | 1419 | | |
1434 | 1420 | | |
1435 | 1421 | | |
| |||
1660 | 1646 | | |
1661 | 1647 | | |
1662 | 1648 | | |
1663 | | - | |
| 1649 | + | |
| 1650 | + | |
1664 | 1651 | | |
1665 | 1652 | | |
1666 | 1653 | | |
| |||
1687 | 1674 | | |
1688 | 1675 | | |
1689 | 1676 | | |
1690 | | - | |
| 1677 | + | |
| 1678 | + | |
1691 | 1679 | | |
1692 | 1680 | | |
1693 | 1681 | | |
| |||
0 commit comments