chaokunyang commented on code in PR #2112:
URL: https://github.com/apache/fury/pull/2112#discussion_r2008773962
##########
dart/packages/fury-core/lib/src/fury_context.dart:
##########
@@ -0,0 +1,109 @@
+// CustomSer? getCustomSerByTag(String tag) {
+// return _tag2CustomSer[tag];
+// }
+//
+// String? getTagByDartType(Type type) {
+// CustomSer? ser = _customType2Ser[type];
+// return ser?.tag;
+// }
+//
+// Ser? getSerByObjType(ObjType objType) {
+// return _objId2Ser[objType.id];
+// }
+
+// // 没有引用不确定性的type,例如int, double, string, enum等,都必须解析出来,否则会报错
+// (List<Ser?> fromSers, List<Ser?> toSers) getFieldsSers(ClassSpec clsSpec){
+// var fields = clsSpec.fields;
+// List<Ser?> fromSers = List.filled(fields.length, null);
+// List<Ser?> toSers = List.filled(fields.length, null);
+// Ser? fromSer;
+// Ser? toSer;
+// for (int i=0;i<fields.length;++i) {
+// var field = fields[i];
+// if (field.includeFromFury) {
+// fromSer = _getSerByFieldType(field.type1.actualFromType,
field.type1.type);
+// fromSers[i] = fromSer;
+// }
+// if (field.includeFromFury && field.fromToAlign()){
+// toSers[i] = fromSer;
+// }else{
+// toSer = _getSerByFieldType(field.type1.actualToType,
field.type1.type);
+// toSers[i] = toSer;
+// }
+// }
+// return (fromSers, toSers);
+// }
+//
+// Ser? _getSerByFieldType(ObjType objType, Type type) {
+// if (objType.isStructType()) return null;
+// Ser? ser;
+// if (objType == ObjType.NAMED_ENUM) {
+// ser = _customType2Ser[type];
+// if (ser == null) {
+// throw UnregisteredTypeExcep(type);
+// }
+// return ser;
+// }
+// ser = _objId2Ser[objType.id];
+// if (ser == null) {
+// throw UnsupportedTypeExcep(objType);
+// }
+// return ser;
+// }
+import 'dart:collection';
+import 'package:fury_core/src/config/fury_config.dart';
+import 'package:fury_core/src/meta/class_info.dart';
+import 'package:fury_core/src/ser/ser_pool.dart';
+import 'const/dart_type.dart';
+import 'const/obj_type.dart';
+import 'excep/register/duplicate_spec_registration_excep.dart';
Review Comment:
maybe:
```suggestion
import 'exception/registration/duplicate_spec_registration_exception.dart';
```
Or could we merge related exceptions into one file?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]