Add core script initializer - #155
Open
t-kalinowski wants to merge 4 commits into
Open
t-kalinowski wants to merge 4 commits into
t-kalinowski wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0aab09770b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
ir init --file FILEto turn an existing R script into a self-describing, executable ir script. This separates the core initializer from the project-provenance work in #154 so the in-place rewrite and static dependency discovery can be reviewed and released independently. The branch is based directly onmain.Closes #149.
User-facing changes
isolated: true, and the current UTCexclude-newerdate.#!/usr/bin/env -S ir runand makes the script executable on Unix.Static analysis cannot find package names computed at runtime, so users should inspect the generated metadata.
Scope
This PR deliberately does not inspect
renv.lock, pin installed package versions, or preserve repository or remote-source provenance. A nearby lockfile is ignored, and a public CLI regression covers that boundary. It does not add--no-project, project initialization, or Quarto initialization. Project-aware version and source conversion will be separate follow-up changes.Concurrent-edit detection covers changes between the initial read and the final pre-rename recheck. Portable filesystems do not provide a content-aware compare-and-replace operation, so a writer racing the final atomic rename itself is outside this command's concurrency contract.
Internal changes
renv::dependencies()static scanning and active-R classification.