ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:121302] [Ruby master Bug#21183] Ractor error with Prism::VERSION
@ 2025-03-11 22:42 getajobmike (Mike Perham) via ruby-core
  2025-03-12 16:44 ` [ruby-core:121310] " kddnewton (Kevin Newton) via ruby-core
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: getajobmike (Mike Perham) via ruby-core @ 2025-03-11 22:42 UTC (permalink / raw)
  To: ruby-core; +Cc: getajobmike (Mike Perham)

Issue #21183 has been reported by getajobmike (Mike Perham).

----------------------------------------
Bug #21183: Ractor error with Prism::VERSION
https://bugs.ruby-lang.org/issues/21183

* Author: getajobmike (Mike Perham)
* Status: Open
* ruby -v: 3.4.1
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
```
/Users/mperham/.rubies/ruby-3.4.1/lib/ruby/3.4.0/error_highlight/base.rb:88:in 'ErrorHighlight.prism_find': can not access non-shareable objects in constant Prism::VERSION by non-main Ractor. (Ractor::IsolationError)
#<Thread:0x000000011e89fbb0 run> terminated with exception (report_on_exception is true):
	from /Users/mperham/.rubies/ruby-3.4.1/lib/ruby/3.4.0/error_highlight/base.rb:65:in 'ErrorHighlight.spot'
/Users/mperham/.rubies/ruby-3.4.1/lib/ruby/3.4.0/error_highlight/base.rb:88:in 'ErrorHighlight.prism_find'	from /Users/mperham/.rubies/ruby-3.4.1/lib/ruby/3.4.0/error_highlight/core_ext.rb:6:in 'ErrorHighlight::CoreExt#generate_snippet'
	from /Users/mperham/.rubies/ruby-3.4.1/lib/ruby/3.4.0/error_highlight/core_ext.rb:14:in 'ErrorHighlight::CoreExt#detailed_message'
: 	from /Users/mperham/.rubies/ruby-3.4.1/lib/ruby/3.4.0/did_you_mean/core_ext/name_error.rb:24:in 'DidYouMean::Correctable#detailed_message'
```



-- 
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] 5+ messages in thread

* [ruby-core:121310] [Ruby master Bug#21183] Ractor error with Prism::VERSION
  2025-03-11 22:42 [ruby-core:121302] [Ruby master Bug#21183] Ractor error with Prism::VERSION getajobmike (Mike Perham) via ruby-core
@ 2025-03-12 16:44 ` kddnewton (Kevin Newton) via ruby-core
  2025-03-29  0:01 ` [ruby-core:121469] [Ruby " jeremyevans0 (Jeremy Evans) via ruby-core
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: kddnewton (Kevin Newton) via ruby-core @ 2025-03-12 16:44 UTC (permalink / raw)
  To: ruby-core; +Cc: kddnewton (Kevin Newton)

Issue #21183 has been updated by kddnewton (Kevin Newton).


I believe this has been fixed since the VERSION constant is now frozen. Can you double check that if you are using the latest prism release that this is still a problem for you?

----------------------------------------
Bug #21183: Ractor error with Prism::VERSION
https://bugs.ruby-lang.org/issues/21183#change-112273

* Author: getajobmike (Mike Perham)
* Status: Open
* ruby -v: 3.4.1
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
```
/Users/mperham/.rubies/ruby-3.4.1/lib/ruby/3.4.0/error_highlight/base.rb:88:in 'ErrorHighlight.prism_find': can not access non-shareable objects in constant Prism::VERSION by non-main Ractor. (Ractor::IsolationError)
#<Thread:0x000000011e89fbb0 run> terminated with exception (report_on_exception is true):
	from /Users/mperham/.rubies/ruby-3.4.1/lib/ruby/3.4.0/error_highlight/base.rb:65:in 'ErrorHighlight.spot'
/Users/mperham/.rubies/ruby-3.4.1/lib/ruby/3.4.0/error_highlight/base.rb:88:in 'ErrorHighlight.prism_find'	from /Users/mperham/.rubies/ruby-3.4.1/lib/ruby/3.4.0/error_highlight/core_ext.rb:6:in 'ErrorHighlight::CoreExt#generate_snippet'
	from /Users/mperham/.rubies/ruby-3.4.1/lib/ruby/3.4.0/error_highlight/core_ext.rb:14:in 'ErrorHighlight::CoreExt#detailed_message'
: 	from /Users/mperham/.rubies/ruby-3.4.1/lib/ruby/3.4.0/did_you_mean/core_ext/name_error.rb:24:in 'DidYouMean::Correctable#detailed_message'
```



-- 
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] 5+ messages in thread

* [ruby-core:121469] [Ruby Bug#21183] Ractor error with Prism::VERSION
  2025-03-11 22:42 [ruby-core:121302] [Ruby master Bug#21183] Ractor error with Prism::VERSION getajobmike (Mike Perham) via ruby-core
  2025-03-12 16:44 ` [ruby-core:121310] " kddnewton (Kevin Newton) via ruby-core
@ 2025-03-29  0:01 ` jeremyevans0 (Jeremy Evans) via ruby-core
  2025-03-31  9:14 ` [ruby-core:121481] " Earlopain (Earlopain _) via ruby-core
  2025-04-14  7:20 ` [ruby-core:121648] " k0kubun (Takashi Kokubun) via ruby-core
  3 siblings, 0 replies; 5+ messages in thread
From: jeremyevans0 (Jeremy Evans) via ruby-core @ 2025-03-29  0:01 UTC (permalink / raw)
  To: ruby-core; +Cc: jeremyevans0 (Jeremy Evans)

Issue #21183 has been updated by jeremyevans0 (Jeremy Evans).

Status changed from Open to Closed
Backport changed from 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN to 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONTNEED, 3.4: REQUIRED

Fixed in the master branch by commit:f27ed98effff9891d28edc7119d45811bcedd510, marking for backport.

----------------------------------------
Bug #21183: Ractor error with Prism::VERSION
https://bugs.ruby-lang.org/issues/21183#change-112476

* Author: getajobmike (Mike Perham)
* Status: Closed
* ruby -v: 3.4.1
* Backport: 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONTNEED, 3.4: REQUIRED
----------------------------------------
```
/Users/mperham/.rubies/ruby-3.4.1/lib/ruby/3.4.0/error_highlight/base.rb:88:in 'ErrorHighlight.prism_find': can not access non-shareable objects in constant Prism::VERSION by non-main Ractor. (Ractor::IsolationError)
#<Thread:0x000000011e89fbb0 run> terminated with exception (report_on_exception is true):
	from /Users/mperham/.rubies/ruby-3.4.1/lib/ruby/3.4.0/error_highlight/base.rb:65:in 'ErrorHighlight.spot'
/Users/mperham/.rubies/ruby-3.4.1/lib/ruby/3.4.0/error_highlight/base.rb:88:in 'ErrorHighlight.prism_find'	from /Users/mperham/.rubies/ruby-3.4.1/lib/ruby/3.4.0/error_highlight/core_ext.rb:6:in 'ErrorHighlight::CoreExt#generate_snippet'
	from /Users/mperham/.rubies/ruby-3.4.1/lib/ruby/3.4.0/error_highlight/core_ext.rb:14:in 'ErrorHighlight::CoreExt#detailed_message'
: 	from /Users/mperham/.rubies/ruby-3.4.1/lib/ruby/3.4.0/did_you_mean/core_ext/name_error.rb:24:in 'DidYouMean::Correctable#detailed_message'
```



-- 
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] 5+ messages in thread

* [ruby-core:121481] [Ruby Bug#21183] Ractor error with Prism::VERSION
  2025-03-11 22:42 [ruby-core:121302] [Ruby master Bug#21183] Ractor error with Prism::VERSION getajobmike (Mike Perham) via ruby-core
  2025-03-12 16:44 ` [ruby-core:121310] " kddnewton (Kevin Newton) via ruby-core
  2025-03-29  0:01 ` [ruby-core:121469] [Ruby " jeremyevans0 (Jeremy Evans) via ruby-core
@ 2025-03-31  9:14 ` Earlopain (Earlopain _) via ruby-core
  2025-04-14  7:20 ` [ruby-core:121648] " k0kubun (Takashi Kokubun) via ruby-core
  3 siblings, 0 replies; 5+ messages in thread
From: Earlopain (Earlopain _) via ruby-core @ 2025-03-31  9:14 UTC (permalink / raw)
  To: ruby-core; +Cc: Earlopain (Earlopain _)

Issue #21183 has been updated by Earlopain (Earlopain _).


It looks handled on 3.4.2 already:

```sh
$ ruby -ve 'require "prism"; puts Prism::VERSION.frozen?'
ruby 3.4.2 (2025-02-15 revision d2930f8e7a) +PRISM [x86_64-linux]
true
```

Since this is about `error_highlight`, it still needs backport for ractor safety: https://github.com/ruby/prism/pull/3503
Currently it fails with the following error (example from https://github.com/ruby/prism/issues/3422):
```sh
$  echo 'Ractor.new do unknown rescue $!.detailed_message end; sleep 0.1' > /tmp/a.rb; ruby /tmp/a.rb
/tmp/a.rb:1: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues.
#<Thread:0x00007f39a3382be0 run> terminated with exception (report_on_exception is true):
/home/user/.rbenv/versions/3.4.2/lib/ruby/3.4.0/error_highlight/base.rb:94:in 'Prism.parse_file': ractor unsafe method called from not main ractor (Ractor::UnsafeError)
```

And then also https://github.com/ruby/error_highlight/commit/a221a4b0ebc0b90e27c7c7d45903a6e7d79d62a2, no idea if that has been backported yet (I believe it hasn't). In combination, error_highlight works in ractor.

----------------------------------------
Bug #21183: Ractor error with Prism::VERSION
https://bugs.ruby-lang.org/issues/21183#change-112500

* Author: getajobmike (Mike Perham)
* Status: Closed
* ruby -v: 3.4.1
* Backport: 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONTNEED, 3.4: REQUIRED
----------------------------------------
```
/Users/mperham/.rubies/ruby-3.4.1/lib/ruby/3.4.0/error_highlight/base.rb:88:in 'ErrorHighlight.prism_find': can not access non-shareable objects in constant Prism::VERSION by non-main Ractor. (Ractor::IsolationError)
#<Thread:0x000000011e89fbb0 run> terminated with exception (report_on_exception is true):
	from /Users/mperham/.rubies/ruby-3.4.1/lib/ruby/3.4.0/error_highlight/base.rb:65:in 'ErrorHighlight.spot'
/Users/mperham/.rubies/ruby-3.4.1/lib/ruby/3.4.0/error_highlight/base.rb:88:in 'ErrorHighlight.prism_find'	from /Users/mperham/.rubies/ruby-3.4.1/lib/ruby/3.4.0/error_highlight/core_ext.rb:6:in 'ErrorHighlight::CoreExt#generate_snippet'
	from /Users/mperham/.rubies/ruby-3.4.1/lib/ruby/3.4.0/error_highlight/core_ext.rb:14:in 'ErrorHighlight::CoreExt#detailed_message'
: 	from /Users/mperham/.rubies/ruby-3.4.1/lib/ruby/3.4.0/did_you_mean/core_ext/name_error.rb:24:in 'DidYouMean::Correctable#detailed_message'
```



-- 
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] 5+ messages in thread

* [ruby-core:121648] [Ruby Bug#21183] Ractor error with Prism::VERSION
  2025-03-11 22:42 [ruby-core:121302] [Ruby master Bug#21183] Ractor error with Prism::VERSION getajobmike (Mike Perham) via ruby-core
                   ` (2 preceding siblings ...)
  2025-03-31  9:14 ` [ruby-core:121481] " Earlopain (Earlopain _) via ruby-core
@ 2025-04-14  7:20 ` k0kubun (Takashi Kokubun) via ruby-core
  3 siblings, 0 replies; 5+ messages in thread
From: k0kubun (Takashi Kokubun) via ruby-core @ 2025-04-14  7:20 UTC (permalink / raw)
  To: ruby-core; +Cc: k0kubun (Takashi Kokubun)

Issue #21183 has been updated by k0kubun (Takashi Kokubun).

Backport changed from 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONTNEED, 3.4: REQUIRED to 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONTNEED, 3.4: DONE

ruby_3_4 commit:7b5e4125b9935cd78d80719de018dad446780e40 merged revision(s) commit:f27ed98effff9891d28edc7119d45811bcedd510.

----------------------------------------
Bug #21183: Ractor error with Prism::VERSION
https://bugs.ruby-lang.org/issues/21183#change-112702

* Author: getajobmike (Mike Perham)
* Status: Closed
* ruby -v: 3.4.1
* Backport: 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONTNEED, 3.4: DONE
----------------------------------------
```
/Users/mperham/.rubies/ruby-3.4.1/lib/ruby/3.4.0/error_highlight/base.rb:88:in 'ErrorHighlight.prism_find': can not access non-shareable objects in constant Prism::VERSION by non-main Ractor. (Ractor::IsolationError)
#<Thread:0x000000011e89fbb0 run> terminated with exception (report_on_exception is true):
	from /Users/mperham/.rubies/ruby-3.4.1/lib/ruby/3.4.0/error_highlight/base.rb:65:in 'ErrorHighlight.spot'
/Users/mperham/.rubies/ruby-3.4.1/lib/ruby/3.4.0/error_highlight/base.rb:88:in 'ErrorHighlight.prism_find'	from /Users/mperham/.rubies/ruby-3.4.1/lib/ruby/3.4.0/error_highlight/core_ext.rb:6:in 'ErrorHighlight::CoreExt#generate_snippet'
	from /Users/mperham/.rubies/ruby-3.4.1/lib/ruby/3.4.0/error_highlight/core_ext.rb:14:in 'ErrorHighlight::CoreExt#detailed_message'
: 	from /Users/mperham/.rubies/ruby-3.4.1/lib/ruby/3.4.0/did_you_mean/core_ext/name_error.rb:24:in 'DidYouMean::Correctable#detailed_message'
```



-- 
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] 5+ messages in thread

end of thread, other threads:[~2025-04-14  7:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-11 22:42 [ruby-core:121302] [Ruby master Bug#21183] Ractor error with Prism::VERSION getajobmike (Mike Perham) via ruby-core
2025-03-12 16:44 ` [ruby-core:121310] " kddnewton (Kevin Newton) via ruby-core
2025-03-29  0:01 ` [ruby-core:121469] [Ruby " jeremyevans0 (Jeremy Evans) via ruby-core
2025-03-31  9:14 ` [ruby-core:121481] " Earlopain (Earlopain _) via ruby-core
2025-04-14  7:20 ` [ruby-core:121648] " k0kubun (Takashi Kokubun) 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).