GoogleCloudPlatform / functions-framework-dart

FaaS (Function as a service) framework for writing portable Dart functions
https://pub.dev/packages/functions_framework
Apache License 2.0
535 stars 54 forks source link

Move to element2 as element is deprecated #338

Closed mit-mit closed 2 years ago

mit-mit commented 2 years ago

Fix failing CI:

Run dart analyze --fatal-infos .
Analyzing ....

   info - lib/src/generic_function_type.dart:103:62 - 'element' is deprecated and shouldn't be used. Use element2 instead. Try replacing the use of the deprecated member with the replacement. - deprecated_member_use
   info - lib/src/generic_function_type.dart:107:47 - 'element' is deprecated and shouldn't be used. Use element2 instead. Try replacing the use of the deprecated member with the replacement. - deprecated_member_use
   info - lib/src/valid_json_utils.dart:103:14 - 'element' is deprecated and shouldn't be used. Use element2 instead. Try replacing the use of the deprecated member with the replacement. - deprecated_member_use
   info - lib/src/valid_json_utils.dart:103:50 - 'element' is deprecated and shouldn't be used. Use element2 instead. Try replacing the use of the deprecated member with the replacement. - deprecated_member_use

4 issues found.

https://github.com/GoogleCloudPlatform/functions-framework-dart/runs/7822753655?check_suite_focus=true

mit-mit commented 2 years ago

Looks like https://github.com/GoogleCloudPlatform/functions-framework-dart/pull/337 might fix this