Skip to content
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

[dart] [dart-dio] Support Dart3 #18001

Merged
merged 3 commits into from
Apr 28, 2024
Merged

[dart] [dart-dio] Support Dart3 #18001

merged 3 commits into from
Apr 28, 2024

Conversation

tadaskay
Copy link
Contributor

@tadaskay tadaskay commented Feb 29, 2024

Support Dart3 SDK.

cc tech:
@jaumard (2018/09) @josh-burton (2019/12) @amondnet (2019/12) @sbu-WBT (2020/12) @kuhnroyal (2020/12) @agilob (2020/12) @ahmednfwela (2021/08)

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh ./bin/configs/*.yaml
    ./bin/utils/export_docs_generators.sh
    
    (For Windows users, please run the script in Git BASH)
    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.
  • File the PR against the correct branch: master (upcoming 7.1.0 minor release - breaking changes with fallbacks), 8.0.x (breaking changes without fallbacks)
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

@tadaskay tadaskay changed the title Support Dart3 [dart] Support Dart3 Feb 29, 2024
@marc-wilson
Copy link

Might also update the readme. right now it states it only generates a 2x client, but I assume this PR makes it generate 3 (at least I am hoping so).

https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/dart.md

@tadaskay
Copy link
Contributor Author

tadaskay commented Mar 1, 2024

Might also update the readme. right now it states it only generates a 2x client, but I assume this PR makes it generate 3 (at least I am hoping so).

https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/dart.md

Removed version numbers as it is now compatible with both 2.x and 3.x.

Also bumped SDK to >= 2.12 instead of >=2.6, because with the latter it prints the following error on 3.x SDK:

dart pub get
Resolving dependencies...
The lower bound of "sdk: '>=2.6.0 <4.0.0'" must be 2.12.0'
or higher to enable null safety.

The current Dart SDK (3.3.0) only supports null safety.

For details, see https://dart.dev/null-safety

@kuhnroyal
Copy link
Contributor

Thanks! Did you attempt to update they keywords file based one Dart 3.3.0 and there are just no changes?

@tadaskay
Copy link
Contributor Author

tadaskay commented Mar 4, 2024

Thanks! Did you attempt to update they keywords file based one Dart 3.3.0 and there are just no changes?

Thanks, I was not aware of that file. Updated the keywords in the last commit.

@tadaskay tadaskay changed the title [dart] Support Dart3 [dart] [dart-dio] Support Dart3 Mar 4, 2024
Copy link
Contributor

@kuhnroyal kuhnroyal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thanks!
@wing328 Can you please approve the workflows

@marc-wilson
Copy link

Would be great to get this completed!

@wing328
Copy link
Member

wing328 commented Apr 18, 2024

shall we also update the workflow to test with dart3: https://github.com/OpenAPITools/openapi-generator/actions/runs/8552245804/workflow?pr=18001#L35 so that both dart2 and 3 are tested in the CI workflows?

@wing328 wing328 removed this from the 7.6.0 milestone Apr 22, 2024
@marc-wilson
Copy link

Any way we can get this finished? I would really like to use this!

@wing328
Copy link
Member

wing328 commented Apr 25, 2024

@marc-wilson have you tested this change locally? does it work for you using Dart3?

we don't have dart 3 test in the workflow at the moment

@marc-wilson
Copy link

I have not. I'm not familiar with what it takes to clone the repo and go through the testing process.

If there is a concern around stability and you are requesting help for testing, I can take a look. But, mainly just a champion for dart 3 support as i'm currently writing out api clients manually for dart.

@wing328
Copy link
Member

wing328 commented Apr 28, 2024

@marc-wilson are you familiar with github workflow?

can you help file a PR on top of this one to update https://github.com/OpenAPITools/openapi-generator/actions/runs/8552245804/workflow?pr=18001#L35 to test both dart 2 and 3?

@wing328 wing328 merged commit 06ed7c8 into OpenAPITools:master Apr 28, 2024
11 of 12 checks passed
@wing328
Copy link
Member

wing328 commented Apr 28, 2024

I've just merged it. Please give it a try with dart2 and 3 with the latest snapshot build when you've time.

snapshot build can be found in the project's readme.

@simPod
Copy link
Contributor

simPod commented Apr 28, 2024

Docs should get regenerated

@wing328
Copy link
Member

wing328 commented Apr 29, 2024

@tadaskay tadaskay deleted the dart-3 branch May 3, 2024 06:52
@AndreBerzun
Copy link

I don't know if this the right place for my question but this PR was the latest work on the dart generator I found.

It seems that the dart generator is using a fairly outdated version of the http library (http: '>=0.13.0 <0.14.0') which in my case clashed with the latest version used by other dependencies (1.2.1).
Did I miss a configuration parameter or is this something that needs to be fixed with the generator?

@wing328
Copy link
Member

wing328 commented May 13, 2024

or is this something that needs to be fixed with the generator?

do you mind filing a PR to update http library to newer version?

@wing328 wing328 added this to the 7.6.0 milestone May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants