Skip to content

feat: load packages with compiled code, and reload earlier-loaded packages - #17

Merged
felix-andreas-finccam merged 1 commit into
mainfrom
feat/compiled-code
Oct 6, 2026
Merged

felix-andreas-finccam merged 1 commit into
mainfrom
feat/compiled-code

Conversation

@felix-andreas-finccam

Copy link
Copy Markdown
Contributor

Context

  • The engine's Rust code lives in a separate R package, rs (finccam-engine PR 9311). load_fast() could not load compiled code, so every Rust change needed R CMD INSTALL and a restart of R.

Changes

  • load_fast() loads a package with src/. When a file in DESCRIPTION, NAMESPACE, R/ or src/ changes, it builds the package with R CMD INSTALL into a new temporary library and loads it from there. The old library stays loaded, so objects that point into it stay valid.
  • Before it loads a package, load_fast() reloads the packages that it loaded earlier in the session, if their files changed. So after load_fast("rs") once, a plain load_fast() in the engine also picks up Rust changes.

🤖 Generated with Claude Code

…kages

load_fast() builds a package with src/ with R CMD INSTALL into a new temporary
library and loads it from there. It rebuilds when a file in DESCRIPTION,
NAMESPACE, R/ or src/ changed. Paths in .Rbuildignore do not count.

Before it loads a package, load_fast() reloads the packages that it loaded
earlier in the session, if their files changed. So one load_fast() call in the
package you work on picks up edits in its dependencies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@felix-andreas-finccam
felix-andreas-finccam merged commit 9e5185c into main Oct 6, 2026
7 checks passed
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