Draft
Conversation
Add R as a new supported scripting language in Windmill, following the same pattern used for Ruby. Includes: - Backend: ScriptLang::Rlang enum variant, DB migration, tree-sitter-r parser crate with tests, WASM parser binding, R executor with NSJail sandboxing, job dispatch and signature parsing - Frontend: language picker, R icon, syntax highlighting, editor bar insertions (Sys.getenv, get_variable, get_resource), schema inference, init code template, BETA badge - CLI: .r extension mapping, sync support, bootstrap template R scripts use `main <- function(...)` syntax, jsonlite for JSON serialization, and system curl for the Windmill client helper. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Parse library()/require() calls from R scripts to extract dependencies. Resolve versions from CRAN, cache lockfiles in pip_resolution_cache, and install packages to a shared R library cache. The run step sets R_LIBS_USER so installed packages are available to the script. - Parser: parse_r_requirements() extracts package names from AST - Executor: resolve() generates lockfile, install() installs from CRAN - Worker lockfiles: wire up R resolve for dependency jobs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… tests Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…_resource Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
Add R as a new supported scripting language in Windmill, following the Ruby executor pattern. Users can write R scripts with
main()functions, uselibrary()/require()for dependencies (auto-detected and installed from CRAN), and access Windmill variables/resources via built-in helpers.Changes
Rlangvariant inScriptLangenum, DB migration, worker tagswindmill-parser-r): tree-sitter-r based parser formain()signature extraction andlibrary()/require()dependency detectionparse_rbinding for frontend schema inferencer_executor.rs): Full resolve → install → run pipelineR_CACHE_DIR/r_site_library/), skips already-installed versionsget_variable()andget_resource()using base Rurl()+readLines()# sandboxannotation support for per-script sandboxingtest_r_job,test_r_get_variable,test_r_get_resourceTest plan
cargo check --features rlang— compiles cleanlycargo test -p windmill-parser-r— 9 parser tests passcargo test --features rlang test_r_job— basic R execution workscargo test --features rlang test_r_get_variable— variable fetching workscargo test --features rlang test_r_get_resource— resource fetching worksnpm run check:fast— frontend types passGenerated with Claude Code