-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce changes necessary for Dart 3.0.0/Flutter 3.10.0 #15516
Introduce changes necessary for Dart 3.0.0/Flutter 3.10.0 #15516
Conversation
Can this wait until #14346 and #15485 land ? because after these 2 PRs we will have an infrastructure to test this code similar to this https://github.com/OpenAPITools/openapi-generator/tree/master/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests |
For sure, @ahmednfwela. Got an eta? |
it's currently blocked by #10189 waiting for a fix soon |
@noordawod thanks for opening the PR! After upgrading to Flutter 3.10.1 I discovered that I'm blocked by the dart2 generator, because my generated Dart API client pub depends on This was also reported in this issue: #15510 When running
|
You could override the dependency and enforce a specific version, I do it: dependency_overrides:
intl: "^0.18.0" More info: https://rdr.to/Cwq7C2il78u UPDATE: I modified this pr and patched the pubspec Mustache template file, hopefully we'll be able to merge this pr once the prerequisites are merged. |
What do you think about doing it the other way around? Merging this first and then the other 2 pr's? Seems to me that the latter two might take a while... |
yes we can do that but,can you create a separate issue to track the needed tests? |
I need help with that :| I never wrote tests… Would you like to help? |
it's ok after the new PR I will write the tests |
Perfect, thank you! Then, this pr is updated with |
Bump :) |
…ls#15516) * Expose `deserialize` function. * Rename `json` argument. * Generate Petstore code. * Upgrade minimum version of `intl` dependency.
Recent versions of the Dart SDK have tightened the rules for which objects can be sent across isolates (see https://api.dart.dev/stable/3.0.0/dart-isolate/SendPort/send.html and dart-lang/sdk@67683c39).
Bottom line: It's not possible to send an arbitrary class instance across isolates anymore, this may cause a crash when
deserializeAsync
is called from an isolate different from the isolate used to call the API operation: flutter/flutter#126520This pr introduces the following changes:
decodeAsync
to decode a JSON, suitable to be called from an isolate.ApiClient._deserialize
(asApiClient.fromJson
) so that users can call it after decoding the JSON on an isolate.PR checklist
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*
.For Windows users, please run the script in Git BASH.
master
(6.3.0) (minor release - breaking changes with fallbacks),7.0.x
(breaking changes without fallbacks)@jaumard (2018/09) @josh-burton (2019/12) @amondnet (2019/12) @sbu-WBT (2020/12) @kuhnroyal (2020/12) @agilob (2020/12) @ahmednfwela (2021/08)