[dart-dio][timemachine] Bugfix: saving offset_date_serializer instead of local_date_serialize#20907
[dart-dio][timemachine] Bugfix: saving offset_date_serializer instead of local_date_serialize#20907epou wants to merge 2 commits intoOpenAPITools:masterfrom
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) |
|
sorry for the delay merged via #21974 with a test for the new folder in github workflow closing this one |
Using dart-dio with
timemachineleads to 'uri_does_not_exist' inlib/src/serializers.dartIt looks like the bug was introduced here (#9180), where
local_date_serializer.mustacheis renamed tooffset_date_serializer.mustache(see)import 'package:{{pubName}}/src/offset_date_serializer.dart';in serializers.mustache (see)offset_date_serializer.mustachebut 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.0minor 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)