Skip to content

Conversation

@nevans
Copy link
Collaborator

@nevansnevans commented Oct 16, 2025

Depends on #541, which drops the Data polyfill.

Unlike #541, this is a breaking change, because objects that would previously encode with a ruby/object:Net::IMAP:DataSubclass tag will instead encode with a ruby/data:Net::IMAP:DataSubclass tag. Any YAML with the old tag will create an (effectively) empty data object: the data members will not be initialized (but ivars will be set).

@nevansnevansforce-pushed the drop-data_lite-yaml-encoding branch from 787394a to 19998e1CompareOctober 16, 2025 18:10
@nevansnevans added the breaking-change Breaking change to publicly documented API label Oct 16, 2025
@nevans
Copy link
CollaboratorAuthor

nevans commented Oct 16, 2025

@eregon It looks like TruffleRuby doesn't like the Data deserialization that was added to psych 5.2.5 (ruby/psych#692). For !ruby/data tagged objects, Psych::Visitors::ToRuby calls #init_struct which calls rb_struct_initialize, and that symbol understandably isn't found for TruffleRuby. I used that in ruby/psych#692 because that's how CRuby's Marshal handles both Struct and Data objects.

I guess TruffleRuby will either need to support a compatible rb_struct_initialize, or it will need to patch Psych::Visitors::ToRuby#init_struct?

@nevansnevans mentioned this pull request Oct 16, 2025
@eregon
Copy link
Member

Could you file an issue at https://github.com/truffleruby/truffleruby/issues ?
Obviously we should add TruffleRuby in ruby/psych CI to catch earlier in the future.

@nevansnevansforce-pushed the drop-data_lite-yaml-encoding branch from 19998e1 to b43d315CompareOctober 20, 2025 21:39
@nevansnevans added this to the v0.6 milestone Oct 20, 2025
@nevansnevansforce-pushed the drop-data_lite-yaml-encoding branch from b43d315 to 863d005CompareNovember 29, 2025 19:46
This _is_ a breaking change, because objects that would previously encode with a `ruby/object:Net::IMAP::DataSubclass` tag will instead encode with a `ruby/data:Net::IMAP::DataSubclass` tag. Any YAML with the old tag will create an (effectively) empty data object: the data members will not be initialized (but ivars will be set).
@nevansnevansforce-pushed the drop-data_lite-yaml-encoding branch from 863d005 to 183acc1CompareDecember 10, 2025 18:55
@nevansnevans marked this pull request as ready for review December 10, 2025 19:37
@nevansnevans merged commit f3753e1 into masterDec 10, 2025
32 checks passed
@nevansnevans deleted the drop-data_lite-yaml-encoding branch December 10, 2025 19:38
@nobu
Copy link
Member

nobu commented Jan 2, 2026

This deleted lib/net/imap/data_lite.rb, but test/net/imap/test_data_lite.rb that was added alongside it still exists.

nobu added a commit to nobu/net-imap that referenced this pull request Jan 2, 2026
The target of this test file has been delete by ruby#543.
nobu added a commit to nobu/net-imap that referenced this pull request Jan 3, 2026
The target of this test file has been deleted by ruby#543.
nobu added a commit to nobu/ruby that referenced this pull request Jan 3, 2026
Delete test/net/imap/test_data_lite.rb, because the target of this test file has been deleted by [ruby/net-imap#543]. [ruby/net-imap#543]: ruby/net-imap#593
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-changeBreaking change to publicly documented API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@nevans@eregon@nobu