* [ruby-core:119735] [Ruby master Bug#20866] Prism assertion when running simplecov with branch coverage and requiring certain code
@ 2024-11-05 15:15 Earlopain (A S) via ruby-core
2024-11-05 16:02 ` [ruby-core:119740] " alanwu (Alan Wu) via ruby-core
2024-11-20 22:58 ` [ruby-core:119978] " eightbitraptor (Matt V-H) via ruby-core
0 siblings, 2 replies; 3+ messages in thread
From: Earlopain (A S) via ruby-core @ 2024-11-05 15:15 UTC (permalink / raw)
To: ruby-core; +Cc: Earlopain (A S)
Issue #20866 has been reported by Earlopain (A S).
----------------------------------------
Bug #20866: Prism assertion when running simplecov with branch coverage and requiring certain code
https://bugs.ruby-lang.org/issues/20866
* Author: Earlopain (A S)
* Status: Open
* ruby -v: ruby 3.4.0dev (2024-11-05T13:53:41Z master ed06f018bd) +PRISM [x86_64-linux]
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
I stumbled upon the following bug report against simplecov: https://github.com/simplecov-ruby/simplecov/issues/1113
I reduced the error down to the following:
```rb
# Gemfile
source "https://rubygems.org"
gem "simplecov"
```
```rb
# test.rb
require "bundler"
require "simplecov"
SimpleCov.start do
enable_coverage :branch
end
require_relative "external"
```
```rb
# external.rb
def perform_completion
case @completion_state
when CompletionState::PERFECT_MATCH
@dig_perfect_match_proc&.(@perfect_matched)
end
end
```
```sh
$ bundle exec ruby test.rb
ruby: prism/util/pm_newline_list.c:93: pm_newline_list_line_column: Assertion `cursor >= list->start' failed.
Aborted (core dumped)
```
When running with `parse.y` the error doesn't occur.
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ruby-core:119740] [Ruby master Bug#20866] Prism assertion when running simplecov with branch coverage and requiring certain code
2024-11-05 15:15 [ruby-core:119735] [Ruby master Bug#20866] Prism assertion when running simplecov with branch coverage and requiring certain code Earlopain (A S) via ruby-core
@ 2024-11-05 16:02 ` alanwu (Alan Wu) via ruby-core
2024-11-20 22:58 ` [ruby-core:119978] " eightbitraptor (Matt V-H) via ruby-core
1 sibling, 0 replies; 3+ messages in thread
From: alanwu (Alan Wu) via ruby-core @ 2024-11-05 16:02 UTC (permalink / raw)
To: ruby-core; +Cc: alanwu (Alan Wu)
Issue #20866 has been updated by alanwu (Alan Wu).
Assignee set to prism
----------------------------------------
Bug #20866: Prism assertion when running simplecov with branch coverage and requiring certain code
https://bugs.ruby-lang.org/issues/20866#change-110405
* Author: Earlopain (A S)
* Status: Open
* Assignee: prism
* ruby -v: ruby 3.4.0dev (2024-11-05T13:53:41Z master ed06f018bd) +PRISM [x86_64-linux]
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
I stumbled upon the following bug report against simplecov: https://github.com/simplecov-ruby/simplecov/issues/1113
I reduced the error down to the following:
```rb
# Gemfile
source "https://rubygems.org"
gem "simplecov"
```
```rb
# test.rb
require "bundler"
require "simplecov"
SimpleCov.start do
enable_coverage :branch
end
require_relative "external"
```
```rb
# external.rb
def perform_completion
case @completion_state
when CompletionState::PERFECT_MATCH
@dig_perfect_match_proc&.(@perfect_matched)
end
end
```
```sh
$ bundle exec ruby test.rb
ruby: prism/util/pm_newline_list.c:93: pm_newline_list_line_column: Assertion `cursor >= list->start' failed.
Aborted (core dumped)
```
When running with `parse.y` the error doesn't occur.
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ruby-core:119978] [Ruby master Bug#20866] Prism assertion when running simplecov with branch coverage and requiring certain code
2024-11-05 15:15 [ruby-core:119735] [Ruby master Bug#20866] Prism assertion when running simplecov with branch coverage and requiring certain code Earlopain (A S) via ruby-core
2024-11-05 16:02 ` [ruby-core:119740] " alanwu (Alan Wu) via ruby-core
@ 2024-11-20 22:58 ` eightbitraptor (Matt V-H) via ruby-core
1 sibling, 0 replies; 3+ messages in thread
From: eightbitraptor (Matt V-H) via ruby-core @ 2024-11-20 22:58 UTC (permalink / raw)
To: ruby-core; +Cc: eightbitraptor (Matt V-H)
Issue #20866 has been updated by eightbitraptor (Matt V-H).
This was caused by an issue with how the prism compiler tracks the ending location of call nodes of the form `a&.()`.
Should be fixed by [this PR](https://github.com/ruby/ruby/pull/12130)
----------------------------------------
Bug #20866: Prism assertion when running simplecov with branch coverage and requiring certain code
https://bugs.ruby-lang.org/issues/20866#change-110717
* Author: Earlopain (Earlopain _)
* Status: Assigned
* Assignee: prism
* ruby -v: ruby 3.4.0dev (2024-11-05T13:53:41Z master ed06f018bd) +PRISM [x86_64-linux]
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
I stumbled upon the following bug report against simplecov: https://github.com/simplecov-ruby/simplecov/issues/1113
I reduced the error down to the following:
```rb
# Gemfile
source "https://rubygems.org"
gem "simplecov"
```
```rb
# test.rb
require "bundler"
require "simplecov"
SimpleCov.start do
enable_coverage :branch
end
require_relative "external"
```
```rb
# external.rb
def perform_completion
case @completion_state
when CompletionState::PERFECT_MATCH
@dig_perfect_match_proc&.(@perfect_matched)
end
end
```
```sh
$ bundle exec ruby test.rb
ruby: prism/util/pm_newline_list.c:93: pm_newline_list_line_column: Assertion `cursor >= list->start' failed.
Aborted (core dumped)
```
When running with `parse.y` the error doesn't occur.
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-11-20 22:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-05 15:15 [ruby-core:119735] [Ruby master Bug#20866] Prism assertion when running simplecov with branch coverage and requiring certain code Earlopain (A S) via ruby-core
2024-11-05 16:02 ` [ruby-core:119740] " alanwu (Alan Wu) via ruby-core
2024-11-20 22:58 ` [ruby-core:119978] " eightbitraptor (Matt V-H) via ruby-core
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).