Closed furtidev closed 2 weeks ago
Hi! Thanks for opening your first issue here! :smile:
Yes, I would expect too complex 3rd party crates to fail when using this experimental feature, because Rust is such a feature-rich language that it is hard to cover everything - that's why it is called "experimental"! You can always fall back to the manual approach to mirror 3rd party crates, or PR to enhance the auto scanner.
@fzyzcjy I'm a bit worried though, do I really have to rewrite the signature of all code in these libraries? Or only the functions, structs etc. that are relevant to the Rust -> Dart interop?
@furtidev You can write manually for the APIs that you use. Or, as mentioned above, you can try to see where frb's experimental fully auto mode fails and fix/workaround it.
But I guess serde_value may be too hard to be translated, since it requires quite complex callbacks etc.
@fzyzcjy so it'll be hard to work with even if I try doing it manually?
@furtidev Depending on what you need. You can quickly glance at frb's doc to see what is supported (a lot!), but some Rust features may still not be supported since there are really so many features.
@fzyzcjy Thank you! I'll have a look.
Feel free to ping me if you have any questions!
@fzyzcjy The one common error I got is: Can't use 'gender' because it is declared more than once.
These are all Serde structs.
gender
is a parameter in a struct. There are other similar errors, about other parameters. I'm not sure why this is happening or how can something existing more than once cause an error (I guess it can, but there's no such code in the original Rust crate, so how come?). * is already declared in this scope.
also seems like a similar error.
The * isn't a type
error is probably happening because the name is colliding Dart keywords.
Here's the full log:
ERROR: lib/src/rust/frb_generated.dart:159:8: Error: 'crateApiStructsSavegamePlayerAutoAccessorGetIsEmoting' is already declared in this scope.
ERROR: bool crateApiStructsSavegamePlayerAutoAccessorGetIsEmoting(
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:98:8: Context: Previous declaration of 'crateApiStructsSavegamePlayerAutoAccessorGetIsEmoting'.
ERROR: bool crateApiStructsSavegamePlayerAutoAccessorGetIsEmoting(
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:289:8: Error: 'crateApiStructsSavegamePlayerAutoAccessorSetIsEmoting' is already declared in this scope.
ERROR: void crateApiStructsSavegamePlayerAutoAccessorSetIsEmoting(
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:229:8: Context: Previous declaration of 'crateApiStructsSavegamePlayerAutoAccessorSetIsEmoting'.
ERROR: void crateApiStructsSavegamePlayerAutoAccessorSetIsEmoting(
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:1103:8: Error: 'crateApiStructsSavegamePlayerAutoAccessorGetIsEmoting' is already declared in this scope.
ERROR: bool crateApiStructsSavegamePlayerAutoAccessorGetIsEmoting(
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:545:8: Context: Previous declaration of 'crateApiStructsSavegamePlayerAutoAccessorGetIsEmoting'.
ERROR: bool crateApiStructsSavegamePlayerAutoAccessorGetIsEmoting(
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:1124:11: Error: 'kCrateApiStructsSavegamePlayerAutoAccessorGetIsEmotingConstMeta' is already declared in this scope.
ERROR: get kCrateApiStructsSavegamePlayerAutoAccessorGetIsEmotingConstMeta =>
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:566:11: Context: Previous declaration of 'kCrateApiStructsSavegamePlayerAutoAccessorGetIsEmotingConstMeta'.
ERROR: get kCrateApiStructsSavegamePlayerAutoAccessorGetIsEmotingConstMeta =>
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:2323:8: Error: 'crateApiStructsSavegamePlayerAutoAccessorSetIsEmoting' is already declared in this scope.
ERROR: void crateApiStructsSavegamePlayerAutoAccessorSetIsEmoting(
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:1746:8: Context: Previous declaration of 'crateApiStructsSavegamePlayerAutoAccessorSetIsEmoting'.
ERROR: void crateApiStructsSavegamePlayerAutoAccessorSetIsEmoting(
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:2345:11: Error: 'kCrateApiStructsSavegamePlayerAutoAccessorSetIsEmotingConstMeta' is already declared in this scope.
ERROR: get kCrateApiStructsSavegamePlayerAutoAccessorSetIsEmotingConstMeta =>
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:1768:11: Context: Previous declaration of 'kCrateApiStructsSavegamePlayerAutoAccessorSetIsEmotingConstMeta'.
ERROR: get kCrateApiStructsSavegamePlayerAutoAccessorSetIsEmotingConstMeta =>
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:9404:12: Error: 'isEmoting' is already declared in this scope.
ERROR: bool get isEmoting => RustLib.instance.api
ERROR: ^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:9304:12: Context: Previous declaration of 'isEmoting'.
ERROR: bool get isEmoting => RustLib.instance.api
ERROR: ^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:9600:7: Error: 'isEmoting' is already declared in this scope.
ERROR: set isEmoting(bool isEmoting) => RustLib.instance.api
ERROR: ^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:9517:7: Context: Previous declaration of 'isEmoting'.
ERROR: set isEmoting(bool isEmoting) => RustLib.instance.api
ERROR: ^^^^^^^^^
ERROR: lib/src/rust/api/structs/savegame.dart:61:12: Error: 'isEmoting' is already declared in this scope.
ERROR: bool get isEmoting;
ERROR: ^^^^^^^^^
ERROR: lib/src/rust/api/structs/savegame.dart:21:12: Context: Previous declaration of 'isEmoting'.
ERROR: bool get isEmoting;
ERROR: ^^^^^^^^^
ERROR: lib/src/rust/api/structs/savegame.dart:147:7: Error: 'isEmoting' is already declared in this scope.
ERROR: set isEmoting(bool isEmoting);
ERROR: ^^^^^^^^^
ERROR: lib/src/rust/api/structs/savegame.dart:107:7: Context: Previous declaration of 'isEmoting'.
ERROR: set isEmoting(bool isEmoting);
ERROR: ^^^^^^^^^
ERROR: lib/src/rust/api/structs/savegame.dart:227:3: Error: 'int' isn't a type.
ERROR: int get hashCode => int.hashCode;
ERROR: ^^^
ERROR: lib/src/rust/api/structs/savegame.dart:220:23: Context: This isn't a type.
ERROR: final List<String>? int;
ERROR: ^^^
ERROR: lib/src/rust/api/structs/savegame.dart:245:3: Error: 'int' isn't a type.
ERROR: int get hashCode => int.hashCode;
ERROR: ^^^
ERROR: lib/src/rust/api/structs/savegame.dart:238:19: Context: This isn't a type.
ERROR: final Int32List int;
ERROR: ^^^
ERROR: lib/src/rust/api/structs/savegame.dart:281:3: Error: 'int' isn't a type.
ERROR: int get hashCode => int.hashCode;
ERROR: ^^^
ERROR: lib/src/rust/api/structs/savegame.dart:274:19: Context: This isn't a type.
ERROR: final Int32List int;
ERROR: ^^^
ERROR: lib/src/rust/api/structs/commons.dart:166:3: Error: 'int' isn't a type.
ERROR: int get hashCode => int.hashCode;
ERROR: ^^^
ERROR: lib/src/rust/api/structs/commons.dart:159:20: Context: This isn't a type.
ERROR: final Int32List? int;
ERROR: ^^^
ERROR: lib/src/rust/api/structs/commons.dart:177:9: Error: 'int' isn't a type.
ERROR: final int? int;
ERROR: ^^^
ERROR: lib/src/rust/api/structs/commons.dart:177:14: Context: This isn't a type.
ERROR: final int? int;
ERROR: ^^^
ERROR: lib/src/rust/api/structs/commons.dart:184:3: Error: 'int' isn't a type.
ERROR: int get hashCode => int.hashCode;
ERROR: ^^^
ERROR: lib/src/rust/api/structs/commons.dart:177:14: Context: This isn't a type.
ERROR: final int? int;
ERROR: ^^^
ERROR: lib/src/rust/api/structs/commons.dart:262:14: Error: 'initialParentTileIndex' is already declared in this scope.
ERROR: final int? initialParentTileIndex;
ERROR: ^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:250:14: Context: Previous declaration of 'initialParentTileIndex'.
ERROR: final int? initialParentTileIndex;
ERROR: ^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:263:14: Error: 'indexOfMenuItemView' is already declared in this scope.
ERROR: final int? indexOfMenuItemView;
ERROR: ^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:252:14: Context: Previous declaration of 'indexOfMenuItemView'.
ERROR: final int? indexOfMenuItemView;
ERROR: ^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:264:15: Error: 'instantUse' is already declared in this scope.
ERROR: final bool? instantUse;
ERROR: ^^^^^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:253:15: Context: Previous declaration of 'instantUse'.
ERROR: final bool? instantUse;
ERROR: ^^^^^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:265:15: Error: 'isEfficient' is already declared in this scope.
ERROR: final bool? isEfficient;
ERROR: ^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:254:15: Context: Previous declaration of 'isEfficient'.
ERROR: final bool? isEfficient;
ERROR: ^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:266:14: Error: 'animationSpeedModifier' is already declared in this scope.
ERROR: final int? animationSpeedModifier;
ERROR: ^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:255:17: Context: Previous declaration of 'animationSpeedModifier'.
ERROR: final double? animationSpeedModifier;
ERROR: ^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:294:14: Error: 'price' is already declared in this scope.
ERROR: final int? price;
ERROR: ^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:293:14: Context: Previous declaration of 'price'.
ERROR: final int? price;
ERROR: ^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:323:15: Error: 'isBottomless' is already declared in this scope.
ERROR: final bool? isBottomless;
ERROR: ^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:321:15: Context: Previous declaration of 'isBottomless'.
ERROR: final bool? isBottomless;
ERROR: ^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:354:15: Error: 'colorSameIndexAsParentSheetIndex' is already declared in this scope.
ERROR: final bool? colorSameIndexAsParentSheetIndex;
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:353:15: Context: Previous declaration of 'colorSameIndexAsParentSheetIndex'.
ERROR: final bool? colorSameIndexAsParentSheetIndex;
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:412:14: Error: 'speed' is already declared in this scope.
ERROR: final int? speed;
ERROR: ^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:312:14: Context: Previous declaration of 'speed'.
ERROR: final int? speed;
ERROR: ^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:415:14: Error: 'scale' is already declared in this scope.
ERROR: final int? scale;
ERROR: ^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:237:16: Context: Previous declaration of 'scale'.
ERROR: final Scale? scale;
ERROR: ^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:424:17: Error: 'gender' is already declared in this scope.
ERROR: final String? gender;
ERROR: ^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:409:17: Context: Previous declaration of 'gender'.
ERROR: final String? gender;
ERROR: ^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:479:10: Error: Duplicated parameter name 'initialParentTileIndex'.
ERROR: this.initialParentTileIndex,
ERROR: ^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:467:10: Context: Other parameter named 'initialParentTileIndex'.
ERROR: this.initialParentTileIndex,
ERROR: ^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:480:10: Error: Duplicated parameter name 'indexOfMenuItemView'.
ERROR: this.indexOfMenuItemView,
ERROR: ^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:469:10: Context: Other parameter named 'indexOfMenuItemView'.
ERROR: this.indexOfMenuItemView,
ERROR: ^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:481:10: Error: Duplicated parameter name 'instantUse'.
ERROR: this.instantUse,
ERROR: ^^^^^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:470:10: Context: Other parameter named 'instantUse'.
ERROR: this.instantUse,
ERROR: ^^^^^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:482:10: Error: Duplicated parameter name 'isEfficient'.
ERROR: this.isEfficient,
ERROR: ^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:471:10: Context: Other parameter named 'isEfficient'.
ERROR: this.isEfficient,
ERROR: ^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:483:10: Error: Duplicated parameter name 'animationSpeedModifier'.
ERROR: this.animationSpeedModifier,
ERROR: ^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:472:10: Context: Other parameter named 'animationSpeedModifier'.
ERROR: this.animationSpeedModifier,
ERROR: ^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:511:10: Error: Duplicated parameter name 'price'.
ERROR: this.price,
ERROR: ^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:510:10: Context: Other parameter named 'price'.
ERROR: this.price,
ERROR: ^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:540:10: Error: Duplicated parameter name 'isBottomless'.
ERROR: this.isBottomless,
ERROR: ^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:538:10: Context: Other parameter named 'isBottomless'.
ERROR: this.isBottomless,
ERROR: ^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:571:10: Error: Duplicated parameter name 'colorSameIndexAsParentSheetIndex'.
ERROR: this.colorSameIndexAsParentSheetIndex,
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:570:10: Context: Other parameter named 'colorSameIndexAsParentSheetIndex'.
ERROR: this.colorSameIndexAsParentSheetIndex,
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:629:10: Error: Duplicated parameter name 'speed'.
ERROR: this.speed,
ERROR: ^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:529:10: Context: Other parameter named 'speed'.
ERROR: this.speed,
ERROR: ^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:632:10: Error: Duplicated parameter name 'scale'.
ERROR: this.scale,
ERROR: ^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:454:10: Context: Other parameter named 'scale'.
ERROR: this.scale,
ERROR: ^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:641:10: Error: Duplicated parameter name 'gender'.
ERROR: this.gender,
ERROR: ^^^^^^
ERROR: lib/src/rust/api/structs/commons.dart:626:10: Context: Other parameter named 'gender'.
ERROR: this.gender,
ERROR: ^^^^^^
ERROR: lib/src/rust/api/structs/items.dart:113:14: Error: 'initialParentTileIndex' is already declared in this scope.
ERROR: final int? initialParentTileIndex;
ERROR: ^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/items.dart:101:14: Context: Previous declaration of 'initialParentTileIndex'.
ERROR: final int? initialParentTileIndex;
ERROR: ^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/items.dart:114:14: Error: 'indexOfMenuItemView' is already declared in this scope.
ERROR: final int? indexOfMenuItemView;
ERROR: ^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/items.dart:103:14: Context: Previous declaration of 'indexOfMenuItemView'.
ERROR: final int? indexOfMenuItemView;
ERROR: ^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/items.dart:115:15: Error: 'instantUse' is already declared in this scope.
ERROR: final bool? instantUse;
ERROR: ^^^^^^^^^^
ERROR: lib/src/rust/api/structs/items.dart:104:15: Context: Previous declaration of 'instantUse'.
ERROR: final bool? instantUse;
ERROR: ^^^^^^^^^^
ERROR: lib/src/rust/api/structs/items.dart:116:15: Error: 'isEfficient' is already declared in this scope.
ERROR: final bool? isEfficient;
ERROR: ^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/items.dart:105:15: Context: Previous declaration of 'isEfficient'.
ERROR: final bool? isEfficient;
ERROR: ^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/items.dart:117:14: Error: 'animationSpeedModifier' is already declared in this scope.
ERROR: final int? animationSpeedModifier;
ERROR: ^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/items.dart:106:17: Context: Previous declaration of 'animationSpeedModifier'.
ERROR: final double? animationSpeedModifier;
ERROR: ^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/items.dart:146:14: Error: 'price' is already declared in this scope.
ERROR: final int? price;
ERROR: ^^^^^
ERROR: lib/src/rust/api/structs/items.dart:145:14: Context: Previous declaration of 'price'.
ERROR: final int? price;
ERROR: ^^^^^
ERROR: lib/src/rust/api/structs/items.dart:175:15: Error: 'isBottomless' is already declared in this scope.
ERROR: final bool? isBottomless;
ERROR: ^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/items.dart:173:15: Context: Previous declaration of 'isBottomless'.
ERROR: final bool? isBottomless;
ERROR: ^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/items.dart:206:15: Error: 'colorSameIndexAsParentSheetIndex' is already declared in this scope.
ERROR: final bool? colorSameIndexAsParentSheetIndex;
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/items.dart:205:15: Context: Previous declaration of 'colorSameIndexAsParentSheetIndex'.
ERROR: final bool? colorSameIndexAsParentSheetIndex;
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/items.dart:276:10: Error: Duplicated parameter name 'initialParentTileIndex'.
ERROR: this.initialParentTileIndex,
ERROR: ^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/items.dart:264:10: Context: Other parameter named 'initialParentTileIndex'.
ERROR: this.initialParentTileIndex,
ERROR: ^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/items.dart:277:10: Error: Duplicated parameter name 'indexOfMenuItemView'.
ERROR: this.indexOfMenuItemView,
ERROR: ^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/items.dart:266:10: Context: Other parameter named 'indexOfMenuItemView'.
ERROR: this.indexOfMenuItemView,
ERROR: ^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/items.dart:278:10: Error: Duplicated parameter name 'instantUse'.
ERROR: this.instantUse,
ERROR: ^^^^^^^^^^
ERROR: lib/src/rust/api/structs/items.dart:267:10: Context: Other parameter named 'instantUse'.
ERROR: this.instantUse,
ERROR: ^^^^^^^^^^
ERROR: lib/src/rust/api/structs/items.dart:279:10: Error: Duplicated parameter name 'isEfficient'.
ERROR: this.isEfficient,
ERROR: ^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/items.dart:268:10: Context: Other parameter named 'isEfficient'.
ERROR: this.isEfficient,
ERROR: ^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/items.dart:280:10: Error: Duplicated parameter name 'animationSpeedModifier'.
ERROR: this.animationSpeedModifier,
ERROR: ^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/items.dart:269:10: Context: Other parameter named 'animationSpeedModifier'.
ERROR: this.animationSpeedModifier,
ERROR: ^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/items.dart:309:10: Error: Duplicated parameter name 'price'.
ERROR: this.price,
ERROR: ^^^^^
ERROR: lib/src/rust/api/structs/items.dart:308:10: Context: Other parameter named 'price'.
ERROR: this.price,
ERROR: ^^^^^
ERROR: lib/src/rust/api/structs/items.dart:338:10: Error: Duplicated parameter name 'isBottomless'.
ERROR: this.isBottomless,
ERROR: ^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/items.dart:336:10: Context: Other parameter named 'isBottomless'.
ERROR: this.isBottomless,
ERROR: ^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/items.dart:369:10: Error: Duplicated parameter name 'colorSameIndexAsParentSheetIndex'.
ERROR: this.colorSameIndexAsParentSheetIndex,
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/items.dart:368:10: Context: Other parameter named 'colorSameIndexAsParentSheetIndex'.
ERROR: this.colorSameIndexAsParentSheetIndex,
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/api/structs/quests.dart:43:3: Error: 'int' isn't a type.
ERROR: int get hashCode => int.hashCode;
ERROR: ^^^
ERROR: lib/src/rust/api/structs/quests.dart:36:20: Context: This isn't a type.
ERROR: final Int32List? int;
ERROR: ^^^
ERROR: lib/src/rust/api/structs/quests.dart:111:16: Error: 'questTitle' is already declared in this scope.
ERROR: final String questTitle;
ERROR: ^^^^^^^^^^
ERROR: lib/src/rust/api/structs/quests.dart:96:16: Context: Previous declaration of 'questTitle'.
ERROR: final String questTitle;
ERROR: ^^^^^^^^^^
ERROR: lib/src/rust/api/structs/quests.dart:162:19: Error: Duplicated parameter name 'questTitle'.
ERROR: required this.questTitle,
ERROR: ^^^^^^^^^^
ERROR: lib/src/rust/api/structs/quests.dart:147:19: Context: Other parameter named 'questTitle'.
ERROR: required this.questTitle,
ERROR: ^^^^^^^^^^
ERROR: lib/src/rust/third_party/serde/de/value.dart:96:24: Error: 'duplicateField' is already declared in this scope.
ERROR: static Future<Error> duplicateField({required String field}) =>
ERROR: ^^^^^^^^^^^^^^
ERROR: lib/src/rust/third_party/serde/de/value.dart:24:24: Context: Previous declaration of 'duplicateField'.
ERROR: static Future<Error> duplicateField({required String field}) =>
ERROR: ^^^^^^^^^^^^^^
ERROR: lib/src/rust/third_party/serde/de/value.dart:108:24: Error: 'invalidLength' is already declared in this scope.
ERROR: static Future<Error> invalidLength(
ERROR: ^^^^^^^^^^^^^
ERROR: lib/src/rust/third_party/serde/de/value.dart:36:24: Context: Previous declaration of 'invalidLength'.
ERROR: static Future<Error> invalidLength(
ERROR: ^^^^^^^^^^^^^
ERROR: lib/src/rust/third_party/serde/de/value.dart:125:24: Error: 'invalidType' is already declared in this scope.
ERROR: static Future<Error> invalidType(
ERROR: ^^^^^^^^^^^
ERROR: lib/src/rust/third_party/serde/de/value.dart:53:24: Context: Previous declaration of 'invalidType'.
ERROR: static Future<Error> invalidType(
ERROR: ^^^^^^^^^^^
ERROR: lib/src/rust/third_party/serde/de/value.dart:142:24: Error: 'invalidValue' is already declared in this scope.
ERROR: static Future<Error> invalidValue(
ERROR: ^^^^^^^^^^^^
ERROR: lib/src/rust/third_party/serde/de/value.dart:70:24: Context: Previous declaration of 'invalidValue'.
ERROR: static Future<Error> invalidValue(
ERROR: ^^^^^^^^^^^^
ERROR: lib/src/rust/third_party/serde/de/value.dart:150:24: Error: 'missingField' is already declared in this scope.
ERROR: static Future<Error> missingField({required String field}) =>
ERROR: ^^^^^^^^^^^^
ERROR: lib/src/rust/third_party/serde/de/value.dart:77:24: Context: Previous declaration of 'missingField'.
ERROR: static Future<Error> missingField({required String field}) =>
ERROR: ^^^^^^^^^^^^
ERROR: lib/src/rust/third_party/serde/de/value.dart:155:24: Error: 'unknownField' is already declared in this scope.
ERROR: static Future<Error> unknownField(
ERROR: ^^^^^^^^^^^^
ERROR: lib/src/rust/third_party/serde/de/value.dart:82:24: Context: Previous declaration of 'unknownField'.
ERROR: static Future<Error> unknownField(
ERROR: ^^^^^^^^^^^^
ERROR: lib/src/rust/third_party/serde/de/value.dart:162:24: Error: 'unknownVariant' is already declared in this scope.
ERROR: static Future<Error> unknownVariant(
ERROR: ^^^^^^^^^^^^^^
ERROR: lib/src/rust/third_party/serde/de/value.dart:88:24: Context: Previous declaration of 'unknownVariant'.
ERROR: static Future<Error> unknownVariant(
ERROR: ^^^^^^^^^^^^^^
ERROR: lib/src/rust/third_party/serde/de/value.dart:8:8: Error: Error when reading 'lib/src/rust/third_party/lib.dart': No such file or directory
ERROR: import '../../lib.dart';
ERROR: ^
ERROR: lib/src/rust/third_party/serde/de/value.dart:10:8: Error: Error when reading 'lib/src/rust/third_party/serde/de/de/value.dart': No such file or directory
ERROR: import 'de/value.dart';
ERROR: ^
ERROR: lib/src/rust/third_party/serde/__private/ser.dart:17:37: Error: Type 'Serialize' not found.
ERROR: implements RustOpaqueInterface, Serialize {
ERROR: ^^^^^^^^^
ERROR: lib/src/rust/third_party/serde/de/value.dart:20:16: Error: 'Error' is a supertype of itself.
ERROR: abstract class Error
ERROR: ^
ERROR: lib/src/rust/frb_generated.dart:21:1: Error: 'Error' is imported from both 'package:rust_app/src/rust/third_party/serde/de.dart' and 'package:rust_app/src/rust/third_party/serde/de/value.dart'.
ERROR: import 'third_party/serde/de/value.dart';
ERROR: ^^^^^
ERROR: lib/src/rust/frb_generated.io.dart:20:1: Error: 'Error' is imported from both 'package:rust_app/src/rust/third_party/serde/de.dart' and 'package:rust_app/src/rust/third_party/serde/de/value.dart'.
ERROR: import 'third_party/serde/de/value.dart';
ERROR: ^^^^^
ERROR: lib/src/rust/frb_generated.dart:559:11: Error: Can't use 'kCrateApiStructsSavegamePlayerAutoAccessorGetIsEmotingConstMeta' because it is declared more than once.
ERROR: kCrateApiStructsSavegamePlayerAutoAccessorGetIsEmotingConstMeta,
ERROR: ^
ERROR: lib/src/rust/frb_generated.dart:1117:11: Error: Can't use 'kCrateApiStructsSavegamePlayerAutoAccessorGetIsEmotingConstMeta' because it is declared more than once.
ERROR: kCrateApiStructsSavegamePlayerAutoAccessorGetIsEmotingConstMeta,
ERROR: ^
ERROR: lib/src/rust/frb_generated.dart:1761:11: Error: Can't use 'kCrateApiStructsSavegamePlayerAutoAccessorSetIsEmotingConstMeta' because it is declared more than once.
ERROR: kCrateApiStructsSavegamePlayerAutoAccessorSetIsEmotingConstMeta,
ERROR: ^
ERROR: lib/src/rust/frb_generated.dart:2338:11: Error: Can't use 'kCrateApiStructsSavegamePlayerAutoAccessorSetIsEmotingConstMeta' because it is declared more than once.
ERROR: kCrateApiStructsSavegamePlayerAutoAccessorSetIsEmotingConstMeta,
ERROR: ^
ERROR: lib/src/rust/frb_generated.dart:3161:9: Error: The method 'sse_encode_TraitDef_Expected' isn't defined for the class 'RustLibApiImpl'.
ERROR: - 'RustLibApiImpl' is from 'package:rust_app/src/rust/frb_generated.dart' ('lib/src/rust/frb_generated.dart').
ERROR: Try correcting the name to the name of an existing method, or defining a method named 'sse_encode_TraitDef_Expected'.
ERROR: sse_encode_TraitDef_Expected(exp, serializer);
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:3190:9: Error: The method 'sse_encode_TraitDef_Expected' isn't defined for the class 'RustLibApiImpl'.
ERROR: - 'RustLibApiImpl' is from 'package:rust_app/src/rust/frb_generated.dart' ('lib/src/rust/frb_generated.dart').
ERROR: Try correcting the name to the name of an existing method, or defining a method named 'sse_encode_TraitDef_Expected'.
ERROR: sse_encode_TraitDef_Expected(exp, serializer);
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:3219:9: Error: The method 'sse_encode_TraitDef_Expected' isn't defined for the class 'RustLibApiImpl'.
ERROR: - 'RustLibApiImpl' is from 'package:rust_app/src/rust/frb_generated.dart' ('lib/src/rust/frb_generated.dart').
ERROR: Try correcting the name to the name of an existing method, or defining a method named 'sse_encode_TraitDef_Expected'.
ERROR: sse_encode_TraitDef_Expected(exp, serializer);
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:4153:7: Error: Duplicated named argument 'initialParentTileIndex'.
ERROR: initialParentTileIndex: dco_decode_opt_box_autoadd_i_32(arr[25]),
ERROR: ^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:4154:7: Error: Duplicated named argument 'indexOfMenuItemView'.
ERROR: indexOfMenuItemView: dco_decode_opt_box_autoadd_i_32(arr[26]),
ERROR: ^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:4155:7: Error: Duplicated named argument 'instantUse'.
ERROR: instantUse: dco_decode_opt_box_autoadd_bool(arr[27]),
ERROR: ^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:4156:7: Error: Duplicated named argument 'isEfficient'.
ERROR: isEfficient: dco_decode_opt_box_autoadd_bool(arr[28]),
ERROR: ^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:4157:7: Error: Duplicated named argument 'animationSpeedModifier'.
ERROR: animationSpeedModifier: dco_decode_opt_box_autoadd_i_32(arr[29]),
ERROR: ^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:4188:7: Error: Duplicated named argument 'price'.
ERROR: price: dco_decode_opt_box_autoadd_i_32(arr[58]),
ERROR: ^^^^^
ERROR: lib/src/rust/frb_generated.dart:4221:7: Error: Duplicated named argument 'isBottomless'.
ERROR: isBottomless: dco_decode_opt_box_autoadd_bool(arr[87]),
ERROR: ^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:4258:7: Error: Duplicated named argument 'colorSameIndexAsParentSheetIndex'.
ERROR: colorSameIndexAsParentSheetIndex:
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:4157:7: Error: The argument type 'double?' can't be assigned to the parameter type 'int?'.
ERROR: animationSpeedModifier: dco_decode_opt_box_autoadd_i_32(arr[29]),
ERROR: ^
ERROR: lib/src/rust/frb_generated.dart:4726:7: Error: Duplicated named argument 'initialParentTileIndex'.
ERROR: initialParentTileIndex: dco_decode_opt_box_autoadd_i_32(arr[27]),
ERROR: ^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:4727:7: Error: Duplicated named argument 'indexOfMenuItemView'.
ERROR: indexOfMenuItemView: dco_decode_opt_box_autoadd_i_32(arr[28]),
ERROR: ^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:4728:7: Error: Duplicated named argument 'instantUse'.
ERROR: instantUse: dco_decode_opt_box_autoadd_bool(arr[29]),
ERROR: ^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:4729:7: Error: Duplicated named argument 'isEfficient'.
ERROR: isEfficient: dco_decode_opt_box_autoadd_bool(arr[30]),
ERROR: ^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:4730:7: Error: Duplicated named argument 'animationSpeedModifier'.
ERROR: animationSpeedModifier: dco_decode_opt_box_autoadd_i_32(arr[31]),
ERROR: ^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:4760:7: Error: Duplicated named argument 'price'.
ERROR: price: dco_decode_opt_box_autoadd_i_32(arr[59]),
ERROR: ^^^^^
ERROR: lib/src/rust/frb_generated.dart:4793:7: Error: Duplicated named argument 'isBottomless'.
ERROR: isBottomless: dco_decode_opt_box_autoadd_bool(arr[88]),
ERROR: ^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:4830:7: Error: Duplicated named argument 'colorSameIndexAsParentSheetIndex'.
ERROR: colorSameIndexAsParentSheetIndex:
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:4909:7: Error: Duplicated named argument 'speed'.
ERROR: speed: dco_decode_opt_box_autoadd_i_32(arr[177]),
ERROR: ^^^^^
ERROR: lib/src/rust/frb_generated.dart:4912:7: Error: Duplicated named argument 'scale'.
ERROR: scale: dco_decode_opt_box_autoadd_i_32(arr[180]),
ERROR: ^^^^^
ERROR: lib/src/rust/frb_generated.dart:4921:7: Error: Duplicated named argument 'gender'.
ERROR: gender: dco_decode_opt_String(arr[189]),
ERROR: ^^^^^^
ERROR: lib/src/rust/frb_generated.dart:4912:7: Error: The argument type 'Scale?' can't be assigned to the parameter type 'int?'.
ERROR: - 'Scale' is from 'package:rust_app/src/rust/api/structs/commons.dart' ('lib/src/rust/api/structs/commons.dart').
ERROR: scale: dco_decode_opt_box_autoadd_i_32(arr[180]),
ERROR: ^
ERROR: lib/src/rust/frb_generated.dart:4730:7: Error: The argument type 'double?' can't be assigned to the parameter type 'int?'.
ERROR: animationSpeedModifier: dco_decode_opt_box_autoadd_i_32(arr[31]),
ERROR: ^
ERROR: lib/src/rust/frb_generated.dart:5020:7: Error: Duplicated named argument 'questTitle'.
ERROR: questTitle: dco_decode_String(arr[18]),
ERROR: ^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:5794:9: Error: 'var_initialParentTileIndex' is already declared in this scope.
ERROR: var var_initialParentTileIndex =
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:5779:9: Context: Previous declaration of 'var_initialParentTileIndex'.
ERROR: var var_initialParentTileIndex =
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:5796:9: Error: 'var_indexOfMenuItemView' is already declared in this scope.
ERROR: var var_indexOfMenuItemView = sse_decode_opt_box_autoadd_i_32(deserializer);
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:5783:9: Context: Previous declaration of 'var_indexOfMenuItemView'.
ERROR: var var_indexOfMenuItemView = sse_decode_opt_box_autoadd_i_32(deserializer);
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:5797:9: Error: 'var_instantUse' is already declared in this scope.
ERROR: var var_instantUse = sse_decode_opt_box_autoadd_bool(deserializer);
ERROR: ^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:5784:9: Context: Previous declaration of 'var_instantUse'.
ERROR: var var_instantUse = sse_decode_opt_box_autoadd_bool(deserializer);
ERROR: ^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:5798:9: Error: 'var_isEfficient' is already declared in this scope.
ERROR: var var_isEfficient = sse_decode_opt_box_autoadd_bool(deserializer);
ERROR: ^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:5785:9: Context: Previous declaration of 'var_isEfficient'.
ERROR: var var_isEfficient = sse_decode_opt_box_autoadd_bool(deserializer);
ERROR: ^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:5799:9: Error: 'var_animationSpeedModifier' is already declared in this scope.
ERROR: var var_animationSpeedModifier =
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:5786:9: Context: Previous declaration of 'var_animationSpeedModifier'.
ERROR: var var_animationSpeedModifier =
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:5831:9: Error: 'var_price' is already declared in this scope.
ERROR: var var_price = sse_decode_opt_box_autoadd_i_32(deserializer);
ERROR: ^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:5830:9: Context: Previous declaration of 'var_price'.
ERROR: var var_price = sse_decode_opt_box_autoadd_i_32(deserializer);
ERROR: ^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:5865:9: Error: 'var_isBottomless' is already declared in this scope.
ERROR: var var_isBottomless = sse_decode_opt_box_autoadd_bool(deserializer);
ERROR: ^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:5863:9: Context: Previous declaration of 'var_isBottomless'.
ERROR: var var_isBottomless = sse_decode_opt_box_autoadd_bool(deserializer);
ERROR: ^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:5903:9: Error: 'var_colorSameIndexAsParentSheetIndex' is already declared in this scope.
ERROR: var var_colorSameIndexAsParentSheetIndex =
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:5901:9: Context: Previous declaration of 'var_colorSameIndexAsParentSheetIndex'.
ERROR: var var_colorSameIndexAsParentSheetIndex =
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:5998:9: Error: Duplicated named argument 'initialParentTileIndex'.
ERROR: initialParentTileIndex: var_initialParentTileIndex,
ERROR: ^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:5999:9: Error: Duplicated named argument 'indexOfMenuItemView'.
ERROR: indexOfMenuItemView: var_indexOfMenuItemView,
ERROR: ^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:6000:9: Error: Duplicated named argument 'instantUse'.
ERROR: instantUse: var_instantUse,
ERROR: ^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:6001:9: Error: Duplicated named argument 'isEfficient'.
ERROR: isEfficient: var_isEfficient,
ERROR: ^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:6002:9: Error: Duplicated named argument 'animationSpeedModifier'.
ERROR: animationSpeedModifier: var_animationSpeedModifier,
ERROR: ^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:6031:9: Error: Duplicated named argument 'price'.
ERROR: price: var_price,
ERROR: ^^^^^
ERROR: lib/src/rust/frb_generated.dart:6060:9: Error: Duplicated named argument 'isBottomless'.
ERROR: isBottomless: var_isBottomless,
ERROR: ^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:6091:9: Error: Duplicated named argument 'colorSameIndexAsParentSheetIndex'.
ERROR: colorSameIndexAsParentSheetIndex: var_colorSameIndexAsParentSheetIndex,
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:6002:9: Error: The argument type 'double?' can't be assigned to the parameter type 'int?'.
ERROR: animationSpeedModifier: var_animationSpeedModifier,
ERROR: ^
ERROR: lib/src/rust/frb_generated.dart:6767:9: Error: 'var_initialParentTileIndex' is already declared in this scope.
ERROR: var var_initialParentTileIndex =
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:6752:9: Context: Previous declaration of 'var_initialParentTileIndex'.
ERROR: var var_initialParentTileIndex =
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:6769:9: Error: 'var_indexOfMenuItemView' is already declared in this scope.
ERROR: var var_indexOfMenuItemView = sse_decode_opt_box_autoadd_i_32(deserializer);
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:6756:9: Context: Previous declaration of 'var_indexOfMenuItemView'.
ERROR: var var_indexOfMenuItemView = sse_decode_opt_box_autoadd_i_32(deserializer);
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:6770:9: Error: 'var_instantUse' is already declared in this scope.
ERROR: var var_instantUse = sse_decode_opt_box_autoadd_bool(deserializer);
ERROR: ^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:6757:9: Context: Previous declaration of 'var_instantUse'.
ERROR: var var_instantUse = sse_decode_opt_box_autoadd_bool(deserializer);
ERROR: ^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:6771:9: Error: 'var_isEfficient' is already declared in this scope.
ERROR: var var_isEfficient = sse_decode_opt_box_autoadd_bool(deserializer);
ERROR: ^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:6758:9: Context: Previous declaration of 'var_isEfficient'.
ERROR: var var_isEfficient = sse_decode_opt_box_autoadd_bool(deserializer);
ERROR: ^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:6772:9: Error: 'var_animationSpeedModifier' is already declared in this scope.
ERROR: var var_animationSpeedModifier =
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:6759:9: Context: Previous declaration of 'var_animationSpeedModifier'.
ERROR: var var_animationSpeedModifier =
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:6803:9: Error: 'var_price' is already declared in this scope.
ERROR: var var_price = sse_decode_opt_box_autoadd_i_32(deserializer);
ERROR: ^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:6802:9: Context: Previous declaration of 'var_price'.
ERROR: var var_price = sse_decode_opt_box_autoadd_i_32(deserializer);
ERROR: ^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:6837:9: Error: 'var_isBottomless' is already declared in this scope.
ERROR: var var_isBottomless = sse_decode_opt_box_autoadd_bool(deserializer);
ERROR: ^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:6835:9: Context: Previous declaration of 'var_isBottomless'.
ERROR: var var_isBottomless = sse_decode_opt_box_autoadd_bool(deserializer);
ERROR: ^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:6875:9: Error: 'var_colorSameIndexAsParentSheetIndex' is already declared in this scope.
ERROR: var var_colorSameIndexAsParentSheetIndex =
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:6873:9: Context: Previous declaration of 'var_colorSameIndexAsParentSheetIndex'.
ERROR: var var_colorSameIndexAsParentSheetIndex =
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:6961:9: Error: 'var_speed' is already declared in this scope.
ERROR: var var_speed = sse_decode_opt_box_autoadd_i_32(deserializer);
ERROR: ^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:6826:9: Context: Previous declaration of 'var_speed'.
ERROR: var var_speed = sse_decode_opt_box_autoadd_i_32(deserializer);
ERROR: ^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:6964:9: Error: 'var_scale' is already declared in this scope.
ERROR: var var_scale = sse_decode_opt_box_autoadd_i_32(deserializer);
ERROR: ^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:6739:9: Context: Previous declaration of 'var_scale'.
ERROR: var var_scale = sse_decode_opt_box_autoadd_scale(deserializer);
ERROR: ^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:6974:9: Error: 'var_gender' is already declared in this scope.
ERROR: var var_gender = sse_decode_opt_String(deserializer);
ERROR: ^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:6957:9: Context: Previous declaration of 'var_gender'.
ERROR: var var_gender = sse_decode_opt_String(deserializer);
ERROR: ^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:7043:9: Error: Duplicated named argument 'initialParentTileIndex'.
ERROR: initialParentTileIndex: var_initialParentTileIndex,
ERROR: ^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:7044:9: Error: Duplicated named argument 'indexOfMenuItemView'.
ERROR: indexOfMenuItemView: var_indexOfMenuItemView,
ERROR: ^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:7045:9: Error: Duplicated named argument 'instantUse'.
ERROR: instantUse: var_instantUse,
ERROR: ^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:7046:9: Error: Duplicated named argument 'isEfficient'.
ERROR: isEfficient: var_isEfficient,
ERROR: ^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:7047:9: Error: Duplicated named argument 'animationSpeedModifier'.
ERROR: animationSpeedModifier: var_animationSpeedModifier,
ERROR: ^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:7075:9: Error: Duplicated named argument 'price'.
ERROR: price: var_price,
ERROR: ^^^^^
ERROR: lib/src/rust/frb_generated.dart:7104:9: Error: Duplicated named argument 'isBottomless'.
ERROR: isBottomless: var_isBottomless,
ERROR: ^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:7135:9: Error: Duplicated named argument 'colorSameIndexAsParentSheetIndex'.
ERROR: colorSameIndexAsParentSheetIndex: var_colorSameIndexAsParentSheetIndex,
ERROR: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:7193:9: Error: Duplicated named argument 'speed'.
ERROR: speed: var_speed,
ERROR: ^^^^^
ERROR: lib/src/rust/frb_generated.dart:7196:9: Error: Duplicated named argument 'scale'.
ERROR: scale: var_scale,
ERROR: ^^^^^
ERROR: lib/src/rust/frb_generated.dart:7205:9: Error: Duplicated named argument 'gender'.
ERROR: gender: var_gender,
ERROR: ^^^^^^
ERROR: lib/src/rust/frb_generated.dart:7196:9: Error: The argument type 'Scale?' can't be assigned to the parameter type 'int?'.
ERROR: - 'Scale' is from 'package:rust_app/src/rust/api/structs/commons.dart' ('lib/src/rust/api/structs/commons.dart').
ERROR: scale: var_scale,
ERROR: ^
ERROR: lib/src/rust/frb_generated.dart:7047:9: Error: The argument type 'double?' can't be assigned to the parameter type 'int?'.
ERROR: animationSpeedModifier: var_animationSpeedModifier,
ERROR: ^
ERROR: lib/src/rust/frb_generated.dart:7283:9: Error: 'var_questTitle' is already declared in this scope.
ERROR: var var_questTitle = sse_decode_String(deserializer);
ERROR: ^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:7268:9: Context: Previous declaration of 'var_questTitle'.
ERROR: var var_questTitle = sse_decode_String(deserializer);
ERROR: ^^^^^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:7337:9: Error: Duplicated named argument 'questTitle'.
ERROR: questTitle: var_questTitle,
ERROR: ^^^^^^^^^^
ERROR: lib/src/rust/frb_generated.dart:8085:42: Error: The argument type 'double?' can't be assigned to the parameter type 'int?'.
ERROR: sse_encode_opt_box_autoadd_i_32(self.animationSpeedModifier, serializer);
ERROR: ^
ERROR: lib/src/rust/frb_generated.dart:8814:42: Error: The argument type 'double?' can't be assigned to the parameter type 'int?'.
ERROR: sse_encode_opt_box_autoadd_i_32(self.animationSpeedModifier, serializer);
ERROR: ^
ERROR: lib/src/rust/frb_generated.dart:8984:42: Error: The argument type 'Scale?' can't be assigned to the parameter type 'int?'.
ERROR: - 'Scale' is from 'package:rust_app/src/rust/api/structs/commons.dart' ('lib/src/rust/api/structs/commons.dart').
ERROR: sse_encode_opt_box_autoadd_i_32(self.scale, serializer);
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:177:9: Error: Not a constant expression.
ERROR: final int? int;
ERROR: ^^^
ERROR: lib/src/rust/api/structs/commons.dart:673:7: Error: Can't use 'scale' because it is declared more than once.
ERROR: scale.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:686:7: Error: Can't use 'initialParentTileIndex' because it is declared more than once.
ERROR: initialParentTileIndex.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:688:7: Error: Can't use 'indexOfMenuItemView' because it is declared more than once.
ERROR: indexOfMenuItemView.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:689:7: Error: Can't use 'instantUse' because it is declared more than once.
ERROR: instantUse.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:690:7: Error: Can't use 'isEfficient' because it is declared more than once.
ERROR: isEfficient.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:691:7: Error: Can't use 'animationSpeedModifier' because it is declared more than once.
ERROR: animationSpeedModifier.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:698:7: Error: Can't use 'initialParentTileIndex' because it is declared more than once.
ERROR: initialParentTileIndex.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:699:7: Error: Can't use 'indexOfMenuItemView' because it is declared more than once.
ERROR: indexOfMenuItemView.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:700:7: Error: Can't use 'instantUse' because it is declared more than once.
ERROR: instantUse.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:701:7: Error: Can't use 'isEfficient' because it is declared more than once.
ERROR: isEfficient.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:702:7: Error: Can't use 'animationSpeedModifier' because it is declared more than once.
ERROR: animationSpeedModifier.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:729:7: Error: Can't use 'price' because it is declared more than once.
ERROR: price.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:730:7: Error: Can't use 'price' because it is declared more than once.
ERROR: price.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:748:7: Error: Can't use 'speed' because it is declared more than once.
ERROR: speed.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:757:7: Error: Can't use 'isBottomless' because it is declared more than once.
ERROR: isBottomless.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:759:7: Error: Can't use 'isBottomless' because it is declared more than once.
ERROR: isBottomless.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:789:7: Error: Can't use 'colorSameIndexAsParentSheetIndex' because it is declared more than once.
ERROR: colorSameIndexAsParentSheetIndex.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:790:7: Error: Can't use 'colorSameIndexAsParentSheetIndex' because it is declared more than once.
ERROR: colorSameIndexAsParentSheetIndex.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:845:7: Error: Can't use 'gender' because it is declared more than once.
ERROR: gender.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:848:7: Error: Can't use 'speed' because it is declared more than once.
ERROR: speed.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:851:7: Error: Can't use 'scale' because it is declared more than once.
ERROR: scale.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:860:7: Error: Can't use 'gender' because it is declared more than once.
ERROR: gender.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:894:11: Error: Can't use 'scale' because it is declared more than once.
ERROR: scale == other.scale &&
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:907:11: Error: Can't use 'initialParentTileIndex' because it is declared more than once.
ERROR: initialParentTileIndex == other.initialParentTileIndex &&
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:909:11: Error: Can't use 'indexOfMenuItemView' because it is declared more than once.
ERROR: indexOfMenuItemView == other.indexOfMenuItemView &&
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:910:11: Error: Can't use 'instantUse' because it is declared more than once.
ERROR: instantUse == other.instantUse &&
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:911:11: Error: Can't use 'isEfficient' because it is declared more than once.
ERROR: isEfficient == other.isEfficient &&
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:912:11: Error: Can't use 'animationSpeedModifier' because it is declared more than once.
ERROR: animationSpeedModifier == other.animationSpeedModifier &&
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:919:11: Error: Can't use 'initialParentTileIndex' because it is declared more than once.
ERROR: initialParentTileIndex == other.initialParentTileIndex &&
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:920:11: Error: Can't use 'indexOfMenuItemView' because it is declared more than once.
ERROR: indexOfMenuItemView == other.indexOfMenuItemView &&
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:921:11: Error: Can't use 'instantUse' because it is declared more than once.
ERROR: instantUse == other.instantUse &&
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:922:11: Error: Can't use 'isEfficient' because it is declared more than once.
ERROR: isEfficient == other.isEfficient &&
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:923:11: Error: Can't use 'animationSpeedModifier' because it is declared more than once.
ERROR: animationSpeedModifier == other.animationSpeedModifier &&
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:950:11: Error: Can't use 'price' because it is declared more than once.
ERROR: price == other.price &&
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:951:11: Error: Can't use 'price' because it is declared more than once.
ERROR: price == other.price &&
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:969:11: Error: Can't use 'speed' because it is declared more than once.
ERROR: speed == other.speed &&
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:978:11: Error: Can't use 'isBottomless' because it is declared more than once.
ERROR: isBottomless == other.isBottomless &&
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:980:11: Error: Can't use 'isBottomless' because it is declared more than once.
ERROR: isBottomless == other.isBottomless &&
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:1010:11: Error: Can't use 'colorSameIndexAsParentSheetIndex' because it is declared more than once.
ERROR: colorSameIndexAsParentSheetIndex ==
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:1012:11: Error: Can't use 'colorSameIndexAsParentSheetIndex' because it is declared more than once.
ERROR: colorSameIndexAsParentSheetIndex ==
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:1069:11: Error: Can't use 'gender' because it is declared more than once.
ERROR: gender == other.gender &&
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:1072:11: Error: Can't use 'speed' because it is declared more than once.
ERROR: speed == other.speed &&
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:1075:11: Error: Can't use 'scale' because it is declared more than once.
ERROR: scale == other.scale &&
ERROR: ^
ERROR: lib/src/rust/api/structs/commons.dart:1084:11: Error: Can't use 'gender' because it is declared more than once.
ERROR: gender == other.gender &&
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:429:7: Error: Can't use 'initialParentTileIndex' because it is declared more than once.
ERROR: initialParentTileIndex.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:431:7: Error: Can't use 'indexOfMenuItemView' because it is declared more than once.
ERROR: indexOfMenuItemView.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:432:7: Error: Can't use 'instantUse' because it is declared more than once.
ERROR: instantUse.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:433:7: Error: Can't use 'isEfficient' because it is declared more than once.
ERROR: isEfficient.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:434:7: Error: Can't use 'animationSpeedModifier' because it is declared more than once.
ERROR: animationSpeedModifier.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:441:7: Error: Can't use 'initialParentTileIndex' because it is declared more than once.
ERROR: initialParentTileIndex.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:442:7: Error: Can't use 'indexOfMenuItemView' because it is declared more than once.
ERROR: indexOfMenuItemView.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:443:7: Error: Can't use 'instantUse' because it is declared more than once.
ERROR: instantUse.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:444:7: Error: Can't use 'isEfficient' because it is declared more than once.
ERROR: isEfficient.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:445:7: Error: Can't use 'animationSpeedModifier' because it is declared more than once.
ERROR: animationSpeedModifier.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:473:7: Error: Can't use 'price' because it is declared more than once.
ERROR: price.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:474:7: Error: Can't use 'price' because it is declared more than once.
ERROR: price.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:501:7: Error: Can't use 'isBottomless' because it is declared more than once.
ERROR: isBottomless.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:503:7: Error: Can't use 'isBottomless' because it is declared more than once.
ERROR: isBottomless.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:533:7: Error: Can't use 'colorSameIndexAsParentSheetIndex' because it is declared more than once.
ERROR: colorSameIndexAsParentSheetIndex.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:534:7: Error: Can't use 'colorSameIndexAsParentSheetIndex' because it is declared more than once.
ERROR: colorSameIndexAsParentSheetIndex.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:596:11: Error: Can't use 'initialParentTileIndex' because it is declared more than once.
ERROR: initialParentTileIndex == other.initialParentTileIndex &&
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:598:11: Error: Can't use 'indexOfMenuItemView' because it is declared more than once.
ERROR: indexOfMenuItemView == other.indexOfMenuItemView &&
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:599:11: Error: Can't use 'instantUse' because it is declared more than once.
ERROR: instantUse == other.instantUse &&
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:600:11: Error: Can't use 'isEfficient' because it is declared more than once.
ERROR: isEfficient == other.isEfficient &&
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:601:11: Error: Can't use 'animationSpeedModifier' because it is declared more than once.
ERROR: animationSpeedModifier == other.animationSpeedModifier &&
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:608:11: Error: Can't use 'initialParentTileIndex' because it is declared more than once.
ERROR: initialParentTileIndex == other.initialParentTileIndex &&
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:609:11: Error: Can't use 'indexOfMenuItemView' because it is declared more than once.
ERROR: indexOfMenuItemView == other.indexOfMenuItemView &&
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:610:11: Error: Can't use 'instantUse' because it is declared more than once.
ERROR: instantUse == other.instantUse &&
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:611:11: Error: Can't use 'isEfficient' because it is declared more than once.
ERROR: isEfficient == other.isEfficient &&
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:612:11: Error: Can't use 'animationSpeedModifier' because it is declared more than once.
ERROR: animationSpeedModifier == other.animationSpeedModifier &&
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:640:11: Error: Can't use 'price' because it is declared more than once.
ERROR: price == other.price &&
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:641:11: Error: Can't use 'price' because it is declared more than once.
ERROR: price == other.price &&
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:668:11: Error: Can't use 'isBottomless' because it is declared more than once.
ERROR: isBottomless == other.isBottomless &&
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:670:11: Error: Can't use 'isBottomless' because it is declared more than once.
ERROR: isBottomless == other.isBottomless &&
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:700:11: Error: Can't use 'colorSameIndexAsParentSheetIndex' because it is declared more than once.
ERROR: colorSameIndexAsParentSheetIndex ==
ERROR: ^
ERROR: lib/src/rust/api/structs/items.dart:702:11: Error: Can't use 'colorSameIndexAsParentSheetIndex' because it is declared more than once.
ERROR: colorSameIndexAsParentSheetIndex ==
ERROR: ^
ERROR: lib/src/rust/api/structs/quests.dart:200:7: Error: Can't use 'questTitle' because it is declared more than once.
ERROR: questTitle.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/quests.dart:215:7: Error: Can't use 'questTitle' because it is declared more than once.
ERROR: questTitle.hashCode ^
ERROR: ^
ERROR: lib/src/rust/api/structs/quests.dart:255:11: Error: Can't use 'questTitle' because it is declared more than once.
ERROR: questTitle == other.questTitle &&
ERROR: ^
ERROR: lib/src/rust/api/structs/quests.dart:270:11: Error: Can't use 'questTitle' because it is declared more than once.
ERROR: questTitle == other.questTitle &&
ERROR: ^
ERROR: lib/src/rust/third_party/serde/de/value.dart:25:7: Error: Undefined name 'should_not_reach_here'.
ERROR: should_not_reach_here;
ERROR: ^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/third_party/serde/de/value.dart:38:7: Error: Undefined name 'should_not_reach_here'.
ERROR: should_not_reach_here;
ERROR: ^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/third_party/serde/de/value.dart:55:7: Error: Undefined name 'should_not_reach_here'.
ERROR: should_not_reach_here;
ERROR: ^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/third_party/serde/de/value.dart:72:7: Error: Undefined name 'should_not_reach_here'.
ERROR: should_not_reach_here;
ERROR: ^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/third_party/serde/de/value.dart:78:7: Error: Undefined name 'should_not_reach_here'.
ERROR: should_not_reach_here;
ERROR: ^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/third_party/serde/de/value.dart:84:7: Error: Undefined name 'should_not_reach_here'.
ERROR: should_not_reach_here;
ERROR: ^^^^^^^^^^^^^^^^^^^^^
ERROR: lib/src/rust/third_party/serde/de/value.dart:90:7: Error: Undefined name 'should_not_reach_here'.
ERROR: should_not_reach_here;
ERROR: ^^^^^^^^^^^^^^^^^^^^^
ERROR: Target kernel_snapshot_program failed: Exception
SEVERE: 300 | declare_error_trait!(Error: Sized + StdError);
SEVERE: 300 | declare_error_trait!(Error: Sized + StdError);
SEVERE: 300 | declare_error_trait!(Error: Sized + StdError);
SEVERE: 300 | declare_error_trait!(Error: Sized + StdError);
SEVERE: 300 | declare_error_trait!(Error: Sized + StdError);
SEVERE: 300 | declare_error_trait!(Error: Sized + StdError);
SEVERE: 300 | declare_error_trait!(Error: Sized + StdError);
SEVERE: 300 | declare_error_trait!(Error: Sized + StdError);
SEVERE: 300 | declare_error_trait!(Error: Sized + StdError);
SEVERE: 300 | declare_error_trait!(Error: Sized + StdError);
SEVERE: 300 | declare_error_trait!(Error: Sized + StdError);
SEVERE: 300 | declare_error_trait!(Error: Sized + StdError);
SEVERE: 300 | declare_error_trait!(Error: Sized + StdError);
SEVERE: 300 | declare_error_trait!(Error: Sized + StdError);
SEVERE: 300 | declare_error_trait!(Error: Sized + StdError);
SEVERE: 300 | declare_error_trait!(Error: Sized + StdError);
SEVERE: | --------------------------------------------- doesn't satisfy `_: Send`, `_: Sync` or `dyn commons::_::_serde::de::Error: Sized`
SEVERE: `dyn commons::_::_serde::de::Error: Sized`
SEVERE: `dyn commons::_::_serde::de::Error: std::marker::Send`
SEVERE: `dyn commons::_::_serde::de::Error: std::marker::Sync`
SEVERE: warning: use of deprecated method `std::error::Error::description`: use the Display impl or to_string()
SEVERE: error[E0277]: the trait bound `commons::_::_serde::de::value::Error: SseEncode` is not satisfied
SEVERE: error[E0277]: the trait bound `commons::_::_serde::de::value::Error: SseEncode` is not satisfied
SEVERE: error[E0277]: the trait bound `commons::_::_serde::de::value::Error: SseEncode` is not satisfied
SEVERE: error[E0277]: the trait bound `commons::_::_serde::de::value::Error: SseEncode` is not satisfied
SEVERE: error[E0277]: the trait bound `commons::_::_serde::de::value::Error: SseEncode` is not satisfied
SEVERE: 300 | declare_error_trait!(Error: Sized + StdError);
SEVERE: error[E0277]: the trait bound `commons::_::_serde::de::value::Error: SseEncode` is not satisfied
SEVERE: 300 | declare_error_trait!(Error: Sized + StdError);
SEVERE: error[E0277]: the trait bound `commons::_::_serde::de::value::Error: SseEncode` is not satisfied
SEVERE: 300 | declare_error_trait!(Error: Sized + StdError);
SEVERE: | ^^^^ the trait `From<&dyn commons::_::_serde::de::Error>` is not implemented for `FrbWrapper<dyn commons::_::_serde::de::Error>`, which is required by `&dyn commons::_::_serde::de::Error: Into<_>`
SEVERE: error: lifetime may not live long enough
SEVERE: warning: `rust_lib_rust_app` (lib) generated 1 warning
SEVERE: error: could not compile `rust_lib_rust_app` (lib) due to 326 previous errors; 1 warning emitted
Building Linux application...
Error: Build process failed
I've realized what happened, I think. My struct has some parameters which have different casing: gender
, Gender
, isEfficient
, IsEfficient
- the translator ignored these subtle changes, thus the duplication errors. Since Rust is case-sensitive, gender
and Gender
were different, and so is Dart - but the translator turned them all into lowercase.
But I'm not sure how to fix it. Those differently cased parameters do need to exist. I could perhaps name the actual parameters something else and use #[serde(rename)]
but I'm not sure if that's the best solution.
My struct has some parameters which have different casing: gender, Gender, isEfficient, IsEfficient
Ah I guess so! frb tries to rename it to follow naming convention of each language.
Those differently cased parameters do need to exist.
I wonder what is your use case? Often I heard people saying such naming may be a little be confusing to users.
Btw you can check #[frb(name = ...)]
to see whether it helps.
It's a Stardew Valley savefile parser, so we have to adhere all it's quirks. It's late for me, so I'll check out #[frb(name = ...)]
tomorrow.
I see... That's really weird...
This is weird,
error[E0412]: cannot find type `SaveGame` in this scope
--> src/frb_generated.rs:284:51
|
284 | impl flutter_rust_bridge::IntoIntoDart<FrbWrapper<SaveGame>> for SaveGame {
| ^^^^^^^^ not found in this scope
|
help: consider importing this struct
|
28 + use rusty_walnut::structs::savegame::SaveGame;
|
The compiler knows where it is, but FRB doesn't inject that one-line no matter what.
Update: Making the use
statement pub
in the code does seem to add the structs into the generated code, but...
error[E0412]: cannot find type `SaveGame` in this scope
--> src/frb_generated.rs:332:27
|
332 | impl SseEncode for Option<SaveGame> {
| ^^^^^^^^ not found in this scope
|
help: consider importing one of these structs
|
28 + use crate::frb_generated::structs::savegame::SaveGame;
|
28 + use rusty_walnut::structs::savegame::SaveGame;
|
The generated code doesn't seem to use it, it still tries to call SaveGame
without importing it.
Update: I had to import SaveGame
via it's full path (i.e pub use rusty_walnut::structs::savegame::SaveGame;
). Previously I was doing pub use rusty_walnut::*;
and then calling it like this: structs::savegame::SaveGame
. I guess FRB couldn't detect that.
But, the issues don't end there. But I'm close. Here's my Rust function that I call from Dart:
pub fn load_savefile(file_path: &str) -> Option<SaveGame> {
let savegame_result = parse_savefile(file_path);
match savegame_result {
Ok(s) => {
Some(s)
}
Err(e) => {
eprintln!("{}", e);
None
}
}
}
So, it returns a SaveGame
(on the Dart side of things, it returns a SaveGameImpl
). The issue is that the SaveGameImpl
class doesn't have any of it's original fields from Rust, it's just empty. Do note that rusty_walnut
is a separate local crate.
The issue is that the SaveGameImpl class doesn't have any of it's original fields from Rust, it's just empty.
Do you mean it is opaque instead of non-opaque? (or something else) Maybe paste the generate SaveGame & SaveGameImpl code to have a brief look.
The issue is that the SaveGameImpl class doesn't have any of it's original fields from Rust, it's just empty.
Do you mean it is opaque instead of non-opaque? (or something else) Maybe paste the generate SaveGame & SaveGameImpl code to have a brief look.
SaveGame
is opaque, yes.
// Rust type: RustOpaqueMoi<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<SaveGame>>
abstract class SaveGame implements RustOpaqueInterface {}
And here's the generated file: frb_generated.dart.txt
And here's my API code:
use flutter_rust_bridge::frb;
pub use rusty_walnut::*;
pub use rusty_walnut::structs::savegame::SaveGame;
#[frb(init)]
pub fn init_app() {
flutter_rust_bridge::setup_default_user_utils();
}
pub fn load_savefile(file_path: &str) -> Option<SaveGame> {
let savegame_result = parse_savefile(file_path);
match savegame_result {
Ok(s) => {
Some(s)
}
Err(e) => {
eprintln!("{}", e);
None
}
}
}
Some background: I ditched my previous attempt at converting all my Rust libraries to Dart, because I realized I didn't need to access them from Dart, so, there was no need to convert serde
and quick-xml
, I instead have Rust functions that do all the work (parse_savefile
from rusty_walnut
) and return a SaveGame
struct. I also ditched serde-value
because the functionality it provides wasn't worth the extra hassle.
If you manually handle third party types (instead of auto scan), then if you want non-opaque types, you need to do mirroring.
because I realized I didn't need to access them from Dart, so, there was no need to convert serde and quick-xml
Looks great!
If you manually handle third party types (instead of auto scan), then if you want non-opaque types, you need to do mirroring.
because I realized I didn't need to access them from Dart, so, there was no need to convert serde and quick-xml
Looks great!
I did add the rusty_walnut
crate for auto scanning:
# flutter_rust_bridge.yaml
rust_input: crate::api, crate::rusty_walnut
...
But perhaps this is wrong?
Hmm, if it does not work, then maybe "use crate A's non-opaque struct in crate B" is not implemented yet in this experimental feature...
Perhaps. But yes, as it turns out, no code is generated for rusty_walnut
at all. I dunno, maybe rusty_walnut
being it's own crate is causing issues? Maybe FRB can't detect it?
Structure of generated code:
Original Rust code:
Update: changing from crate::rusty_walnut
to rusty_walnut
does seem to generate Dart code for the crate. I guess that makes sense, rusty_walnut
is it's own crate. I guess error reporting if it can't find an entry in rust_input
would be neat. Now I have to see how well it hooks up to the result of loadSavefile
(which returns a SaveGameImpl
)
Update: I think I'm in the final stages of making this work? But I don't understand this. What's wrong? Something about trait bounds not being satisfied.. Error log:
> cargo build --release (pwd: /home/furtidev/Programming/alt_flutter_rust_bridge/frb_example/dart_minimal/rust, env: {})
Compiling frb_example_dart_minimal v0.1.0 (/home/furtidev/Programming/alt_flutter_rust_bridge/frb_example/dart_minimal/rust)
error[E0599]: the method `into_into_dart` exists for enum `Option<Box<Item>>`, but its trait bounds were not satisfied
--> src/frb_generated.rs:3160:34
|
3160 | self.0.lastInputItem.into_into_dart().into_dart(),
| ^^^^^^^^^^^^^^
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:574:1
|
574 | pub enum Option<T> {
| ------------------ doesn't satisfy `Option<Box<Item>>: IntoIntoDart<Option<_>>`
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:238:1
|
238 | / pub struct Box<
239 | | T: ?Sized,
240 | | #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
241 | | >(Unique<T>, A);
| |_- doesn't satisfy `Box<Item>: IntoIntoDart<_>`
|
= note: the following trait bounds were not satisfied:
`Box<Item>: IntoIntoDart<_>`
which is required by `Option<Box<Item>>: IntoIntoDart<Option<_>>`
note: the method `into_into_dart` exists on the type `Box<Item>`
--> /home/furtidev/Programming/alt_flutter_rust_bridge/frb_rust/src/misc/into_into_dart.rs:16:5
|
16 | fn into_into_dart(self) -> D;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: consider using `Option::expect` to unwrap the `Box<Item>` value, panicking if the value is an `Option::None`
|
3160 | self.0.lastInputItem.expect("REASON").into_into_dart().into_dart(),
| +++++++++++++++++
error[E0599]: the method `into_into_dart` exists for enum `Option<Box<Item>>`, but its trait bounds were not satisfied
--> src/frb_generated.rs:3245:25
|
3245 | self.0.bait.into_into_dart().into_dart(),
| ^^^^^^^^^^^^^^
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:574:1
|
574 | pub enum Option<T> {
| ------------------ doesn't satisfy `Option<Box<Item>>: IntoIntoDart<Option<_>>`
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:238:1 |
238 | / pub struct Box<
239 | | T: ?Sized,
240 | | #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
241 | | >(Unique<T>, A);
| |_- doesn't satisfy `Box<Item>: IntoIntoDart<_>` |
= note: the following trait bounds were not satisfied:
`Box<Item>: IntoIntoDart<_>`
which is required by `Option<Box<Item>>: IntoIntoDart<Option<_>>`
note: the method `into_into_dart` exists on the type `Box<Item>`
--> /home/furtidev/Programming/alt_flutter_rust_bridge/frb_rust/src/misc/into_into_dart.rs:16:5
|
16 | fn into_into_dart(self) -> D;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: consider using `Option::expect` to unwrap the `Box<Item>` value, panicking if the value is an `Option::None`
|
3245 | self.0.bait.expect("REASON").into_into_dart().into_dart(),
| +++++++++++++++++
error[E0599]: the method `into_into_dart` exists for enum `Option<Box<Item>>`, but its trait bounds were not satisfied
--> src/frb_generated.rs:3264:33
|
3264 | self.0.requiredItem.into_into_dart().into_dart(),
| ^^^^^^^^^^^^^^
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:574:1
|
574 | pub enum Option<T> {
| ------------------ doesn't satisfy `Option<Box<Item>>: IntoIntoDart<Option<_>>`
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:238:1 |
238 | / pub struct Box<
239 | | T: ?Sized,
240 | | #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
241 | | >(Unique<T>, A);
| |_- doesn't satisfy `Box<Item>: IntoIntoDart<_>` |
= note: the following trait bounds were not satisfied:
`Box<Item>: IntoIntoDart<_>`
which is required by `Option<Box<Item>>: IntoIntoDart<Option<_>>`
note: the method `into_into_dart` exists on the type `Box<Item>`
--> /home/furtidev/Programming/alt_flutter_rust_bridge/frb_rust/src/misc/into_into_dart.rs:16:5
|
16 | fn into_into_dart(self) -> D;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: consider using `Option::expect` to unwrap the `Box<Item>` value, panicking if the value is an `Option::None`
|
3264 | self.0.requiredItem.expect("REASON").into_into_dart().into_dart(),
| +++++++++++++++++
error[E0599]: the method `into_into_dart` exists for enum `Option<Box<Item>>`, but its trait bounds were not satisfied
--> src/frb_generated.rs:3272:32
|
3272 | self.0.displayItem.into_into_dart().into_dart(),
| ^^^^^^^^^^^^^^
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:574:1
|
574 | pub enum Option<T> {
| ------------------ doesn't satisfy `Option<Box<Item>>: IntoIntoDart<Option<_>>`
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:238:1 |
238 | / pub struct Box<
239 | | T: ?Sized,
240 | | #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
241 | | >(Unique<T>, A);
| |_- doesn't satisfy `Box<Item>: IntoIntoDart<_>` |
= note: the following trait bounds were not satisfied:
`Box<Item>: IntoIntoDart<_>`
which is required by `Option<Box<Item>>: IntoIntoDart<Option<_>>`
note: the method `into_into_dart` exists on the type `Box<Item>`
--> /home/furtidev/Programming/alt_flutter_rust_bridge/frb_rust/src/misc/into_into_dart.rs:16:5
|
16 | fn into_into_dart(self) -> D;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: consider using `Option::expect` to unwrap the `Box<Item>` value, panicking if the value is an `Option::None`
|
3272 | self.0.displayItem.expect("REASON").into_into_dart().into_dart(),
| +++++++++++++++++
error[E0599]: the method `into_into_dart` exists for enum `Option<Box<Item>>`, but its trait bounds were not satisfied
--> src/frb_generated.rs:3437:34
|
3437 | self.0.lastInputItem.into_into_dart().into_dart(),
| ^^^^^^^^^^^^^^
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:574:1
|
574 | pub enum Option<T> {
| ------------------ doesn't satisfy `Option<Box<Item>>: IntoIntoDart<Option<_>>`
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:238:1 |
238 | / pub struct Box<
239 | | T: ?Sized,
240 | | #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
241 | | >(Unique<T>, A);
| |_- doesn't satisfy `Box<Item>: IntoIntoDart<_>` |
= note: the following trait bounds were not satisfied:
`Box<Item>: IntoIntoDart<_>`
which is required by `Option<Box<Item>>: IntoIntoDart<Option<_>>`
note: the method `into_into_dart` exists on the type `Box<Item>`
--> /home/furtidev/Programming/alt_flutter_rust_bridge/frb_rust/src/misc/into_into_dart.rs:16:5
|
16 | fn into_into_dart(self) -> D;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: consider using `Option::expect` to unwrap the `Box<Item>` value, panicking if the value is an `Option::None`
|
3437 | self.0.lastInputItem.expect("REASON").into_into_dart().into_dart(),
| +++++++++++++++++
error[E0599]: the method `into_into_dart` exists for enum `Option<Box<Item>>`, but its trait bounds were not satisfied
--> src/frb_generated.rs:3521:25
|
3521 | self.0.bait.into_into_dart().into_dart(),
| ^^^^^^^^^^^^^^
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:574:1
|
574 | pub enum Option<T> {
| ------------------ doesn't satisfy `Option<Box<Item>>: IntoIntoDart<Option<_>>`
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:238:1 |
238 | / pub struct Box<
239 | | T: ?Sized,
240 | | #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
241 | | >(Unique<T>, A);
| |_- doesn't satisfy `Box<Item>: IntoIntoDart<_>` |
= note: the following trait bounds were not satisfied:
`Box<Item>: IntoIntoDart<_>`
which is required by `Option<Box<Item>>: IntoIntoDart<Option<_>>`
note: the method `into_into_dart` exists on the type `Box<Item>`
--> /home/furtidev/Programming/alt_flutter_rust_bridge/frb_rust/src/misc/into_into_dart.rs:16:5
|
16 | fn into_into_dart(self) -> D;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: consider using `Option::expect` to unwrap the `Box<Item>` value, panicking if the value is an `Option::None`
|
3521 | self.0.bait.expect("REASON").into_into_dart().into_dart(),
| +++++++++++++++++
error[E0599]: the method `into_into_dart` exists for enum `Option<Box<Item>>`, but its trait bounds were not satisfied
--> src/frb_generated.rs:3540:33
|
3540 | self.0.requiredItem.into_into_dart().into_dart(),
| ^^^^^^^^^^^^^^
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:574:1
|
574 | pub enum Option<T> {
| ------------------ doesn't satisfy `Option<Box<Item>>: IntoIntoDart<Option<_>>`
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:238:1
|
238 | / pub struct Box<
239 | | T: ?Sized, 240 | | #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
241 | | >(Unique<T>, A);
| |_- doesn't satisfy `Box<Item>: IntoIntoDart<_>`
|
= note: the following trait bounds were not satisfied:
`Box<Item>: IntoIntoDart<_>` which is required by `Option<Box<Item>>: IntoIntoDart<Option<_>>`
note: the method `into_into_dart` exists on the type `Box<Item>`
--> /home/furtidev/Programming/alt_flutter_rust_bridge/frb_rust/src/misc/into_into_dart.rs:16:5
|
16 | fn into_into_dart(self) -> D;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: consider using `Option::expect` to unwrap the `Box<Item>` value, panicking if the value is an `Option::None`
|
3540 | self.0.requiredItem.expect("REASON").into_into_dart().into_dart(),
| +++++++++++++++++
error[E0599]: the method `into_into_dart` exists for enum `Option<Box<Item>>`, but its trait bounds were not satisfied
--> src/frb_generated.rs:3548:32
|
3548 | self.0.displayItem.into_into_dart().into_dart(),
| ^^^^^^^^^^^^^^
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:574:1
|
574 | pub enum Option<T> {
| ------------------ doesn't satisfy `Option<Box<Item>>: IntoIntoDart<Option<_>>`
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:238:1
|
238 | / pub struct Box<
239 | | T: ?Sized,
240 | | #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
241 | | >(Unique<T>, A);
| |_- doesn't satisfy `Box<Item>: IntoIntoDart<_>`
|
= note: the following trait bounds were not satisfied:
`Box<Item>: IntoIntoDart<_>`
which is required by `Option<Box<Item>>: IntoIntoDart<Option<_>>`
note: the method `into_into_dart` exists on the type `Box<Item>`
--> /home/furtidev/Programming/alt_flutter_rust_bridge/frb_rust/src/misc/into_into_dart.rs:16:5
|
16 | fn into_into_dart(self) -> D;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: consider using `Option::expect` to unwrap the `Box<Item>` value, panicking if the value is an `Option::None`
|
3548 | self.0.displayItem.expect("REASON").into_into_dart().into_dart(),
| +++++++++++++++++
For more information about this error, try `rustc --explain E0599`.
error: could not compile `frb_example_dart_minimal` (lib) due to 8 previous errors
Unhandled exception:
ProcessException: Bad exit code (101). If you want to see extra information, set FRB_DART_RUN_COMMAND_STDERR=1
Command: cargo build --release
#0 runCommand (package:flutter_rust_bridge/src/cli/run_command.dart:67:5)
<asynchronous suspension>
#1 simpleBuild (package:flutter_rust_bridge_utils/src/simple_build_utils.dart:31:5)
<asynchronous suspension>
Building native assets for package:frb_example_dart_minimal failed.
file:///home/furtidev/Programming/alt_flutter_rust_bridge/frb_example/dart_minimal/build.dart returned with exit code: 255.
To reproduce run:
/home/furtidev/Programming/thirdparty/flutter-dev/flutter/bin/cache/dart-sdk/bin/dart --packages=/home/furtidev/Programming/alt_flutter_rust_bridge/frb_example/dart_minimal/.dart_tool/package_config.json /home/furtidev/Programming/alt_flutter_rust_bridge/frb_example/dart_minimal/build.dart --config=/home/furtidev/Programming/alt_flutter_rust_bridge/frb_example/dart_minimal/.dart_tool/native_assets_builder/e132cadf2b7b651093280e06b4e27b6c/config.json
stderr:
> cargo build --release (pwd: /home/furtidev/Programming/alt_flutter_rust_bridge/frb_example/dart_minimal/rust, env: {})
Compiling frb_example_dart_minimal v0.1.0 (/home/furtidev/Programming/alt_flutter_rust_bridge/frb_example/dart_minimal/rust)
error[E0599]: the method `into_into_dart` exists for enum `Option<Box<Item>>`, but its trait bounds were not satisfied
--> src/frb_generated.rs:3160:34
|
3160 | self.0.lastInputItem.into_into_dart().into_dart(),
| ^^^^^^^^^^^^^^
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:574:1
|
574 | pub enum Option<T> {
| ------------------ doesn't satisfy `Option<Box<Item>>: IntoIntoDart<Option<_>>`
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:238:1
|
238 | / pub struct Box<
239 | | T: ?Sized,
240 | | #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
241 | | >(Unique<T>, A);
| |_- doesn't satisfy `Box<Item>: IntoIntoDart<_>`
|
= note: the following trait bounds were not satisfied:
`Box<Item>: IntoIntoDart<_>`
which is required by `Option<Box<Item>>: IntoIntoDart<Option<_>>`
note: the method `into_into_dart` exists on the type `Box<Item>`
--> /home/furtidev/Programming/alt_flutter_rust_bridge/frb_rust/src/misc/into_into_dart.rs:16:5
|
16 | fn into_into_dart(self) -> D;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: consider using `Option::expect` to unwrap the `Box<Item>` value, panicking if the value is an `Option::None`
|
3160 | self.0.lastInputItem.expect("REASON").into_into_dart().into_dart(),
| +++++++++++++++++
error[E0599]: the method `into_into_dart` exists for enum `Option<Box<Item>>`, but its trait bounds were not satisfied
--> src/frb_generated.rs:3245:25
|
3245 | self.0.bait.into_into_dart().into_dart(),
| ^^^^^^^^^^^^^^
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:574:1
|
574 | pub enum Option<T> {
| ------------------ doesn't satisfy `Option<Box<Item>>: IntoIntoDart<Option<_>>`
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:238:1
|
238 | / pub struct Box<
239 | | T: ?Sized,
240 | | #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
241 | | >(Unique<T>, A);
| |_- doesn't satisfy `Box<Item>: IntoIntoDart<_>`
|
= note: the following trait bounds were not satisfied:
`Box<Item>: IntoIntoDart<_>`
which is required by `Option<Box<Item>>: IntoIntoDart<Option<_>>`
note: the method `into_into_dart` exists on the type `Box<Item>`
--> /home/furtidev/Programming/alt_flutter_rust_bridge/frb_rust/src/misc/into_into_dart.rs:16:5
|
16 | fn into_into_dart(self) -> D;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: consider using `Option::expect` to unwrap the `Box<Item>` value, panicking if the value is an `Option::None`
|
3245 | self.0.bait.expect("REASON").into_into_dart().into_dart(),
| +++++++++++++++++
error[E0599]: the method `into_into_dart` exists for enum `Option<Box<Item>>`, but its trait bounds were not satisfied
--> src/frb_generated.rs:3264:33
|
3264 | self.0.requiredItem.into_into_dart().into_dart(),
| ^^^^^^^^^^^^^^
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:574:1
|
574 | pub enum Option<T> {
| ------------------ doesn't satisfy `Option<Box<Item>>: IntoIntoDart<Option<_>>`
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:238:1
|
238 | / pub struct Box<
239 | | T: ?Sized,
240 | | #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
241 | | >(Unique<T>, A);
| |_- doesn't satisfy `Box<Item>: IntoIntoDart<_>`
|
= note: the following trait bounds were not satisfied:
`Box<Item>: IntoIntoDart<_>`
which is required by `Option<Box<Item>>: IntoIntoDart<Option<_>>`
note: the method `into_into_dart` exists on the type `Box<Item>`
--> /home/furtidev/Programming/alt_flutter_rust_bridge/frb_rust/src/misc/into_into_dart.rs:16:5
|
16 | fn into_into_dart(self) -> D;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: consider using `Option::expect` to unwrap the `Box<Item>` value, panicking if the value is an `Option::None`
|
3264 | self.0.requiredItem.expect("REASON").into_into_dart().into_dart(),
| +++++++++++++++++
error[E0599]: the method `into_into_dart` exists for enum `Option<Box<Item>>`, but its trait bounds were not satisfied
--> src/frb_generated.rs:3272:32
|
3272 | self.0.displayItem.into_into_dart().into_dart(),
| ^^^^^^^^^^^^^^
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:574:1
|
574 | pub enum Option<T> {
| ------------------ doesn't satisfy `Option<Box<Item>>: IntoIntoDart<Option<_>>`
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:238:1
|
238 | / pub struct Box<
239 | | T: ?Sized,
240 | | #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
241 | | >(Unique<T>, A);
| |_- doesn't satisfy `Box<Item>: IntoIntoDart<_>`
|
= note: the following trait bounds were not satisfied:
`Box<Item>: IntoIntoDart<_>`
which is required by `Option<Box<Item>>: IntoIntoDart<Option<_>>`
note: the method `into_into_dart` exists on the type `Box<Item>`
--> /home/furtidev/Programming/alt_flutter_rust_bridge/frb_rust/src/misc/into_into_dart.rs:16:5
|
16 | fn into_into_dart(self) -> D;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: consider using `Option::expect` to unwrap the `Box<Item>` value, panicking if the value is an `Option::None`
|
3272 | self.0.displayItem.expect("REASON").into_into_dart().into_dart(),
| +++++++++++++++++
error[E0599]: the method `into_into_dart` exists for enum `Option<Box<Item>>`, but its trait bounds were not satisfied
--> src/frb_generated.rs:3437:34
|
3437 | self.0.lastInputItem.into_into_dart().into_dart(),
| ^^^^^^^^^^^^^^
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:574:1
|
574 | pub enum Option<T> {
| ------------------ doesn't satisfy `Option<Box<Item>>: IntoIntoDart<Option<_>>`
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:238:1
|
238 | / pub struct Box<
239 | | T: ?Sized,
240 | | #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
241 | | >(Unique<T>, A);
| |_- doesn't satisfy `Box<Item>: IntoIntoDart<_>`
|
= note: the following trait bounds were not satisfied:
`Box<Item>: IntoIntoDart<_>`
which is required by `Option<Box<Item>>: IntoIntoDart<Option<_>>`
note: the method `into_into_dart` exists on the type `Box<Item>`
--> /home/furtidev/Programming/alt_flutter_rust_bridge/frb_rust/src/misc/into_into_dart.rs:16:5
|
16 | fn into_into_dart(self) -> D;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: consider using `Option::expect` to unwrap the `Box<Item>` value, panicking if the value is an `Option::None`
|
3437 | self.0.lastInputItem.expect("REASON").into_into_dart().into_dart(),
| +++++++++++++++++
error[E0599]: the method `into_into_dart` exists for enum `Option<Box<Item>>`, but its trait bounds were not satisfied
--> src/frb_generated.rs:3521:25
|
3521 | self.0.bait.into_into_dart().into_dart(),
| ^^^^^^^^^^^^^^
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:574:1
|
574 | pub enum Option<T> {
| ------------------ doesn't satisfy `Option<Box<Item>>: IntoIntoDart<Option<_>>`
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:238:1
|
238 | / pub struct Box<
239 | | T: ?Sized,
240 | | #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
241 | | >(Unique<T>, A);
| |_- doesn't satisfy `Box<Item>: IntoIntoDart<_>`
|
= note: the following trait bounds were not satisfied:
`Box<Item>: IntoIntoDart<_>`
which is required by `Option<Box<Item>>: IntoIntoDart<Option<_>>`
note: the method `into_into_dart` exists on the type `Box<Item>`
--> /home/furtidev/Programming/alt_flutter_rust_bridge/frb_rust/src/misc/into_into_dart.rs:16:5
|
16 | fn into_into_dart(self) -> D;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: consider using `Option::expect` to unwrap the `Box<Item>` value, panicking if the value is an `Option::None`
|
3521 | self.0.bait.expect("REASON").into_into_dart().into_dart(),
| +++++++++++++++++
error[E0599]: the method `into_into_dart` exists for enum `Option<Box<Item>>`, but its trait bounds were not satisfied
--> src/frb_generated.rs:3540:33
|
3540 | self.0.requiredItem.into_into_dart().into_dart(),
| ^^^^^^^^^^^^^^
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:574:1
|
574 | pub enum Option<T> {
| ------------------ doesn't satisfy `Option<Box<Item>>: IntoIntoDart<Option<_>>`
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:238:1
|
238 | / pub struct Box<
239 | | T: ?Sized,
240 | | #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
241 | | >(Unique<T>, A);
| |_- doesn't satisfy `Box<Item>: IntoIntoDart<_>`
|
= note: the following trait bounds were not satisfied:
`Box<Item>: IntoIntoDart<_>`
which is required by `Option<Box<Item>>: IntoIntoDart<Option<_>>`
note: the method `into_into_dart` exists on the type `Box<Item>`
--> /home/furtidev/Programming/alt_flutter_rust_bridge/frb_rust/src/misc/into_into_dart.rs:16:5
|
16 | fn into_into_dart(self) -> D;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: consider using `Option::expect` to unwrap the `Box<Item>` value, panicking if the value is an `Option::None`
|
3540 | self.0.requiredItem.expect("REASON").into_into_dart().into_dart(),
| +++++++++++++++++
error[E0599]: the method `into_into_dart` exists for enum `Option<Box<Item>>`, but its trait bounds were not satisfied
--> src/frb_generated.rs:3548:32
|
3548 | self.0.displayItem.into_into_dart().into_dart(),
| ^^^^^^^^^^^^^^
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:574:1
|
574 | pub enum Option<T> {
| ------------------ doesn't satisfy `Option<Box<Item>>: IntoIntoDart<Option<_>>`
|
::: /home/furtidev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:238:1
|
238 | / pub struct Box<
239 | | T: ?Sized,
240 | | #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
241 | | >(Unique<T>, A);
| |_- doesn't satisfy `Box<Item>: IntoIntoDart<_>`
|
= note: the following trait bounds were not satisfied:
`Box<Item>: IntoIntoDart<_>`
which is required by `Option<Box<Item>>: IntoIntoDart<Option<_>>`
note: the method `into_into_dart` exists on the type `Box<Item>`
--> /home/furtidev/Programming/alt_flutter_rust_bridge/frb_rust/src/misc/into_into_dart.rs:16:5
|
16 | fn into_into_dart(self) -> D;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: consider using `Option::expect` to unwrap the `Box<Item>` value, panicking if the value is an `Option::None`
|
3548 | self.0.displayItem.expect("REASON").into_into_dart().into_dart(),
| +++++++++++++++++
For more information about this error, try `rustc --explain E0599`.
error: could not compile `frb_example_dart_minimal` (lib) due to 8 previous errors
Unhandled exception:
ProcessException: Bad exit code (101). If you want to see extra information, set FRB_DART_RUN_COMMAND_STDERR=1
Command: cargo build --release
#0 runCommand (package:flutter_rust_bridge/src/cli/run_command.dart:67:5)
<asynchronous suspension>
#1 simpleBuild (package:flutter_rust_bridge_utils/src/simple_build_utils.dart:31:5)
<asynchronous suspension>
from crate::rusty_walnut to rusty_walnut
Oh you are right! crate::rusty_walnut
means your firstly-party crate's subfolder!
What's wrong? Something about trait bounds not being satisfied.
Looks like a bug. Feel free to isolate the problem (i.e. make a reproducible sample), then I can fix it.
Looks like a bug. Feel free to isolate the problem (i.e. make a reproducible sample), then I can fix it.
Sure, here's the code, there's not much here expect my own library (rust/src/rusty_walnut
) and some code to access from Dart (rust/src/api/minimal.rs
), so I suppose it's already isolated enough. I use a relative path in rust/Cargo.toml
to access rusty_walnut
.
dart_minimal.zip
Though, one thing to note, you need to replace it with flutter_rust_bridge/frb_examples/dart_minimal
on a locally cloned repo - it relies on a lot of relative paths for dependencies (I basically built on top of that example).
Thanks, could you please make it on github for easier access? (For example, since you mention modifying dart_minimal, the simplest way is to fork frb and modify and link it here)
Thanks, could you please make it on github for easier access? (For example, since you mention modifying dart_minimal, the simplest way is to fork frb and modify and link it here)
Yes, of course: https://github.com/furtidev/flutter_rust_bridge. You can ignore some of the files (Deadmans_*
, Pothos_*
- those are just Stardew Valley savefiles.)
I glanced at it, but it does not seem to be a minimal reproducible sample. Could you please make it minimal? Usually, it can be done by removing unrelated parts, and ultimately we will get a very short example of only a dozen line, and can even be copy-pasted here.
@fzyzcjy Hello! I'm currently working on the same project as @furtidev as of now, so I had a look at the issue and reproduced the same bug in a separate repository while minifying the code: https://github.com/hitblast/flutter_rust_bridge/
The bug tends to point towards structs which cause recursion (in other words: one value inside the struct must contain the same type as the struct itself, but wrapped within Option<Box<NameOfStruct>>
. Reduced the code by a fair bunch, hope you'll have a look. Thanks!
The build output I'm getting:
chimera:dart_minimal hitblast$ cd rust
chimera:rust hitblast$ cargo build --release
Compiling frb_example_dart_minimal v0.1.0 (/Users/hitblast/Developer/flutter_rust_bridge/frb_example/dart_minimal/rust)
error[E0599]: the method `into_into_dart` exists for enum `Option<Box<FirstEntry>>`, but its trait bounds were not satisfied
--> src/frb_generated.rs:276:25
|
276 | self.0.Item.into_into_dart().into_dart(),
| ^^^^^^^^^^^^^^
|
::: /Users/hitblast/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:571:1
|
571 | pub enum Option<T> {
| ------------------ doesn't satisfy `Option<Box<FirstEntry>>: IntoIntoDart<Option<_>>`
|
::: /Users/hitblast/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/boxed.rs:235:1
|
235 | / pub struct Box<
236 | | T: ?Sized,
237 | | #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
238 | | >(Unique<T>, A);
| |_- doesn't satisfy `Box<FirstEntry>: IntoIntoDart<_>`
|
= note: the following trait bounds were not satisfied:
`Box<FirstEntry>: IntoIntoDart<_>`
which is required by `Option<Box<FirstEntry>>: IntoIntoDart<Option<_>>`
note: the method `into_into_dart` exists on the type `Box<FirstEntry>`
--> /Users/hitblast/Developer/flutter_rust_bridge/frb_rust/src/misc/into_into_dart.rs:16:5
|
16 | fn into_into_dart(self) -> D;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: consider using `Option::expect` to unwrap the `Box<FirstEntry>` value, panicking if the value is an `Option::None`
|
276 | self.0.Item.expect("REASON").into_into_dart().into_dart(),
| +++++++++++++++++
For more information about this error, try `rustc --explain E0599`.
error: could not compile `frb_example_dart_minimal` (lib) due to 1 previous error
The structs which are being serialized:
use flutter_rust_bridge::frb;
use serde::{Deserialize, Serialize};
// the root-level struct
#[frb]
#[derive(Debug, Serialize, Deserialize, PartialEq)]
#[allow(non_snake_case)]
pub struct XmlReadout {
pub FirstEntry: FirstEntry,
}
// the FirstEntry struct
#[frb]
#[derive(Debug, Serialize, Deserialize, PartialEq)]
#[allow(non_snake_case)]
pub struct FirstEntry {
pub Name: String,
pub Value: String,
pub Item: Option<Box<FirstEntry>>,
}
Great! Could you please further simplify a bit to isolate the cause? e.g. if it is related to option box, then this shorter code should have error:
pub struct FirstEntry {
pub item: Option<Box<FirstEntry>>,
}
@fzyzcjy Alright! I've pushed the latest code with the changes you requested. Note that the example_xml
file only contains the keys as of now, since due to the minification, only FirstEntry
is active without any actual value inside it. Though it should not matter for solving the bug I suppose.
Great! Briefly looked at the code (not debug yet). A quick workaround: what if we have a function pub dummy_function() -> FirstEntry
in api/minimal.rs
?
@fzyzcjy Well, I'm not quite sure about the approach but the output should be the same since the types are identical.
Ok then that workaround does not work.
since the types are identical.
IMHO no. The current code is pub fn load_xml_file(file_path: &str) -> Option<XmlReadout>
, thus FirstEntry
is only indirectly used. I was wondering whether a direct usage will workaorund it.
I will look at it later in the next batch. Alternatively, feel free to debug and PR!
Ok then that workaround does not work.
since the types are identical.
IMHO no. The current code is
pub fn load_xml_file(file_path: &str) -> Option<XmlReadout>
, thusFirstEntry
is only indirectly used. I was wondering whether a direct usage will workaorund it.I will look at it later in the next batch. Alternatively, feel free to debug and PR!
I've just now tried wrapping FirstEntry
in a direct use case, still the same error, so the workaround indeed doesn't work. By the way, thanks for looking into this! Hopefully it'll be resolved.
To be fixed by https://github.com/fzyzcjy/flutter_rust_bridge/pull/2398
@fzyzcjy yay! it works now! thanks for all your help - when is this fix gonna be available on a release?
You are welcome!
Since 2.6.0 was released just two days ago, it may be good to wait some time before releasing next one. Could you please use the master version temporarily? (It should be of the same quality as released version, since we have the same CI checks).
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new issue.
Describe the bug
I'm using 3 thirdparty packages in my Rust code,
serde
,quick-xml
andserde-value
. Whileserde
successfully generates (with warnings about merging, that it may be an issue if the merged code was actually needed) the other two straight up fail.Steps to reproduce
rust/Cargo.toml
:flutter_rust_bridge.yaml
:flutter_rust_bridge_codegen generate
Logs
logs.txt
Expected behavior
I expected the CLI to generate code for all the third-party dependencies successfully.
Generated binding code
No response
OS
Linux EndeavourOS
Version of
flutter_rust_bridge_codegen
2.5.1
Flutter info
Version of
clang++
18.1.8
Additional context
No response