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

@nevans nevans force-pushed the drop-data_lite-yaml-encoding branch from 19998e1 to b43d315 Compare October 20, 2025 21:39
@nevans nevans added this to the v0.6 milestone Oct 20, 2025
@nevans nevans force-pushed the drop-data_lite-yaml-encoding branch from b43d315 to 863d005 Compare November 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).
@nevans nevans force-pushed the drop-data_lite-yaml-encoding branch from 863d005 to 183acc1 Compare December 10, 2025 18:55
@nevans nevans marked this pull request as ready for review December 10, 2025 19:37
@nevans nevans merged commit f3753e1 into master Dec 10, 2025
32 checks passed
@nevans nevans deleted the drop-data_lite-yaml-encoding branch December 10, 2025 19:38
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