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 support #3745

Closed
rodion-m opened this issue Nov 19, 2023 · 17 comments · Fixed by #5966
Closed

Dart support #3745

rodion-m opened this issue Nov 19, 2023 · 17 comments · Fixed by #5966
Labels
enhancement New feature or request help wanted Issue caused by core project dependency modules or library new language Tracks issues requesting new languages generation support WIP
Milestone

Comments

@rodion-m
Copy link

rodion-m commented Nov 19, 2023

Do you plan to add Dart client generation support to make it compiable with Flutter?

And thanks for a great tool!

Tasks

Preview Give feedback
No tasks being tracked yet.
@github-project-automation github-project-automation bot moved this to Todo in Kiota Nov 19, 2023
@baywet baywet added enhancement New feature or request help wanted Issue caused by core project dependency modules or library new language Tracks issues requesting new languages generation support labels Nov 20, 2023
@baywet baywet added this to the Backlog milestone Nov 20, 2023
@baywet
Copy link
Member

baywet commented Nov 20, 2023

Hi @rodion-m
Thanks for using kiota and for reaching out.
We (Microsoft) don't have plans to add Dart at this point. But we'd be happy to support the community in doing so.
For the details, you can look at #2199
Let us know if you have further questions.

@ricardoboss
Copy link
Contributor

@baywet Are there docs how to add support for new languages by now? Dart would be a great addition and I'd like to play around with kiota.

@baywet
Copy link
Member

baywet commented Jan 29, 2024

@ricardoboss We don't have public documentation for this today.
here is an answer where I outlined the high level approach to implementing a new language support.

@ricardoboss
Copy link
Contributor

Hey @baywet, can I get your input on my attempt to implement the interfaces you mentioned?

https://github.com/ricardoboss/dart_kiota_abstractions

Would this be enough to start working on a generator?

@baywet
Copy link
Member

baywet commented Feb 8, 2024

You've made great progress!
How do you want me to funnel the feedback? issues in that repo?
Also, I don't know anything about dart, so there might be subtilities about the language I might miss (pointers, nullability, reference vs value copy, etc...)
Lastly, I'm not sure how you get a dart package published, but can you make sure this doesn't get published? or at least if it does, that it doesn't take any official "Microsoft owned" placeholder?

@ricardoboss
Copy link
Contributor

ricardoboss commented Feb 8, 2024

Thanks! Feedback in the form of issues in that repo is fine. I don't know any Dart specialists personally, but maybe someone viewing this issue wants to chime in and leave some feedback :)

Package publishing is done on pub.dev. Dart packages don't have namespaces, but there are verified publishers. If you want to know more, I suggest you look here: https://dart.dev/tools/pub/publishing

The package in its current form cannot be published. This is because of the publish_to: 'none' line in the pubspec.yaml.

Edit: of course I am willing to provide help and information where needed!

Edit 2: If I publish the package now (as a prerelease for example) it is still possible to transfer the package over to a Microsoft-owned publisher later on (I'm thinking of https://pub.dev/publishers/microsoft.com).

Edit 3: As it turns out, I would have to be a member of the publisher to transfer the package. So its best to use a different name or just don't publish it at all.

@baywet
Copy link
Member

baywet commented Feb 9, 2024

You've done some great work there! I created a couple of issues.
Once we start seeing the generation pull requests coming in, we might re-home the repository under the microsoft organization if you don't mind?
Also another thing to consider, in some languages (most in fact) it's more convenient to use a monorepo for all the kiota libraries, like we've done for TypeScript/Java (and probably should have done for dotnet as well in retrospective). The main consideration here are about the publishing workflow: how easy is it to have all packages use the same single version? and publish them all at once using the same workflow without it having a bunch of complicated steps/conditions/etc...

@ricardoboss
Copy link
Contributor

Once we start seeing the generation pull requests coming in, we might re-home the repository under the microsoft organization if you don't mind?

Fine by me.

The main consideration here are about the publishing workflow: how easy is it to have all packages use the same single version?

It is doable. Take a look at how its done in this repo: https://github.com/std-uritemplate/std-uritemplate
The release workflow specifically.

@baywet
Copy link
Member

baywet commented Feb 9, 2024

I meant grouping the dart dependencies (abstractions, json, http,...) on the same repo. Not grouping the same type of dependency across languages (all abstractions for example) on the same repo.

@ricardoboss
Copy link
Contributor

Oh sorry. Yeah that is also possible quite easily. The Flutter team uses a monorepo approach for their own packages: https://github.com/flutter/packages/tree/main/packages

@JohnGalt1717
Copy link

Is there any movement on this? Flutter is VERY common especially in enterprise for creating cross platform apps. It would be VERY beneficial to have Dart support for this reason.

@ricardoboss
Copy link
Contributor

ricardoboss commented Sep 25, 2024

@JohnGalt1717 there is movement! A few colleagues from https://topicus.nl/ and me are actively working on implementations and code generation. I can't give an estimate when this can go into preview but it's being worked on.

If you want to check the current state of development, please go to: https://github.com/kiota-community/dart_kiota and main...kiota-community:kiota-dart:features/dart

@JohnGalt1717
Copy link

Awesome!!!! Can't wait! (this and enums with key/value will make this project absolutely rock)

@JohnGalt1717
Copy link

It looks like this was merged? Is it now available?

@baywet
Copy link
Member

baywet commented Dec 3, 2024

Here is an update:

  • kiota dart libraries: we're finalizing work there, and planning transfer of the repository to the microsoft org + publishing on the package feed
  • generation code: we've been through multiple rounds of review and the code should be ready to be submitted as a pull request to this repository once the libraries are merged.
  • support policy: we've already updated our support policy and the kiota info command to reflect the fact that some languages have been implemented by the community.

There are no timelines we can share at this time. (after all, the work is being volunteered) But we'll keep this issue posted. And of course, if you want to help with the work, we're happy to receive contributions!

@ricardoboss
Copy link
Contributor

To add to what @baywet said, this issue contains more details about what is currently going on/still missing before this can go into preview: microsoft/kiota-dart#52

@baywet baywet modified the milestones: Backlog, Kiota v1.22 Jan 7, 2025
@github-project-automation github-project-automation bot moved this from New📃 to Done ✔️ in Kiota Jan 9, 2025
@ricardoboss
Copy link
Contributor

Any Dart developers out there interested in contributing, you can open PRs for the Dart packages here: https://github.com/microsoft/kiota-dart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Issue caused by core project dependency modules or library new language Tracks issues requesting new languages generation support WIP
Projects
Status: Done ✔️
Development

Successfully merging a pull request may close this issue.

4 participants