Skip to content

upgrade risor engine to v2#74

Merged
robbyt merged 4 commits intomainfrom
rterhaar/risor-v2
Apr 12, 2026
Merged

upgrade risor engine to v2#74
robbyt merged 4 commits intomainfrom
rterhaar/risor-v2

Conversation

@robbyt
Copy link
Copy Markdown
Owner

@robbyt robbyt commented Feb 10, 2026

Introduces a major breaking change, to switch the risor engine to the latest v2 language syntax.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 10, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA e40f7e1.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

OpenSSF Scorecard

PackageVersionScoreDetails
gomod/github.com/deepnoodle-ai/risor/v2 2.1.0 UnknownUnknown
gomod/github.com/deepnoodle-ai/wonton 0.0.26 UnknownUnknown

Scanned Files

  • go.mod

@sonarqubecloud
Copy link
Copy Markdown

update to risor 2.0.1

update examples and comments for new risor v2 syntax
@robbyt robbyt force-pushed the rterhaar/risor-v2 branch from 519f2a6 to 2b7dfea Compare April 9, 2026 22:55
Copilot AI review requested due to automatic review settings April 9, 2026 22:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Upgrades the Risor engine integration to risor v2 and updates the codebase (docs, examples, and tests) to match the new language/runtime APIs and syntax.

Changes:

  • Bump Risor dependency to github.com/deepnoodle-ai/risor/v2 and adjust imports/types accordingly.
  • Update Risor script syntax across docs/tests/examples (e.g., let, function, parentheses in if).
  • Rework Risor compiler/evaluator integration to use v2 bytecode/compiler/parser APIs and env-based execution.

Reviewed changes

Copilot reviewed 26 out of 27 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
README.md Updates Risor description and Quick Start script syntax to v2 style.
readme_test.go Aligns README-backed tests with new Risor syntax.
polyscript_test.go Updates Risor snippets used in high-level polyscript tests for v2.
platform/evaluator_test.go Updates Risor script used in platform evaluator tests to v2 syntax.
go.mod Switches Risor dependency from risor-io/risor to deepnoodle-ai/risor/v2 and adds indirect deps.
go.sum Updates checksums for the new Risor v2 dependency graph.
examples/simple/risor/testdata/script.risor Updates example Risor script to v2 syntax.
examples/simple/README.md Updates documented Risor data access syntax to v2 (let).
examples/README.md Updates Risor repository link to deepnoodle-ai fork.
examples/multiple-instantiation/risor/testdata/script.risor Updates example Risor script to v2 syntax.
examples/data-prep/risor/testdata/script.risor Rewrites the data-prep Risor example from old func/:= style to v2 style.
engines/risor/new_test.go Updates Risor engine “new” tests to v2 syntax and behavior.
engines/risor/internal/converters.go Replaces option-based globals injection with env map construction using Risor builtins.
engines/risor/internal/converters_test.go Adds coverage asserting env includes ctx key + builtins.
engines/risor/evaluator/response.go Updates Risor object imports to v2 package paths.
engines/risor/evaluator/response_test.go Updates mock interface expectations for Risor v2 object API changes.
engines/risor/evaluator/evaluator.go Migrates execution to risor.Run with env maps + v2 bytecode/type registry.
engines/risor/evaluator/evaluator_test.go Updates evaluator tests for new Risor syntax and bytecode type.
engines/risor/compiler/internal/compile/compile.go Migrates parsing/compilation to v2 parser/compiler and env-driven global name derivation.
engines/risor/compiler/internal/compile/compile_test.go Updates compiler-internal tests to v2-compatible scripts.
engines/risor/compiler/executable.go Updates executable bytecode type from v1 compiler code to v2 bytecode.
engines/risor/compiler/executable_test.go Updates executable tests for v2 bytecode and script syntax.
engines/risor/compiler/compiler.go Updates comment-only detection for Risor scripts to // comment prefix.
engines/risor/compiler/compiler_test.go Updates compiler tests to v2 script syntax and updated error scenario names.
engines/risor/adapters/interfaces.go Updates adapter interface to return v2 bytecode type.
engines/README.md Updates embedded Risor examples to v2 syntax.
engines/integration_test.go Updates Risor integration tests/scripts to v2 syntax across scenarios.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread engines/risor/compiler/internal/compile/compile.go
Comment thread engines/risor/internal/converters.go
@sonarqubecloud
Copy link
Copy Markdown

@robbyt robbyt merged commit 16084be into main Apr 12, 2026
3 checks passed
@robbyt robbyt deleted the rterhaar/risor-v2 branch April 12, 2026 22:34
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.

2 participants