Skip to content

Switch the default parser from parse.y to Prism #11497

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Sep 12, 2024

Conversation

kddnewton
Copy link
Contributor

@kddnewton kddnewton commented Aug 29, 2024

This commit switches the default parser to Prism. There are a couple of additional changes related to this that are a part of this as well to make this happen.

  • Switch the default parser in parse.h
  • Remove the Prism-specific workflow and add a parse.y-specific workflow to CI so that it continues to be tested
  • Update a few test exclusions since Prism has the correct behavior but parse.y doesn't per https://bugs.ruby-lang.org/issues/20504.
  • Fixes a small bug found in this PR found related to static literals.
  • Skips a couple of tests on RBS which are failing because they are using RubyVM::AbstractSyntaxTree.of.

Fixes Feature #20564

This comment has been minimized.

Copy link

All Tests passed!

✖️no tests failed ✔️33554 tests passed(1 flake)

matzbot pushed a commit that referenced this pull request Aug 29, 2024
The keyword tries to remove a method of the same name which is unlikely
to be the intention of this test:

    $ ruby -e 'undef Object'
    -e:1:in '<main>': undefined method 'Object' for class 'Object' (NameError)

Found looking at GH-11497. The NameError triggers error_highlight, which
loads a bunch of file under GC.stress set by this test when using Prism.
That takes a long time, causing a timeout.
@soutaro
Copy link
Member

soutaro commented Aug 30, 2024

test-bundled-gems are failing with rbs-gem test fails (and other fails).

The fails are RuntimeError: cannot get AST for ISEQ compiled by prism raised by RubyVM::AbstractSyntaxTree.of. I think skipping the failing tests in this repo makes more sense than waiting for the next release of rbs-gem.

Adding these lines to tool/rbs_skip_tests will make the rbs test pass.

# Switching to prism resulted in an unexpected error, `RuntimeError: cannot get AST for ISEQ compiled by prism`, raised by `RubyVM::AbstractSyntax.of(method)`
test_1(RBS::RuntimePrototypeTest)
test_decls_for_anonymous_class_or_module(RBS::RuntimePrototypeTest)
test_decls_structure(RBS::RuntimePrototypeTest)
test_define_method_alias(RBS::RuntimePrototypeTest)
test_for_initialize_type(RBS::RuntimePrototypeTest)
test_for_overwritten_module_name(RBS::RuntimePrototypeTest)
test_for_yield(RBS::RuntimePrototypeTest)
test_include_owner(RBS::RuntimePrototypeTest)
test_merge_types(RBS::RuntimePrototypeTest)
test_reflection(RBS::RuntimePrototypeTest)
test_todo(RBS::RuntimePrototypeTest)

@kddnewton kddnewton force-pushed the switch-parser branch 7 times, most recently from 47bc0ba to 90565f7 Compare September 3, 2024 17:20
@kddnewton
Copy link
Contributor Author

@mame the typeprof test suite is failing with some failed assertions that only appear to happen on the SHA in gems/bundled_gems. If I run this version of Ruby with typeprof HEAD, everything passes. Would it be alright to update the SHA for typeprof on Ruby master?

@mame
Copy link
Member

mame commented Sep 4, 2024

@kddnewton The typeprof master is being rebuilt from scratch and is very different from the current bundled version. I hope to have it bundled by the end of this year, but for now, please wait a bit.
In order to merge this PR, can you please add typeprof to TEST_BUNDLED_GEMS_ALLOW_FAILURES and ignore the failure?

TEST_BUNDLED_GEMS_ALLOW_FAILURES: ''

@kddnewton
Copy link
Contributor Author

@mame yes, will do. Thank you!

@kddnewton kddnewton force-pushed the switch-parser branch 5 times, most recently from 229894e to ec3edce Compare September 10, 2024 18:41
@kddnewton kddnewton force-pushed the switch-parser branch 3 times, most recently from 8737a15 to 8e2b40f Compare September 11, 2024 16:18
This commit switches the default parser to Prism. There are a
couple of additional changes related to this that are a part of
this as well to make this happen.

* Switch the default parser in parse.h
* Remove the Prism-specific workflow and add a parse.y-specific
  workflow to CI so that it continues to be tested
* Update a few test exclusions since Prism has the correct
  behavior but parse.y doesn't per
  https://bugs.ruby-lang.org/issues/20504.
* Skips a couple of tests on RBS which are failing because they
  are using RubyVM::AbstractSyntaxTree.of.

Fixes [Feature #20564]
The description has been updated when running with Prism to have
+PRISM, which means that tests asserting against the description
when running with --parser=parse.y will be incorrect if the
subprocess ends up using Prism. We need to fix these tests, but
we are currently disabling them in order to get this over the line.
@kddnewton kddnewton merged commit 9c461cd into ruby:master Sep 12, 2024
108 checks passed
@kddnewton kddnewton deleted the switch-parser branch September 12, 2024 17:43
yahonda added a commit to yahonda/rails that referenced this pull request Sep 15, 2024
… by prism" if Ruby parse is Prism

This commit addresses these CI failures.
https://buildkite.com/rails/rails-nightly/builds/1023#0191ed31-1d8d-41e5-906b-e3b88aab79da

Ruby 3.4.0dev default parser has been switched to Prism, After the default parser is switched from parse.y to Prism
some of Active Support tests get failed with "cannot get AST for ISEQ compiled by prism" message.

According to ruby/ruby#9934 , it looks an expected behavior of Ruby with Prism parser
then this commit adds the `prism_skip` method following the naming `jruby_skip`

According to ruby/ruby#9934, this seems to be the expected behavior of Ruby with the Prism parser.
This commit adds the `prism_skip` method following the naming convention of `jruby_skip` that has been removed
via rails#49454 .

- This commit addresses these failures against Ruby 3.4.0dev with Prism parser.
```ruby
$ ruby -v
ruby 3.4.0dev (2024-09-15T01:06:11Z master 532af89e3b) +PRISM [x86_64-linux]
$ cd activesupport
$ bin/test -n "/^(?:TestOrderTest#(?:test_test_order_is_global)|AssertionsTest#(?:test_assert_changes_message_with_lambda|test_assert_difference_message_with_lambda|test_assert_no_changes_message_with_lambda|test_assert_no_changes_message_with_multi_line_lambda|test_assert_no_difference_with_multiple_expressions_fail)|ExceptionsInsideAssertionsTest#(?:test_warning_is_not_logged_if_assertions_are_nested_correctly))$/"
/home/yahonda/.gem/ruby/3.4.0+0/gems/json-2.7.1/lib/json/common.rb:3: warning: ostruct was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
You can add ostruct to your Gemfile or gemspec to silence this warning.
WARNING: Nokogiri was built against libxml version 2.12.9, but has dynamically loaded 2.9.14

Run options: -n "/^(?:TestOrderTest#(?:test_test_order_is_global)|AssertionsTest#(?:test_assert_changes_message_with_lambda|test_assert_difference_message_with_lambda|test_assert_no_changes_message_with_lambda|test_assert_no_changes_message_with_multi_line_lambda|test_assert_no_difference_with_multiple_expressions_fail)|ExceptionsInsideAssertionsTest#(?:test_warning_is_not_logged_if_assertions_are_nested_correctly))$/" --seed 65502

F

Failure:
ExceptionsInsideAssertionsTest#test_warning_is_not_logged_if_assertions_are_nested_correctly [test/test_case_test.rb:508]:
[Minitest::Assertion] exception expected, not
Class: <RuntimeError>
Message: <"cannot get AST for ISEQ compiled by prism">
---Backtrace---
<internal:ast>:97:in 'RubyVM::AbstractSyntaxTree.of'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:304:in 'ActiveSupport::Testing::Assertions#_callable_to_source_string'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:270:in 'block in ActiveSupport::Testing::Assertions#assert_no_changes'
---------------

bin/test test/test_case_test.rb:507

F

Failure:
AssertionsTest#test_assert_changes_message_with_lambda [test/test_case_test.rb:252]:
[Minitest::Assertion] exception expected, not
Class: <RuntimeError>
Message: <"cannot get AST for ISEQ compiled by prism">
---Backtrace---
<internal:ast>:97:in 'RubyVM::AbstractSyntaxTree.of'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:304:in 'ActiveSupport::Testing::Assertions#_callable_to_source_string'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:213:in 'block in ActiveSupport::Testing::Assertions#assert_changes'
---------------

bin/test test/test_case_test.rb:249

F

Failure:
AssertionsTest#test_assert_no_changes_message_with_multi_line_lambda [test/test_case_test.rb:427]:
[Minitest::Assertion] exception expected, not
Class: <RuntimeError>
Message: <"cannot get AST for ISEQ compiled by prism">
---Backtrace---
<internal:ast>:97:in 'RubyVM::AbstractSyntaxTree.of'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:304:in 'ActiveSupport::Testing::Assertions#_callable_to_source_string'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:270:in 'block in ActiveSupport::Testing::Assertions#assert_no_changes'
---------------

bin/test test/test_case_test.rb:422

F

Failure:
AssertionsTest#test_assert_no_changes_message_with_lambda [test/test_case_test.rb:380]:
[Minitest::Assertion] exception expected, not
Class: <RuntimeError>
Message: <"cannot get AST for ISEQ compiled by prism">
---Backtrace---
<internal:ast>:97:in 'RubyVM::AbstractSyntaxTree.of'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:304:in 'ActiveSupport::Testing::Assertions#_callable_to_source_string'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:270:in 'block in ActiveSupport::Testing::Assertions#assert_no_changes'
---------------

bin/test test/test_case_test.rb:377

F

Failure:
AssertionsTest#test_assert_no_difference_with_multiple_expressions_fail [test/test_case_test.rb:78]:
[Minitest::Assertion] exception expected, not
Class: <RuntimeError>
Message: <"cannot get AST for ISEQ compiled by prism">
---Backtrace---
<internal:ast>:97:in 'RubyVM::AbstractSyntaxTree.of'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:304:in 'ActiveSupport::Testing::Assertions#_callable_to_source_string'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:122:in 'block (2 levels) in ActiveSupport::Testing::Assertions#assert_difference'
---------------

bin/test test/test_case_test.rb:76

F

Failure:
AssertionsTest#test_assert_difference_message_with_lambda [test/test_case_test.rb:176]:
[Minitest::Assertion] exception expected, not
Class: <RuntimeError>
Message: <"cannot get AST for ISEQ compiled by prism">
---Backtrace---
<internal:ast>:97:in 'RubyVM::AbstractSyntaxTree.of'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:304:in 'ActiveSupport::Testing::Assertions#_callable_to_source_string'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:122:in 'block (2 levels) in ActiveSupport::Testing::Assertions#assert_difference'
---------------

bin/test test/test_case_test.rb:173

.

Finished in 0.044451s, 157.4784 runs/s, 629.9136 assertions/s.
7 runs, 28 assertions, 6 failures, 0 errors, 0 skips
$
```

Refer to ruby/ruby#9934
ruby/ruby#11497
https://bugs.ruby-lang.org/issues/20564
yahonda added a commit to yahonda/rails that referenced this pull request Sep 15, 2024
… Ruby parse is Prism

This commit addresses these CI failures.
https://buildkite.com/rails/rails-nightly/builds/1023#0191ed31-1d8d-41e5-906b-e3b88aab79da

Ruby 3.4.0dev default parser has been switched to Prism, After the default parser is switched from parse.y to Prism
some of Active Support tests get failed with "cannot get AST for ISEQ compiled by prism" message.

According to ruby/ruby#9934 , it looks an expected behavior of Ruby with Prism parser
then this commit adds the `prism_skip` method following the naming `jruby_skip`

According to ruby/ruby#9934, this seems to be the expected behavior of Ruby with the Prism parser.
This commit adds the `prism_skip` method following the naming convention of `jruby_skip` that has been removed
via rails#49454 .

- This commit addresses these failures against Ruby 3.4.0dev with Prism parser.
```ruby
$ ruby -v
ruby 3.4.0dev (2024-09-15T01:06:11Z master 532af89e3b) +PRISM [x86_64-linux]
$ cd activesupport
$ bin/test -n "/^(?:TestOrderTest#(?:test_test_order_is_global)|AssertionsTest#(?:test_assert_changes_message_with_lambda|test_assert_difference_message_with_lambda|test_assert_no_changes_message_with_lambda|test_assert_no_changes_message_with_multi_line_lambda|test_assert_no_difference_with_multiple_expressions_fail)|ExceptionsInsideAssertionsTest#(?:test_warning_is_not_logged_if_assertions_are_nested_correctly))$/"
/home/yahonda/.gem/ruby/3.4.0+0/gems/json-2.7.1/lib/json/common.rb:3: warning: ostruct was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
You can add ostruct to your Gemfile or gemspec to silence this warning.
WARNING: Nokogiri was built against libxml version 2.12.9, but has dynamically loaded 2.9.14

Run options: -n "/^(?:TestOrderTest#(?:test_test_order_is_global)|AssertionsTest#(?:test_assert_changes_message_with_lambda|test_assert_difference_message_with_lambda|test_assert_no_changes_message_with_lambda|test_assert_no_changes_message_with_multi_line_lambda|test_assert_no_difference_with_multiple_expressions_fail)|ExceptionsInsideAssertionsTest#(?:test_warning_is_not_logged_if_assertions_are_nested_correctly))$/" --seed 65502

F

Failure:
ExceptionsInsideAssertionsTest#test_warning_is_not_logged_if_assertions_are_nested_correctly [test/test_case_test.rb:508]:
[Minitest::Assertion] exception expected, not
Class: <RuntimeError>
Message: <"cannot get AST for ISEQ compiled by prism">
---Backtrace---
<internal:ast>:97:in 'RubyVM::AbstractSyntaxTree.of'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:304:in 'ActiveSupport::Testing::Assertions#_callable_to_source_string'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:270:in 'block in ActiveSupport::Testing::Assertions#assert_no_changes'
---------------

bin/test test/test_case_test.rb:507

F

Failure:
AssertionsTest#test_assert_changes_message_with_lambda [test/test_case_test.rb:252]:
[Minitest::Assertion] exception expected, not
Class: <RuntimeError>
Message: <"cannot get AST for ISEQ compiled by prism">
---Backtrace---
<internal:ast>:97:in 'RubyVM::AbstractSyntaxTree.of'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:304:in 'ActiveSupport::Testing::Assertions#_callable_to_source_string'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:213:in 'block in ActiveSupport::Testing::Assertions#assert_changes'
---------------

bin/test test/test_case_test.rb:249

F

Failure:
AssertionsTest#test_assert_no_changes_message_with_multi_line_lambda [test/test_case_test.rb:427]:
[Minitest::Assertion] exception expected, not
Class: <RuntimeError>
Message: <"cannot get AST for ISEQ compiled by prism">
---Backtrace---
<internal:ast>:97:in 'RubyVM::AbstractSyntaxTree.of'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:304:in 'ActiveSupport::Testing::Assertions#_callable_to_source_string'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:270:in 'block in ActiveSupport::Testing::Assertions#assert_no_changes'
---------------

bin/test test/test_case_test.rb:422

F

Failure:
AssertionsTest#test_assert_no_changes_message_with_lambda [test/test_case_test.rb:380]:
[Minitest::Assertion] exception expected, not
Class: <RuntimeError>
Message: <"cannot get AST for ISEQ compiled by prism">
---Backtrace---
<internal:ast>:97:in 'RubyVM::AbstractSyntaxTree.of'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:304:in 'ActiveSupport::Testing::Assertions#_callable_to_source_string'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:270:in 'block in ActiveSupport::Testing::Assertions#assert_no_changes'
---------------

bin/test test/test_case_test.rb:377

F

Failure:
AssertionsTest#test_assert_no_difference_with_multiple_expressions_fail [test/test_case_test.rb:78]:
[Minitest::Assertion] exception expected, not
Class: <RuntimeError>
Message: <"cannot get AST for ISEQ compiled by prism">
---Backtrace---
<internal:ast>:97:in 'RubyVM::AbstractSyntaxTree.of'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:304:in 'ActiveSupport::Testing::Assertions#_callable_to_source_string'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:122:in 'block (2 levels) in ActiveSupport::Testing::Assertions#assert_difference'
---------------

bin/test test/test_case_test.rb:76

F

Failure:
AssertionsTest#test_assert_difference_message_with_lambda [test/test_case_test.rb:176]:
[Minitest::Assertion] exception expected, not
Class: <RuntimeError>
Message: <"cannot get AST for ISEQ compiled by prism">
---Backtrace---
<internal:ast>:97:in 'RubyVM::AbstractSyntaxTree.of'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:304:in 'ActiveSupport::Testing::Assertions#_callable_to_source_string'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:122:in 'block (2 levels) in ActiveSupport::Testing::Assertions#assert_difference'
---------------

bin/test test/test_case_test.rb:173

.

Finished in 0.044451s, 157.4784 runs/s, 629.9136 assertions/s.
7 runs, 28 assertions, 6 failures, 0 errors, 0 skips
$
```

Refer to ruby/ruby#9934
ruby/ruby#11497
https://bugs.ruby-lang.org/issues/20564
yahonda added a commit to yahonda/rails that referenced this pull request Sep 15, 2024
… Ruby parse is Prism

This commit addresses these CI failures.
https://buildkite.com/rails/rails-nightly/builds/1023#0191ed31-1d8d-41e5-906b-e3b88aab79da

Ruby 3.4.0dev default parser has been switched to Prism, After the default parser is switched from parse.y to Prism
some of Active Support tests get failed with "cannot get AST for ISEQ compiled by prism" message.

According to ruby/ruby#9934, this seems to be the expected behavior of Ruby with the Prism parser.
This commit adds the `prism_skip` method following the naming convention of `jruby_skip` that has been removed
via rails#49454 .

- This commit addresses these failures against Ruby 3.4.0dev with Prism parser.
```ruby
$ ruby -v
ruby 3.4.0dev (2024-09-15T01:06:11Z master 532af89e3b) +PRISM [x86_64-linux]
$ cd activesupport
$ bin/test -n "/^(?:TestOrderTest#(?:test_test_order_is_global)|AssertionsTest#(?:test_assert_changes_message_with_lambda|test_assert_difference_message_with_lambda|test_assert_no_changes_message_with_lambda|test_assert_no_changes_message_with_multi_line_lambda|test_assert_no_difference_with_multiple_expressions_fail)|ExceptionsInsideAssertionsTest#(?:test_warning_is_not_logged_if_assertions_are_nested_correctly))$/"
/home/yahonda/.gem/ruby/3.4.0+0/gems/json-2.7.1/lib/json/common.rb:3: warning: ostruct was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
You can add ostruct to your Gemfile or gemspec to silence this warning.
WARNING: Nokogiri was built against libxml version 2.12.9, but has dynamically loaded 2.9.14

Run options: -n "/^(?:TestOrderTest#(?:test_test_order_is_global)|AssertionsTest#(?:test_assert_changes_message_with_lambda|test_assert_difference_message_with_lambda|test_assert_no_changes_message_with_lambda|test_assert_no_changes_message_with_multi_line_lambda|test_assert_no_difference_with_multiple_expressions_fail)|ExceptionsInsideAssertionsTest#(?:test_warning_is_not_logged_if_assertions_are_nested_correctly))$/" --seed 65502

F

Failure:
ExceptionsInsideAssertionsTest#test_warning_is_not_logged_if_assertions_are_nested_correctly [test/test_case_test.rb:508]:
[Minitest::Assertion] exception expected, not
Class: <RuntimeError>
Message: <"cannot get AST for ISEQ compiled by prism">
---Backtrace---
<internal:ast>:97:in 'RubyVM::AbstractSyntaxTree.of'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:304:in 'ActiveSupport::Testing::Assertions#_callable_to_source_string'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:270:in 'block in ActiveSupport::Testing::Assertions#assert_no_changes'
---------------

bin/test test/test_case_test.rb:507

F

Failure:
AssertionsTest#test_assert_changes_message_with_lambda [test/test_case_test.rb:252]:
[Minitest::Assertion] exception expected, not
Class: <RuntimeError>
Message: <"cannot get AST for ISEQ compiled by prism">
---Backtrace---
<internal:ast>:97:in 'RubyVM::AbstractSyntaxTree.of'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:304:in 'ActiveSupport::Testing::Assertions#_callable_to_source_string'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:213:in 'block in ActiveSupport::Testing::Assertions#assert_changes'
---------------

bin/test test/test_case_test.rb:249

F

Failure:
AssertionsTest#test_assert_no_changes_message_with_multi_line_lambda [test/test_case_test.rb:427]:
[Minitest::Assertion] exception expected, not
Class: <RuntimeError>
Message: <"cannot get AST for ISEQ compiled by prism">
---Backtrace---
<internal:ast>:97:in 'RubyVM::AbstractSyntaxTree.of'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:304:in 'ActiveSupport::Testing::Assertions#_callable_to_source_string'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:270:in 'block in ActiveSupport::Testing::Assertions#assert_no_changes'
---------------

bin/test test/test_case_test.rb:422

F

Failure:
AssertionsTest#test_assert_no_changes_message_with_lambda [test/test_case_test.rb:380]:
[Minitest::Assertion] exception expected, not
Class: <RuntimeError>
Message: <"cannot get AST for ISEQ compiled by prism">
---Backtrace---
<internal:ast>:97:in 'RubyVM::AbstractSyntaxTree.of'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:304:in 'ActiveSupport::Testing::Assertions#_callable_to_source_string'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:270:in 'block in ActiveSupport::Testing::Assertions#assert_no_changes'
---------------

bin/test test/test_case_test.rb:377

F

Failure:
AssertionsTest#test_assert_no_difference_with_multiple_expressions_fail [test/test_case_test.rb:78]:
[Minitest::Assertion] exception expected, not
Class: <RuntimeError>
Message: <"cannot get AST for ISEQ compiled by prism">
---Backtrace---
<internal:ast>:97:in 'RubyVM::AbstractSyntaxTree.of'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:304:in 'ActiveSupport::Testing::Assertions#_callable_to_source_string'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:122:in 'block (2 levels) in ActiveSupport::Testing::Assertions#assert_difference'
---------------

bin/test test/test_case_test.rb:76

F

Failure:
AssertionsTest#test_assert_difference_message_with_lambda [test/test_case_test.rb:176]:
[Minitest::Assertion] exception expected, not
Class: <RuntimeError>
Message: <"cannot get AST for ISEQ compiled by prism">
---Backtrace---
<internal:ast>:97:in 'RubyVM::AbstractSyntaxTree.of'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:304:in 'ActiveSupport::Testing::Assertions#_callable_to_source_string'
/home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/assertions.rb:122:in 'block (2 levels) in ActiveSupport::Testing::Assertions#assert_difference'
---------------

bin/test test/test_case_test.rb:173

.

Finished in 0.044451s, 157.4784 runs/s, 629.9136 assertions/s.
7 runs, 28 assertions, 6 failures, 0 errors, 0 skips
$
```

Refer to ruby/ruby#9934
ruby/ruby#11497
https://bugs.ruby-lang.org/issues/20564
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.

3 participants