Skip to content

Conversation

@nevans
Copy link
Collaborator

@nevans nevans 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).

@nevans nevans force-pushed the drop-data_lite-yaml-encoding branch from 787394a to 19998e1 Compare October 16, 2025 18:10
@nevans nevans added the breaking-change Breaking change to publicly documented API label Oct 16, 2025
@nevans
Copy link
Collaborator Author

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?

@nevans nevans mentioned this pull request Oct 16, 2025
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).
@eregon
Copy link
Member

eregon commented Oct 20, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Breaking change to publicly documented API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants