Skip to content

Bump prism from 1.9.0 to 2.1.0 - #41

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/bundler/prism-2.1.0
Closed

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/bundler/prism-2.1.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 26, 2026

Copy link
Copy Markdown
Contributor

Bumps prism from 1.9.0 to 2.1.0.

Release notes

Sourced from prism's releases.

v2.1.0

Added

  • Add Version::CRuby4_0 to the Rust bindings. Version::CRuby3_5 remains available but is deprecated in favor of the new name; both select Ruby 4.0 syntax.
  • Let embedders set the allocation size for the first block allocated in an arena via PM_ARENA_INITIAL_SIZE.
  • Let embedders set the minimum initial size for the constant pool via PM_CONSTANT_POOL_MIN_CAPACITY.

v2.0.0

Highlights

  • Significant performance and memory usage improvements.
  • Precompiled platform-specific variants on rubygems.org.
  • Many documentation improvements, including a new playground.
  • Prism now ships accurate and complete RBS and RBI definitions.
  • The license is now owned by the Ruby developers.
  • Prism now ships an official C++ interface.

Added

  • Support for parsing Ruby 4.1 syntax:
    • Add support for &nil to declare that a method accepts no block.
    • Thoroughly implement void value expression check.
    • Allow trailing commas in method signatures like def foo(a,); end.
    • Reject END { break } and END { next }.
    • a /b/ no longer warns about ambiguous /.
  • version: "nearest" is now supported. It behaves similarly to version: "current" but will not raise when the version is unsupported, instead falling back to the nearest syntax version prism currently supports.
  • raise_error was added as a valid option. Prism will raise a SyntaxError when given syntax-invalid code. When true is given, prism decides the formatting (tty?, NO_COLOR, etc.). If you need a specific style, :plain, :style, and :color are also supported values.
  • Added Prism::ParseResult#continuable to check if the parsed source can become valid by appending more code.
  • Prism.find takes a Method, UnboundMethod, Proc, or Thread::Backtrace::Location and returns the associated prism AST node.
  • ForwardingSuperNode now has keyword_loc.
  • Allow pattern matching with prism nodes to match on location slices, like node in Prism::StringNode[content: "foo"].
  • Prism.parse_file and similar now accept anything responding to to_path (like Pathname) directly.
  • attach_comments was added as a valid option. Each comment is attached to the node that ends latest on the comment's line before it, otherwise to the innermost node that contains it (or to that node's statements, if only whitespace and comments come between the comment and the statements), otherwise to the top-level statements. The attached comments are available through Node#comments and through pm_node_comments_size and pm_node_comment in the C API, as well as pm_parser_comment_attachment, pm_parser_comment_ranges_size, and pm_parser_comment_range, which expose the attachments grouped by node. When the option is set, the comments on the parse result are sorted by start offset.
  • StringQuery#keyword? was added to check if the string query matches a keyword.
  • Source#checksum was added to retrieve the checksum of the source content.

Changed

Note that for this major version, almost every change listed below is breaking.

  • Prism now defaults to version: "nearest" instead of version: "latest", so code is parsed with the syntax of the running Ruby (or the closest version prism supports). Pass version: "latest" to keep the previous behavior.
  • MissingNode has been replaced by ErrorRecoveryNode. ErrorRecoveryNode wraps unexpected nodes, so when walking syntax-invalid code you will now only need to handle this one specific node type.
  • Some fields were renamed for consistency. Previous names are aliased and will continue to work in the Ruby layer.
    • InNode#{in,then}_loc -> InNode#{in,then}_keyword_loc
    • MatchPredicateNode#operator_loc -> MatchPredicateNode#keyword_loc
    • UnlessNode#keyword_loc -> UnlessNode#unless_keyword_loc
    • UntilNode#{keyword,closing}_loc -> UntilNode#{until,end}_keyword_loc
    • WhenNode#keyword_loc -> WhenNode#when_keyword_loc
    • WhileNode#{keyword,closing}_loc -> WhileNode#{while,end}_keyword_loc
  • Optional locations like StringNode#closing_loc in 'foo that were empty for syntax-invalid code will now be nil instead.

... (truncated)

Changelog

Sourced from prism's changelog.

[2.1.0] - 2026-10-28

Added

  • Add Version::CRuby4_0 to the Rust bindings. Version::CRuby3_5 remains available but is deprecated in favor of the new name; both select Ruby 4.0 syntax.
  • Let embedders set the allocation size for the first block allocated in an arena via PM_ARENA_INITIAL_SIZE.
  • Let embedders set the minimum initial size for the constant pool via PM_CONSTANT_POOL_MIN_CAPACITY.

[2.0.0] - 2026-10-21

Highlights

  • Significant performance and memory usage improvements.
  • Precompiled platform-specific variants on rubygems.org.
  • Many documentation improvements, including a new playground.
  • Prism now ships accurate and complete RBS and RBI definitions.
  • The license is now owned by the Ruby developers.
  • Prism now ships an official C++ interface.

Added

  • Support for parsing Ruby 4.1 syntax:
    • Add support for &nil to declare that a method accepts no block.
    • Thoroughly implement void value expression check.
    • Allow trailing commas in method signatures like def foo(a,); end.
    • Reject END { break } and END { next }.
    • a /b/ no longer warns about ambiguous /.
  • version: "nearest" is now supported. It behaves similarly to version: "current" but will not raise when the version is unsupported, instead falling back to the nearest syntax version prism currently supports.
  • raise_error was added as a valid option. Prism will raise a SyntaxError when given syntax-invalid code. When true is given, prism decides the formatting (tty?, NO_COLOR, etc.). If you need a specific style, :plain, :style, and :color are also supported values.
  • Added Prism::ParseResult#continuable to check if the parsed source can become valid by appending more code.
  • Prism.find takes a Method, UnboundMethod, Proc, or Thread::Backtrace::Location and returns the associated prism AST node.
  • ForwardingSuperNode now has keyword_loc.
  • Allow pattern matching with prism nodes to match on location slices, like node in Prism::StringNode[content: "foo"].
  • Prism.parse_file and similar now accept anything responding to to_path (like Pathname) directly.
  • attach_comments was added as a valid option. Each comment is attached to the node that ends latest on the comment's line before it, otherwise to the innermost node that contains it (or to that node's statements, if only whitespace and comments come between the comment and the statements), otherwise to the top-level statements. The attached comments are available through Node#comments and through pm_node_comments_size and pm_node_comment in the C API, as well as pm_parser_comment_attachment, pm_parser_comment_ranges_size, and pm_parser_comment_range, which expose the attachments grouped by node. When the option is set, the comments on the parse result are sorted by start offset.
  • StringQuery#keyword? was added to check if the string query matches a keyword.
  • Source#checksum was added to retrieve the checksum of the source content.

Changed

Note that for this major version, almost every change listed below is breaking.

  • Prism now defaults to version: "nearest" instead of version: "latest", so code is parsed with the syntax of the running Ruby (or the closest version prism supports). Pass version: "latest" to keep the previous behavior.
  • MissingNode has been replaced by ErrorRecoveryNode. ErrorRecoveryNode wraps unexpected nodes, so when walking syntax-invalid code you will now only need to handle this one specific node type.
  • Some fields were renamed for consistency. Previous names are aliased and will continue to work in the Ruby layer.
    • InNode#{in,then}_loc -> InNode#{in,then}_keyword_loc
    • MatchPredicateNode#operator_loc -> MatchPredicateNode#keyword_loc
    • UnlessNode#keyword_loc -> UnlessNode#unless_keyword_loc
    • UntilNode#{keyword,closing}_loc -> UntilNode#{until,end}_keyword_loc
    • WhenNode#keyword_loc -> WhenNode#when_keyword_loc

... (truncated)

Commits
  • ca15cb3 Bump to v2.1.0
  • f654777 Bump org.apache.maven.plugins:maven-surefire-plugin
  • 841eb2b Move fuzz tests under test
  • 9016780 Move cpp tests under test
  • 19762c9 Test embedded in CI
  • 7ed8c71 Let an embedder set PM_CONSTANT_POOL_MIN_CAPACITY
  • ff42521 Include sys/types.h before inttypes.h again, for newlib
  • f7a062e Let an embedder set PM_ARENA_INITIAL_SIZE
  • 557cffe Avoid vsnprintf when possible
  • 30a2555 Scratch arena
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [prism](https://github.com/ruby/prism) from 1.9.0 to 2.1.0.
- [Release notes](https://github.com/ruby/prism/releases)
- [Changelog](https://github.com/ruby/prism/blob/main/CHANGELOG.md)
- [Commits](ruby/prism@v1.9.0...v2.1.0)

---
updated-dependencies:
- dependency-name: prism
  dependency-version: 2.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code labels Nov 26, 2026
@developerz-ai

developerz-ai Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Needs a human: sebyx07/ruby2html #41: a major dependency update breaks this repository's checks and needs a migration.

This dependency update moves a package to a new major version (or a new 0.x minor, which semver treats the same way), and checks of this pull request's own fail on it, not checks the base branch fails too. Adapting the code to a breaking release is an API migration, a decision about this repository rather than a fix to this pull request, so the platform runs no automatic fix rounds on it and files one tracking issue for the migration instead. Migrate the code on this branch and push, or tell the dependency bot to skip this major version and close the pull request.

@sebyx07

sebyx07 commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Closing: the Gemfile pins prism ~> 1.6 because phlex/refract don't support prism 2; prism majors are ignored in .github/dependabot.yml (#43) until they do.

@sebyx07 sebyx07 closed this Nov 26, 2026
@developerz-ai
developerz-ai Bot deleted the dependabot/bundler/prism-2.1.0 branch November 26, 2026 15:07
sebyx07 added a commit that referenced this pull request Nov 26, 2026
Dependabot: ignore `prism` majors. The Gemfile pins `prism ~> 1.6`
because phlex 2 (via refract) uses `Prism::MissingNode`, which prism 2
removed, so the prism 2.1.0 PR (#41) fails CI. Without the ignore,
Dependabot reopens it for every new 2.x. Minor and patch prism updates
still arrive in `bundler-minor`. Re-enable when phlex/refract support
prism 2, and drop the Gemfile pin in the same PR.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant