Skip to content

feat: cache imported library keywords between runs - #1830

Merged
bhirsz merged 1 commit into
feat/docs-project-rulesfrom
feat/project-library-cache
Aug 14, 2026
Merged

feat: cache imported library keywords between runs#1830
bhirsz merged 1 commit into
feat/docs-project-rulesfrom
feat/project-library-cache

Conversation

@bhirsz

@bhirsz bhirsz commented Aug 14, 2026

Copy link
Copy Markdown
Member

Project checks import libraries in a separate process, which is the slowest part of the analysis. This PR stores successful imports in the existing Robocop cache (.robocop_cache).

  • worker returns the library source path,
  • new libraries section in the cache, keyed by the import name/path and arguments,
  • entries are invalidated by the library source mtime/size and by a hash of the Python interpreter and Robot Framework version,
  • libraries located inside the analyzed project are never cached, since a change in any of their modules would not be detected,
  • failed imports are not cached,
  • honours --no-cache.

Stacked on #1829.

@bhirsz
bhirsz marked this pull request as ready for review August 14, 2026 16:46
@bhirsz
bhirsz force-pushed the feat/project-library-cache branch from 20628c0 to 77c828c Compare August 14, 2026 16:50
Store the result of the library import in the Robocop cache, so that project checks do not have to import the same libraries in every run. Entries are invalidated when the library source file, the Python interpreter or the Robot Framework version changes. Libraries that are part of the analyzed project are never cached.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bhirsz
bhirsz force-pushed the feat/project-library-cache branch from 77c828c to 6b5b6aa Compare August 14, 2026 16:56
@bhirsz
bhirsz merged commit 93a9fad into main Aug 14, 2026
22 checks passed
@bhirsz
bhirsz deleted the feat/project-library-cache branch August 14, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant