Skip to content

Commit bd42512

Browse files
Maybe even just "To" ?!
Dunno. Lemme know!
1 parent ea23c96 commit bd42512

File tree

8 files changed

+17
-16
lines changed

8 files changed

+17
-16
lines changed

docs/patching-database.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ Change:
8383
Font: # Property we're migrating *from*
8484
Serialization:
8585
Type: Migrate
86-
MigratesTo: FontFace # Name of the property we're migrating *to*
87-
Migration: FontToFontFace # Name of the migration operation we're using
86+
To: FontFace # Name of the property we're migrating to
87+
Migration: FontToFontFace # Name of the migration operation that should convert the old property value to the new one
8888
```
8989

9090
If this property is present on multiple classes, you may need to specify the Serialization change for multiple properties on multiple classes. For example, the `Font` property is present on `TextLabel`, `TextButton`, `TextBox` without being derived from a superclass, so the real patch is approximately 3 times as long since it needs to be applied to each class.

patches/screengui.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ Change:
33
IgnoreGuiInset:
44
Serialization:
55
Type: Migrate
6-
MigratesTo: ScreenInsets
6+
To: ScreenInsets
77
Migration: IgnoreGuiInsetToScreenInsets

patches/text-gui.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ Change:
33
Font:
44
Serialization:
55
Type: Migrate
6-
MigratesTo: FontFace
6+
To: FontFace
77
Migration: FontToFontFace
88
TextButton:
99
Font:
1010
Serialization:
1111
Type: Migrate
12-
MigratesTo: FontFace
12+
To: FontFace
1313
Migration: FontToFontFace
1414
TextBox:
1515
Font:
1616
Serialization:
1717
Type: Migrate
18-
MigratesTo: FontFace
18+
To: FontFace
1919
Migration: FontToFontFace

rbx_binary/src/deserializer/state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ fn find_canonical_property<'de>(
176176

177177
fn add_property(instance: &mut Instance, canonical_property: &CanonicalProperty, value: Variant) {
178178
if let Some(PropertySerialization::Migrate(migration)) = canonical_property.migration {
179-
let new_property_name = &migration.migrates_to;
179+
let new_property_name = &migration.new_property_name;
180180

181181
if !instance.builder.has_property(new_property_name) {
182182
match migration.perform(&value) {

rbx_dom_lua/src/database.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24759,7 +24759,7 @@
2475924759
"Enum": 0
2476024760
},
2476124761
"ScriptGuid": {
24762-
"String": "{0CF5FBD2-C47E-4AB8-A39A-45445FACF89E}"
24762+
"String": "{7604441B-B379-4EE1-984B-AE157BC63C77}"
2476324763
},
2476424764
"Source": {
2476524765
"String": ""
@@ -28047,7 +28047,7 @@
2804728047
"Content": ""
2804828048
},
2804928049
"ScriptGuid": {
28050-
"String": "{5BB8C217-FE02-4C1C-8A2C-D3EF05D2E101}"
28050+
"String": "{3F11F399-6865-4B5A-95BB-40BE2D3455A5}"
2805128051
},
2805228052
"Source": {
2805328053
"String": ""
@@ -37362,7 +37362,7 @@
3736237362
"Canonical": {
3736337363
"Serialization": {
3736437364
"Migrate": {
37365-
"MigratesTo": "ScreenInsets",
37365+
"To": "ScreenInsets",
3736637366
"Migration": "IgnoreGuiInsetToScreenInsets"
3736737367
}
3736837368
}
@@ -37614,7 +37614,7 @@
3761437614
"Enum": 0
3761537615
},
3761637616
"ScriptGuid": {
37617-
"String": "{23EED725-E930-4F9B-9731-E8DB97BC26AB}"
37617+
"String": "{0538A076-ECE4-4297-8F06-B37E2D80D254}"
3761837618
},
3761937619
"Source": {
3762037620
"String": ""
@@ -48142,7 +48142,7 @@
4814248142
"Canonical": {
4814348143
"Serialization": {
4814448144
"Migrate": {
48145-
"MigratesTo": "FontFace",
48145+
"To": "FontFace",
4814648146
"Migration": "FontToFontFace"
4814748147
}
4814848148
}
@@ -48826,7 +48826,7 @@
4882648826
"Canonical": {
4882748827
"Serialization": {
4882848828
"Migrate": {
48829-
"MigratesTo": "FontFace",
48829+
"To": "FontFace",
4883048830
"Migration": "FontToFontFace"
4883148831
}
4883248832
}
@@ -49725,7 +49725,7 @@
4972549725
"Canonical": {
4972649726
"Serialization": {
4972749727
"Migrate": {
49728-
"MigratesTo": "FontFace",
49728+
"To": "FontFace",
4972949729
"Migration": "FontToFontFace"
4973049730
}
4973149731
}

rbx_reflection/src/migration.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ pub enum MigrationError {
2424
#[serde(rename_all = "PascalCase")]
2525
#[non_exhaustive]
2626
pub struct PropertyMigration {
27-
pub migrates_to: String,
27+
#[serde(rename = "To")]
28+
pub new_property_name: String,
2829
migration: MigrationOperation,
2930
}
3031

0 Bytes
Binary file not shown.

rbx_xml/src/deserializer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ fn deserialize_properties<R: Read>(
611611
PropertyKind::Canonical {
612612
serialization: PropertySerialization::Migrate(migration),
613613
} => {
614-
let new_property_name = &migration.migrates_to;
614+
let new_property_name = &migration.new_property_name;
615615

616616
if !props.contains_key(new_property_name) {
617617
match migration.perform(&value) {

0 commit comments

Comments
 (0)