-
-
Notifications
You must be signed in to change notification settings - Fork 85
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 ory_kratos_client incompatible with many null safe packages (since 0.7.3-alpha-8) #204
Comments
Try https://pub.dev/packages/ory_client instead! |
Oh that one resolves just fine, thanks! Are both packages needed? Should the |
We will eventually deprecate them. ory_client is always ahead because it is in sync with Ory Cloud. The other SDKs need an open source release to be updated |
Hmm, so I was able to resolve dependencies, but my app does not compile. You can see the same errors in the "Pass Static Analysis" section of https://pub.dev/packages/ory_client/score, pasted below for convenience:
|
That would probably be: OpenAPITools/openapi-generator#4887 Looks like this is resolved but not yet released. Once it's released, we can upgrade the dart generator to resolve this bug. Sorry but it's out of our hands :( |
Wrong issue, looksl ike it's: OpenAPITools/openapi-generator#11462 |
Should I open a separate issue for the ory_client build issues? Also there's another issue besides the Map listFromJson method: the bill coalescing operator being used on non-nullable type. I'll have a look at the generator some time and see if there's an issue for that and maybe if there's a quick fix. |
We can use this one to track this :) Any fixes you're able to make towards openapi generator would highly be appreciated! Unfortunately I don't know Dart/Flutter which is why I can't really help to fix it :) |
After a bit of digging, it looks like the issue for both packages is resolved for the latest version of open-api-generator 6.0.1 when using the dart-dio generator. Looks like we're currently using 5.2.1. Is it possible to upgrade? |
I have the same problem and generated a version for myself with dart-dio and open-api-generator 6.0.1. I have now the problem that the serialization is not working. When doing:
I get the error:
As a kratos server I am using the one from the quickstart (https://www.ory.sh/docs/kratos/quickstart). Do I need to use a different version? |
Hmm, I've just tried using the kratos sdk generated with the dart-dio exporter I couldn't get it to compile. I think I'm just going to have to continue with a manually implemented client for now. |
When trying with the newest version of OpenAPIGenerator and the |
Looks like spec now generates with type safety, but there are generation errors for which I new ticket here #230 |
Ok, closing this issue then |
Preflight checklist
Describe the bug
When importing the dart ory_kratos_client https://pub.dev/packages/ory_kratos_client, it fails to resolve dependencies when using many other packages with null-safety features. For example the latest
http
package https://pub.dev/packages/http or thegoogle_fonts
package https://pub.dev/packages/google_fonts. This basically makes the SDK unusable for modern flutter projects where null-safety is the default.When trying to resolve the dependencies, we see the culprit is a dependency of the ory_kratos_client package itself which depends on a version of the
dio
library which in turn depends on a non-null-safe version of thehttp_parser
package.Reproducing the bug
flutter create helloworld
http
package:flutter pub add http
ory_kratos_client
package topubspec.yaml
:ory_kratos_client: ^0.10.1
flutter pub get
Resultant pubspec.yaml:
Relevant log output
Relevant configuration
No response
Version
0.10.1
On which operating system are you observing this issue?
macOS
In which environment are you deploying?
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: