-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
[dart-dio][timemachine] Bugfix: saving offset_date_serializer instead of local_date_serialize #20907
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
base: master
Are you sure you want to change the base?
Conversation
Seems nobody is using time_machine anymore if this didn't come up until now. Whats your use-case for the library? |
We were just testing both options for dateLibrary (core and timemachine) to decide what to use on our case and came up with this bug. |
The package has not received updates in 2 years, so I would personally recommend against it. Thats why I added the core implementation in the first place. |
thanks for the PR would it be possible to add a config to cover this change by creating a config file similar to one of the followings? ./bin/configs/dart-dio-oneof-polymorphism-and-inheritance.yaml and then generate and commit the new files, finally put the new folder in the github workflow: https://github.com/OpenAPITools/openapi-generator/blob/master/.github/workflows/samples-dart.yaml |
We could add one but probably not all combinations. |
agreed. |
I've just added a new config as suggested |
@epou I think you need to generate samples again. That should update the |
bf79eac
to
3c03bfe
Compare
I've just rebased from master to include the latest changes that were recently merged (#20908) |
i tried to break the build: b223263 but the dart tests still passed: https://github.com/OpenAPITools/openapi-generator/actions/runs/14076327860/job/39419864460?pr=20972 not sure if we need to update "samples.dart" somehow:
|
what about later migrating the dart github workflow to a list of "samples" folders instead, e.g. https://github.com/OpenAPITools/openapi-generator/blob/master/.github/workflows/samples-kotlin-client.yaml#L20 ? (not required as part of this PR) |
Using dart-dio with
timemachine
leads to 'uri_does_not_exist' inlib/src/serializers.dart
It looks like the bug was introduced here (#9180), where
local_date_serializer.mustache
is renamed tooffset_date_serializer.mustache
(see)import 'package:{{pubName}}/src/offset_date_serializer.dart';
in serializers.mustache (see)offset_date_serializer.mustache
but still creating thelocal_date_serializers.dart
(see)PR checklist
Commit all changed files.
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*
.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
master
(upcoming7.x.0
minor release - breaking changes with fallbacks),8.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)