robotcode 2.3.1__tar.gz → 2.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -334,4 +334,8 @@ bundled/libs
334
334
  results/
335
335
 
336
336
  # kilocode
337
- .kilocode/
337
+ .kilocode/
338
+
339
+ # .agents
340
+ .agents/
341
+ skills-lock.json
@@ -2,6 +2,459 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines.
4
4
 
5
+ ## [2.5.0](https://github.com/robotcodedev/robotcode/compare/v2.4.0..v2.5.0) - 2026-03-31
6
+
7
+ ### Bug Fixes
8
+
9
+ - **robot:** Strip trailing `=` from variable names in resource builder ([e11ca60](https://github.com/robotcodedev/robotcode/commit/e11ca6061ecf7b1659e74a72ddecb6baadc545a3))
10
+ - **robot:** Do not override the source on a model if there is already a source field ([7e74c2d](https://github.com/robotcodedev/robotcode/commit/7e74c2dfbe57367edacc81fd0f6460d23337eccc))
11
+
12
+ Newer Robot Framework versions already set the source field on File AST blocks, so overriding it here is unnecessary.
13
+
14
+ - **robot:** Resolve relative library paths in namespace cache validation ([45d8f9f](https://github.com/robotcodedev/robotcode/commit/45d8f9f92a01987955df48325ea16f4a10fbcf75))
15
+
16
+ Namespace cache validation failed for files importing libraries via
17
+ relative paths (e.g. ../../resources/libraries/common.py), causing
18
+ unnecessary full rebuilds on every warm start.
19
+
20
+ Two issues fixed:
21
+ - validate_namespace_meta now passes the source file's directory as
22
+ base_dir when falling back to get_library_meta/get_variables_meta,
23
+ so relative paths resolve correctly
24
+ - get_library_meta and get_variables_meta initialize import_name
25
+ before the try block to avoid UnboundLocalError when find_library
26
+ or find_variables fails
27
+
28
+ - **robot:** Correct check for __init__.py file in _is_valid_file function ([ffad219](https://github.com/robotcodedev/robotcode/commit/ffad219d9bc4311a2f1a70d272feb942467b1bfb))
29
+ - **robot:** Add lock for _workspace_languages to prevent race condition ([9bf0ee6](https://github.com/robotcodedev/robotcode/commit/9bf0ee619d20d1f676b35797867260aab924a2af))
30
+
31
+ WeakKeyDictionary is not thread-safe for concurrent read/write.
32
+ Protect all access to _workspace_languages with a dedicated RLock.
33
+
34
+
35
+
36
+ ### Documentation
37
+
38
+ - **news:** Add supplementary release note for v2.5.0 ([a8c39a3](https://github.com/robotcodedev/robotcode/commit/a8c39a377a74db9fe2a93e165415d0e805470d2d))
39
+ - Update release notes for v2.5.0 with ([9978a88](https://github.com/robotcodedev/robotcode/commit/9978a8869359ca7dbfbbde7ac3ddc96dd1eb1996))
40
+ - Add news section to documentation site ([7f14925](https://github.com/robotcodedev/robotcode/commit/7f1492508bef6f487e31bbd8f532449d7c05d392))
41
+
42
+
43
+ Add a dedicated news section for release announcements with
44
+ auto-generated sidebar (sorted newest-first), content loader,
45
+ and redirect from /news/ to the latest article.
46
+
47
+
48
+ ### Features
49
+
50
+ - **analyze:** Add cache management CLI commands ([1421107](https://github.com/robotcodedev/robotcode/commit/1421107e20473b441861958feca96262832946bb))
51
+
52
+ Add `robotcode analyze cache` subcommand group with five commands:
53
+ - `path`: print resolved cache directory
54
+ - `info`: show cache statistics with per-section breakdown
55
+ - `list`: list cached entries with glob pattern filtering (-p)
56
+ - `clear`: remove cached entries by section
57
+ - `prune`: delete entire .robotcode_cache directory
58
+
59
+ Output adapts to the global --format flag (text/json/toml) and
60
+ --no-color mode. Text output uses rich-rendered markdown tables
61
+ when color is enabled, plain aligned tables otherwise.
62
+
63
+ - **analyze:** Enable namespace caching by default ([d896213](https://github.com/robotcodedev/robotcode/commit/d8962139775144697c2d3e41fe37f6595bc272d6))
64
+
65
+ Namespace caching speeds up startup for large projects by skipping
66
+ re-analysis of unchanged files. It is now mature enough to be enabled
67
+ by default.
68
+
69
+ - **analyze:** Add --cache-namespaces/--no-cache-namespaces CLI option ([b050c32](https://github.com/robotcodedev/robotcode/commit/b050c32e94989f638ec0cfcafe5122bfdf3a4945))
70
+
71
+ Add option to enable/disable caching of fully analyzed namespace data
72
+ to disk. Disabled by default until the cache is fully optimized and
73
+ validated. When enabled, skips re-analysis of unchanged files on
74
+ startup, which can significantly speed up large projects.
75
+
76
+ Available as CLI flag (--cache-namespaces/--no-cache-namespaces),
77
+ robot.toml setting (tool.robotcode-analyze.cache.cache_namespaces),
78
+ and VS Code setting (robotcode.analysis.cache.cacheNamespaces).
79
+
80
+ - **analyze:** Add collection of unused keywords and variables on the CLI ([5734690](https://github.com/robotcodedev/robotcode/commit/5734690b4a9a627306751c704b6fc0934739a1fc))
81
+
82
+ Add support for collecting unused keyword and variable diagnostics when
83
+ running `robotcode analyze code` from the command line.
84
+
85
+ The feature can be enabled in `robot.toml`:
86
+
87
+ ```toml
88
+ [tool.robotcode-analyze.code]
89
+ collect-unused = true
90
+ ```
91
+
92
+ or controlled directly per invocation:
93
+
94
+ ```bash
95
+ robotcode analyze code --collect-unused
96
+ robotcode analyze code --no-collect-unused
97
+ ```
98
+
99
+ - **langserver:** Add code completion for `Literal` type hint values ([42ab3a0](https://github.com/robotcodedev/robotcode/commit/42ab3a073e562c21474d39667ef653948128abe6))
100
+
101
+ Keywords with `Literal["fast", "slow", "auto"]` type hints now show
102
+ their allowed values in the completion list, making it easier to
103
+ discover and select valid argument values without checking the
104
+ keyword documentation.
105
+
106
+ Also supports `Union` types containing `Literal`, e.g.
107
+ `Union[Literal["x", "y"], int]`.
108
+
109
+ - **language_server:** Add json to watched file extensions ([74e92b0](https://github.com/robotcodedev/robotcode/commit/74e92b00ef947291e7e6bd0fe09f37b919292b85))
110
+ - **plugin:** Add `has_rich` property to detect `rich` availability ([4581cc6](https://github.com/robotcodedev/robotcode/commit/4581cc6e7594798a28c0795a0f56b7e5fca62a9b))
111
+
112
+ Fall back to plain-text output in cache CLI commands when the `rich`
113
+ package is not installed, instead of dumping raw unformatted markdown.
114
+
115
+ - **robot:** Add `ROBOTCODE_CACHE_DIR` env var for cache path override ([a778cd5](https://github.com/robotcodedev/robotcode/commit/a778cd58542b841966047278ad6fa91049f38c25))
116
+
117
+ Enable redirecting the analysis cache to a custom directory via the
118
+ `ROBOTCODE_CACHE_DIR` environment variable. This allows all RobotCode
119
+ tools — CLI commands, analyze runs, and the language server — to
120
+ share the same cache regardless of where it is stored.
121
+
122
+ The VS Code extension automatically sets this variable in the
123
+ integrated terminal, so CLI commands find the correct cache
124
+ without any manual setup.
125
+
126
+ Cache clearing now operates on the database directly instead of
127
+ removing the directory, preventing errors when multiple processes
128
+ access the cache concurrently.
129
+
130
+ - **robot:** Add advisory file locking to SQLite cache ([b9351fc](https://github.com/robotcodedev/robotcode/commit/b9351fc3f4c9515e56ebfbd13a9b744ac88bee52))
131
+
132
+ Add shared/exclusive advisory file locking (fcntl.flock) to prevent
133
+ `prune` from deleting a cache database while another process (language
134
+ server, analyze run) is using it.
135
+
136
+ - **robot:** Add SQLite cache backend for library and namespace data ([edaea47](https://github.com/robotcodedev/robotcode/commit/edaea473b9d51f52b1a91c705facf2a31ad571c3))
137
+
138
+ Replace file-based pickle caching with a single SQLite database per
139
+ workspace, consolidating all cache entries into one file instead of
140
+ many individual .pkl files scattered across directories.
141
+
142
+ - **robot:** Add namespace disk cache for cold-start acceleration ([abf3387](https://github.com/robotcodedev/robotcode/commit/abf33871b16b1b344c85c2ae77a344a2a5dcd6b1))
143
+
144
+ Speed up first-time file analysis by caching fully resolved
145
+ namespace results to disk. On subsequent IDE starts, cached
146
+ namespaces are reused instead of re-analyzing every file from
147
+ scratch, significantly reducing the time until diagnostics,
148
+ code completion, and navigation become available.
149
+
150
+ The cache is automatically invalidated when source files,
151
+ library dependencies, environment variables, command-line
152
+ variables, language configuration, or the RobotCode version
153
+ change.
154
+
155
+ - **robot:** Add ProjectIndex for O(1) workspace-wide reference lookups ([6ef90f1](https://github.com/robotcodedev/robotcode/commit/6ef90f111f367af51924f1f991ba02ae6e807298))
156
+
157
+ Add an incrementally maintained inverse reference index (ProjectIndex)
158
+ scoped per WorkspaceFolder. On each file build, references are updated
159
+ in-place instead of scanning all files. All six reference types are
160
+ supported: keywords, variables, namespace entries, keyword tags,
161
+ testcase tags, and metadata.
162
+
163
+ - **robot:** Track tag and metadata references in namespace analysis ([6a372fe](https://github.com/robotcodedev/robotcode/commit/6a372febb092055b4fec4528b5f5870233c854da))
164
+
165
+ Add structured reference tracking for tags and metadata during analysis.
166
+ Tags are split into keyword_tag_references and testcase_tag_references
167
+ to reflect their different semantics in Robot Framework (keyword visibility
168
+ vs test selection/reporting). Metadata references track settings-level
169
+ metadata entries by key. All reference keys are normalized for consistent
170
+ lookups. Remove unused TagDefinition class.
171
+
172
+ - **settings:** Remove deprecated robocop configuration options ([fa2217e](https://github.com/robotcodedev/robotcode/commit/fa2217eaeae800023c6961970ee93ec715f28d53))
173
+ - **vscode:** Show "What's New" notification after extension update ([7fb2071](https://github.com/robotcodedev/robotcode/commit/7fb2071104be976d0099f54c65aa58476e01a806))
174
+
175
+ Display an info notification when the extension version changes,
176
+ linking to the news page on robotcode.io via the built-in Simple Browser.
177
+ Also adds a public "RobotCode: Show What's New" command to the palette.
178
+
179
+
180
+
181
+ ### Performance
182
+
183
+ - **cache:** Defer data blob loading in CacheEntry until first access ([795c420](https://github.com/robotcodedev/robotcode/commit/795c42073b49071eabc9a8afd4c4e7eb1659dceb))
184
+ - **diagnostics:** Remove redundant exists() check in get_resource_meta ([5696868](https://github.com/robotcodedev/robotcode/commit/569686849ffc2f286e3af93095cfef8e5b5767ce))
185
+ - **diagnostics:** Consolidate to single AST model and remove data_only parameter ([e2e4cbd](https://github.com/robotcodedev/robotcode/commit/e2e4cbd04d58d2d775742c0fddaee63f948c335d))
186
+
187
+ This eliminates the second cached AST model per document, saving ~500KB/doc
188
+ in CLI and ~200KB/doc in the Language Server. Releasing the model reference
189
+ after analysis frees an additional ~100-500KB/doc in CLI mode.
190
+
191
+ - **imports:** Cache get_module_spec results in ImportsManager ([fa83b30](https://github.com/robotcodedev/robotcode/commit/fa83b3045dc4f87f91952bb1ab0ec64e492be28a))
192
+ - **robot:** Patch RF's variable_not_found to skip slow RecommendationFinder ([78a26c3](https://github.com/robotcodedev/robotcode/commit/78a26c3004717f06edadda114d8d196fd9729e7e))
193
+
194
+ Robot Framework's variable_not_found() calls RecommendationFinder for
195
+ fuzzy "Did you mean...?" suggestions on every unresolved variable. This
196
+ is O(n*m) over all variable candidates and extremely slow for large
197
+ projects (see #587: 30+ min for 375 files).
198
+
199
+ RobotCode never uses the recommendation text — all VariableError catch
200
+ sites either ignore the error or use it for unrelated diagnostics.
201
+
202
+ The monkey-patch replaces variable_not_found in all 5 RF modules that
203
+ import it (notfound, finders, evaluation, store, __init__) with a fast
204
+ version that raises VariableError with just the base message.
205
+
206
+ - **robot:** Speed up namespace cache loading with source hints and top-level-only imports ([1d4ba6b](https://github.com/robotcodedev/robotcode/commit/1d4ba6b73f0e1b57341b5f116084c0ab0902dcc7))
207
+
208
+ Add resolved_resource_sources to NamespaceData that maps import hint
209
+ keys to resolved file paths. During from_data() re-resolution, these
210
+ hints skip expensive find_resource() filesystem searches when the
211
+ cached path still exists on disk.
212
+
213
+ Also limit cached imports to top-level only (recursive imports are
214
+ re-discovered during resolution), replace Path-based normalization
215
+ with string-only os.path calls in imports_manager, and add a hint_key
216
+ property to Import for consistent key computation.
217
+
218
+ - **robot:** Fix ArgumentSpec.resolve() caching bug for RobotArgumentSpec ([05142c8](https://github.com/robotcodedev/robotcode/commit/05142c821a64136453a1388c2d30dccb08093bd7))
219
+
220
+ The RobotArgumentSpec was recreated on every call (100K times) because:
221
+ - hasattr() always returned False with @dataclass(slots=True)
222
+ - Assignment went to a local variable instead of self
223
+
224
+ RobotArgumentSpec.__init__ calls: 100K → 1.3K (-98.7%)
225
+ resolve cumtime: 3.93s → 3.29s (-0.64s)
226
+ Warm no-NS total: 30.78s → 29.81s (-0.97s, -3.2%)
227
+
228
+ - **robot:** Replace pathlib with os.path in file resolution ([f3118bd](https://github.com/robotcodedev/robotcode/commit/f3118bd2d5213f0e6404e476025a40799205c383))
229
+
230
+ Replace pathlib.Path operations with os.path string functions
231
+ in robot_path.py for significantly faster file resolution:
232
+
233
+ - Use os.path.join/abspath/isfile/isdir instead of Path objects
234
+ - Cache validated sys.path entries lazily (_get_valid_sys_path)
235
+ - Separate basedir check from sys.path iteration
236
+ - Introduce _PathLike type alias for cleaner signatures
237
+ - Fix is_fifo() bug: use os.path.isfile() for __init__.py check
238
+
239
+ Warm namespace-cache scenario: 19.30s -> 13.84s (-28.3%).
240
+ Pathlib calls reduced by 78-100%, posix.stat calls by 35%.
241
+
242
+ - **robot:** Cache KeywordMatcher and add dict-index to KeywordStore ([5d21baf](https://github.com/robotcodedev/robotcode/commit/5d21bafb711091112d473f3d5c9c47865a22796d))
243
+
244
+ - Cache KeywordMatcher on KeywordDoc via lazy-init _matcher slot,
245
+ eliminating 7.5M redundant instantiations per analysis run
246
+ - Add dict-index (_index + _embedded) to KeywordStore for O(1)
247
+ keyword lookup by normalized name; linear scan only for embedded
248
+ keywords
249
+ - Add __getstate__/__setstate__ to KeywordDoc and KeywordStore to
250
+ exclude transient fields (_matcher, _index, _embedded, parent,
251
+ _hash_value, _stable_id) from pickle serialization
252
+ - Restore parent references in LibraryDoc.__setstate__ via
253
+ _update_keywords after deserialization
254
+ - Remove unused nosave metadata from argument_definitions, parent,
255
+ and keyword_doc fields
256
+ - Fix Application.keyboard_interrupt to use self.exit() for
257
+ consistent shutdown behavior
258
+
259
+ Measured improvement (cProfile, 1065 Robot files):
260
+ - Warm no-NS: 37.46s -> 29.25s (-22%)
261
+ - Cold no-NS: 42.94s -> 33.39s (-22%)
262
+ - Keyword matching: ~9.0s -> ~0.5s (-94%)
263
+ - Function calls: 118M -> 81M (-31%)
264
+
265
+ - **robot:** Optimize dataclass identity for ProjectIndex caching ([deedd7b](https://github.com/robotcodedev/robotcode/commit/deedd7be944b426f4f9d65ff90fbfae464f33086))
266
+
267
+ Prepare VariableDefinition, KeywordDoc, and LibraryDoc for efficient
268
+ use as dictionary keys in the upcoming ProjectIndex disk cache and
269
+ cross-process worker communication.
270
+
271
+
272
+
273
+ ### Refactor
274
+
275
+ - **cache:** Optimize SqliteDataCache with lazy deserialization and per-section tables ([eeec613](https://github.com/robotcodedev/robotcode/commit/eeec61379aa9bca255389d8f60246a140b0bc0db))
276
+
277
+ Replace single cache_entries table with per-section tables (libdoc,
278
+ variables, resource, namespace) for better query performance.
279
+
280
+ Introduce CacheEntry with lazy meta/data deserialization — data blobs
281
+ are only unpickled on cache hit, avoiding expensive deserialization on
282
+ meta mismatch.
283
+
284
+ Move version checking from per-entry meta_version field to DB-level
285
+ app_version parameter. On version mismatch all tables are dropped and
286
+ recreated automatically.
287
+
288
+ Simplify cache API from 3 methods (cache_data_exists, read_cache_data,
289
+ save_cache_data) to 2 (read_entry, save_entry), reducing DB
290
+ round-trips from 3 to 1 for reads and 2 to 1 for writes.
291
+
292
+ Remove filepath_base property (adler32 hash-based keys) from all
293
+ metadata classes — cache keys now use source paths or library names
294
+ directly.
295
+
296
+ - **diagnostics:** Extract _run_in_subprocess and _save_import_cache helpers ([0c347fd](https://github.com/robotcodedev/robotcode/commit/0c347fd9a55f4e9cca8a86628addd297df52e468))
297
+
298
+ - Unify duplicated ProcessPoolExecutor lifecycle from
299
+ _get_library_libdoc and _get_variables_libdoc into _run_in_subprocess
300
+ - Unify duplicated cache save logic into _save_import_cache
301
+
302
+ - **diagnostics:** Deduplicate and optimize metadata classes in imports_manager ([a0cb4c6](https://github.com/robotcodedev/robotcode/commit/a0cb4c6820f895e2e56bbeb20a406ba2270f2a46))
303
+
304
+ - Extract _collect_library_mtimes() to unify duplicated mtime collection
305
+ from get_library_meta and get_variables_meta, using os.walk instead of
306
+ Path.rglob for better performance
307
+ - Extract _matches_any_pattern() to unify triplicated pattern matching
308
+ - Add slots=True to LibraryMetaData, RobotFileMeta, and NamespaceMetaData
309
+ - Move mtime collection into dataclass constructors to avoid post-init mutation
310
+ - Remove unused itertools import
311
+
312
+ - **jsonrpc2:** Harden resource lifecycle without __del__ ([5cb7bb7](https://github.com/robotcodedev/robotcode/commit/5cb7bb71fac305a8dc7039187c4b076ab7d90bbd))
313
+
314
+ - remove __del__-based resource cleanup from server, debugger client, and protocol
315
+ - move shutdown to explicit close/close_async paths
316
+ - make JsonRPCServer.close wait for server shutdown when safe
317
+ - add best-effort weakref finalizers for forgotten cleanup without noisy warnings
318
+ - unify runtime and finalizer bookkeeping into shared state objects
319
+
320
+ - **robot:** Remove unnecessary type casting in CacheEntry ([c4eb160](https://github.com/robotcodedev/robotcode/commit/c4eb160b6d02ce95e51f3c0084cdf9ccf209bd75))
321
+ - **robot:** Optimize RF_VERSION checks with module-level dispatch ([eec1627](https://github.com/robotcodedev/robotcode/commit/eec1627f7777d17b8928ea6678b7905b9f933d5e))
322
+
323
+ - Remove redundant _ROBOT_VERSION alias in semantic_tokens.py
324
+ - Remove always-true RF >= 5.0 guards (minimum supported version)
325
+ - Use conditional class-level property/method definitions for
326
+ is_private and is_reserved in library_doc.py
327
+ - Add _RF7_PLUS module-level bool for BDD keyword search hot path
328
+ - Move ExceptHeader/WhileHeader imports to top-level (always available)
329
+
330
+ - **robot:** Replace Namespace getter methods with read-only properties ([127ad65](https://github.com/robotcodedev/robotcode/commit/127ad6550e691011b8916620b28765c5b3c039ed))
331
+ - **robot:** Extract Namespace into DTO with event-driven invalidation ([4f37419](https://github.com/robotcodedev/robotcode/commit/4f3741906798e9ff5a5263c7f1a8413b4e55ff66))
332
+
333
+ Split the monolithic Namespace class into focused modules to reduce
334
+ complexity and improve maintainability. The Namespace is now a pure data
335
+ container built by NamespaceBuilder, with dedicated modules for import
336
+ resolution, AST analysis, variable scoping, and scope trees.
337
+
338
+ - Introduce RF_VERSION constant and remove RF < 5.0 dead code ([02cf495](https://github.com/robotcodedev/robotcode/commit/02cf495faa1683a3ff6f62552cf1fb5d7f86454d))
339
+
340
+
341
+ - Add module-level RF_VERSION constant to robotcode.robot.utils,
342
+ resolved once at import time instead of repeated lru_cache lookups
343
+ - Remove dead code paths for Robot Framework < 5.0 (no longer supported),
344
+ including the internal tidy-based formatter and obsolete version branches
345
+ - Replace all ~134 get_robot_version() call sites across 27 files with
346
+ the RF_VERSION constant
347
+
348
+
349
+ ### Testing
350
+
351
+ - **namespace:** Ensure mtime differs on coarse resolution filesystems ([c2b6a79](https://github.com/robotcodedev/robotcode/commit/c2b6a7958dacb3efbb7d102ef0839dca7c05f92f))
352
+ - Add unit tests for SqliteDataCache backend functionality ([f315426](https://github.com/robotcodedev/robotcode/commit/f315426b5179c083eee8475734612bb5dddf4433))
353
+ - Improve resource file modification simulation for validation ([a3107fd](https://github.com/robotcodedev/robotcode/commit/a3107fda390dd4407526d3d32dfd15e76577cf51))
354
+ - Improve mtime simulation for file modification in namespace validation ([9a58278](https://github.com/robotcodedev/robotcode/commit/9a58278903b5bacdc1713fb454aa46fc71cbe8d9))
355
+
356
+
357
+ ## [2.4.0](https://github.com/robotcodedev/robotcode/compare/v2.3.1..v2.4.0) - 2026-03-17
358
+
359
+ ### Bug Fixes
360
+
361
+ - **dependencies:** Update click version to 8.2.0 in requirements files ([6e1220e](https://github.com/robotcodedev/robotcode/commit/6e1220e0542dc12a37dcb6c489d1653238ffbe8e))
362
+ - **vscode:** Fix invalid glob pattern in selectConfigurationProfiles ([58b5a8f](https://github.com/robotcodedev/robotcode/commit/58b5a8f1d1b8a2363a08b7872e20519316a44025))
363
+
364
+ Remove extra closing brace in the file extension glob pattern that
365
+ caused workspace folder detection to fail when selecting configuration
366
+ profiles.
367
+
368
+
369
+
370
+ ### Features
371
+
372
+ - **plugin:** Add fast exit option to Application.exit method ([acfa7e9](https://github.com/robotcodedev/robotcode/commit/acfa7e9a2d6b138f487183e19b8700d2e88db313))
373
+
374
+
375
+ ### Performance
376
+
377
+ - **diagnostics:** Skip full AST model parsing when no robotcode: markers present ([7b3999e](https://github.com/robotcodedev/robotcode/commit/7b3999e203209c67613f27fecacc943ac981d824))
378
+ - **robot:** Cache LibraryDoc for robot and resource files on disk ([9b89623](https://github.com/robotcodedev/robotcode/commit/9b896236c2590571fd5cb4cd95fbb156d0929cb1))
379
+
380
+ Resource and robot files are now cached on disk between sessions.
381
+ On subsequent opens, imports, keywords, and variables from these
382
+ files are loaded from cache instead of being re-parsed, resulting
383
+ in faster startup and quicker response times when navigating
384
+ projects with many resource files.
385
+
386
+ The cache is automatically invalidated when a file is modified
387
+ on disk. Files that are currently open in the editor always use
388
+ the live content and bypass the disk cache.
389
+
390
+ - **robot:** Remove unnecessary token list caching from document cache ([5f8591d](https://github.com/robotcodedev/robotcode/commit/5f8591d9a079261769d4a2c718c53124c22d510b))
391
+
392
+ Token lists were cached separately in document._cache, but only used
393
+ as intermediate input for AST model building. No external caller ever
394
+ accessed the cached token lists directly.
395
+
396
+ Move token generation into model builder methods so tokens are only
397
+ produced on cache miss. On cache hit, neither tokenization nor model
398
+ building occurs.
399
+
400
+ - Eliminates up to 6 cached token lists per document in Language Server
401
+ - No behavior change for CLI (tokens were already uncached for version=None)
402
+ - Remove ~80 lines of redundant caching infrastructure
403
+
404
+ - **robot:** Use file_id tuples instead of os.path.samefile for path comparison ([3f3bd84](https://github.com/robotcodedev/robotcode/commit/3f3bd8430a5c745bae6d0274ab4001acbe73044e))
405
+
406
+ Replace repeated os.path.samefile() calls (2x stat per call) in namespace
407
+ import loops with pre-computed (st_dev, st_ino) tuple comparisons.
408
+
409
+ - Add FileId type, file_id() and same_file_id() to core utils
410
+ - Add lazy source_id property to LibraryDoc (excluded from pickle)
411
+ - Pre-compute source_id on Namespace init
412
+ - Compute file_id once per find_resource result instead of per-iteration
413
+
414
+
415
+
416
+ ### Refactor
417
+
418
+ - **imports_manager:** Cleanup and fix correctness issues ([25ef49c](https://github.com/robotcodedev/robotcode/commit/25ef49c3ea0fec68f4f36a702e8f20a3c32c5537))
419
+ - **robot:** Remove unnecessary finalizers and dispose chain ([eaa7e14](https://github.com/robotcodedev/robotcode/commit/eaa7e14e2672cbf8da49a2eb58205384bd34c9cf))
420
+
421
+ Remove redundant _release_watchers_finalizer from _ImportEntry — file
422
+ watcher cleanup is already handled explicitly by _remove_file_watcher()
423
+ during invalidation and by server_shutdown() at LS shutdown.
424
+
425
+ Remove the _dispose_finalizer/dispose() chain through ImportsManager,
426
+ DocumentsCacheHelper, RobotFrameworkLanguageProvider, CodeAnalyzer, and
427
+ CLI. With the per-entry finalizers gone, these only cleared dicts that
428
+ Python already cleans up at process exit.
429
+
430
+ Fix broken finalizer in Workspace.add_file_watchers() where the closure
431
+ captured the entry object, preventing it from ever being garbage
432
+ collected.
433
+
434
+ Set atexit=False on sentinel finalizers so they only fire during normal
435
+ GC (needed for LS live cleanup), not at interpreter shutdown.
436
+
437
+ - **robot:** Replace __del__ with weakref.finalize in imports_manager ([e0e8d81](https://github.com/robotcodedev/robotcode/commit/e0e8d81219d1da8682839ab804cbc94408cf7d3f))
438
+
439
+ Replace fragile `__del__` methods with `weakref.finalize` in both
440
+ `_ImportEntry` and `ImportsManager` for reliable cleanup:
441
+
442
+ - _ImportEntry: register finalizer in __init__ with file_watchers list
443
+ and file_watcher_manager as strong refs (no self access needed);
444
+ change _remove_file_watcher to use .clear() instead of = []
445
+ - ImportsManager: register finalizer lazily in executor property when
446
+ ProcessPoolExecutor is created; add static _shutdown_executor callback
447
+
448
+ weakref.finalize is guaranteed to run even with circular references
449
+ and does not prevent garbage collection of reference cycles.
450
+
451
+
452
+
453
+ ### Testing
454
+
455
+ - Add library folder to test project ([45c410f](https://github.com/robotcodedev/robotcode/commit/45c410f452393068afbff24b68f28ef6cd0936d0))
456
+
457
+
5
458
  ## [2.3.1](https://github.com/robotcodedev/robotcode/compare/v2.3.0..v2.3.1) - 2026-03-12
6
459
 
7
460
  ### Bug Fixes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: robotcode
3
- Version: 2.3.1
3
+ Version: 2.5.0
4
4
  Summary: Command line interface for RobotCode
5
5
  Project-URL: Homepage, https://robotcode.io
6
6
  Project-URL: Donate, https://opencollective.com/robotcode
@@ -48,23 +48,23 @@ Requires-Dist: robotcode-repl-server; extra == 'all'
48
48
  Requires-Dist: robotcode-runner; extra == 'all'
49
49
  Requires-Dist: robotframework-robocop>=6.0.0; extra == 'all'
50
50
  Provides-Extra: analyze
51
- Requires-Dist: robotcode-analyze==2.3.1; extra == 'analyze'
51
+ Requires-Dist: robotcode-analyze==2.5.0; extra == 'analyze'
52
52
  Provides-Extra: colored
53
53
  Requires-Dist: rich; extra == 'colored'
54
54
  Provides-Extra: debugger
55
- Requires-Dist: robotcode-debugger==2.3.1; extra == 'debugger'
55
+ Requires-Dist: robotcode-debugger==2.5.0; extra == 'debugger'
56
56
  Provides-Extra: languageserver
57
- Requires-Dist: robotcode-language-server==2.3.1; extra == 'languageserver'
57
+ Requires-Dist: robotcode-language-server==2.5.0; extra == 'languageserver'
58
58
  Provides-Extra: lint
59
59
  Requires-Dist: robotframework-robocop>=2.0.0; extra == 'lint'
60
60
  Provides-Extra: repl
61
- Requires-Dist: robotcode-repl==2.3.1; extra == 'repl'
61
+ Requires-Dist: robotcode-repl==2.5.0; extra == 'repl'
62
62
  Provides-Extra: replserver
63
- Requires-Dist: robotcode-repl-server==2.3.1; extra == 'replserver'
63
+ Requires-Dist: robotcode-repl-server==2.5.0; extra == 'replserver'
64
64
  Provides-Extra: rest
65
65
  Requires-Dist: docutils; extra == 'rest'
66
66
  Provides-Extra: runner
67
- Requires-Dist: robotcode-runner==2.3.1; extra == 'runner'
67
+ Requires-Dist: robotcode-runner==2.5.0; extra == 'runner'
68
68
  Provides-Extra: yaml
69
69
  Requires-Dist: pyyaml>=5.4; extra == 'yaml'
70
70
  Description-Content-Type: text/markdown
@@ -20,6 +20,7 @@ dependencies = [
20
20
  "pytest_asyncio>=0.23",
21
21
  "pytest-rerunfailures",
22
22
  "pytest-cov",
23
+ "pytest-mock",
23
24
  "mypy",
24
25
  "ruff",
25
26
  "debugpy",
@@ -41,6 +42,7 @@ test-reset = "pytest --regtest2-reset {args}"
41
42
  create-json-schema = "python ./scripts/create_robot_toml_json_schema.py"
42
43
  generate-rf-options = "python ./scripts/generate_rf_options.py"
43
44
  generate-tmlanguage = "python ./scripts/generate_tmlanguage.py"
45
+ create-cmd-line-docs = "python ./scripts/create_cmdline_doc.py"
44
46
 
45
47
  [envs.rfbeta]
46
48
  python = "3.13"
@@ -92,7 +94,7 @@ matrix.rf.dependencies = [
92
94
  ]
93
95
 
94
96
  [envs.hatch-test]
95
- dependencies = ["pytest", "pytest-html", "pytest_asyncio>=0.23", "pyyaml"]
97
+ dependencies = ["pytest", "pytest-html", "pytest-mock", "pytest_asyncio>=0.23", "pyyaml"]
96
98
  pre-install-commands = ["python ./scripts/install_packages.py"]
97
99
 
98
100
  [[envs.test.matrix]]
@@ -52,15 +52,15 @@ dependencies = ["robotcode-core", "robotcode-plugin", "robotcode-robot"]
52
52
  dynamic = ["version"]
53
53
 
54
54
  [project.optional-dependencies]
55
- debugger = ["robotcode-debugger==2.3.1"]
56
- languageserver = ["robotcode-language-server==2.3.1"]
57
- runner = ["robotcode-runner==2.3.1"]
58
- analyze = ["robotcode-analyze==2.3.1"]
55
+ debugger = ["robotcode-debugger==2.5.0"]
56
+ languageserver = ["robotcode-language-server==2.5.0"]
57
+ runner = ["robotcode-runner==2.5.0"]
58
+ analyze = ["robotcode-analyze==2.5.0"]
59
59
  yaml = ["PyYAML>=5.4"]
60
60
  lint = ["robotframework-robocop>=2.0.0"]
61
61
  rest = ["docutils"]
62
- repl = ["robotcode-repl==2.3.1"]
63
- replserver = ["robotcode-repl-server==2.3.1"]
62
+ repl = ["robotcode-repl==2.5.0"]
63
+ replserver = ["robotcode-repl-server==2.5.0"]
64
64
  colored = ["rich"]
65
65
  all = [
66
66
  "robotcode-debugger",
@@ -0,0 +1 @@
1
+ __version__ = "2.5.0"
@@ -1 +0,0 @@
1
- __version__ = "2.3.1"
File without changes
File without changes