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

Support for null-safety #194

Closed
alfredo-handcash opened this issue Dec 17, 2020 · 26 comments
Closed

Support for null-safety #194

alfredo-handcash opened this issue Dec 17, 2020 · 26 comments
Labels
enhancement New feature or request

Comments

@alfredo-handcash
Copy link
Contributor

Hi! First of all, thank you for your work and time creating this package, is amazing and help me a lot of times!!

There are any plan to migrate this package to null-safety? I think this is a package that another packages depends on, so there are a roadmap to be migrated?

Thank you!

@stewemetal stewemetal changed the title Support for null-safety? Support for null-safety Dec 31, 2020
@stewemetal
Copy link
Collaborator

Thank you for the kind words, most of the creds go to @lejard-h! 😊

We are working on improving the documentation and internal stability of Chopper right now. What's in the near future is that documentation updates will come with 3.0.7.

Null-safety should come right after. 😉

@stewemetal stewemetal added the enhancement New feature or request label Jan 3, 2021
@alfredo-handcash
Copy link
Contributor Author

Thank you!

@FlagshipApps
Copy link

It would be so great to have null-safety :)
But I suppose since 3.0.7 is not out yet it definietly won't come within the next weeks, right?

@JEuler
Copy link
Collaborator

JEuler commented Jan 31, 2021

Yeah, I think so. Will see. The transfer to null safety is important, so, maybe we will be able to do it "soon" :)

@JEuler
Copy link
Collaborator

JEuler commented Feb 17, 2021

@Vovanella95
Copy link
Contributor

Hi guys. Thank you for support this beautiful package!

Do you have any progress on null-safety support?

@JEuler
Copy link
Collaborator

JEuler commented Feb 18, 2021

@Vovanella95 Not yet :( Feel free to contribute the translation to null-safety. I will try to work on it soon, but have a workload this week.

@JEuler
Copy link
Collaborator

JEuler commented Feb 24, 2021

I have checked the possibility of quick translation to null-safety, this is not possible. We have dependencies, that needed to be upgraded to support sound null safety. I am starting the work to do this, but this would not be quick.

@fryette
Copy link
Contributor

fryette commented Feb 26, 2021

@JEuler probably we can track dependencies here?
Which dependencies we have to wait?

@JEuler
Copy link
Collaborator

JEuler commented Feb 28, 2021

So, let's start something, this is info for the chopper_built_value package (missing dependencies), but we are using build_runner everywhere:

build_runner  ✗1.11.5              ✗1.11.5              ✗1.11.5              ✗1.11.5
build_test    ✗1.3.7               ✗1.3.7               ✗1.3.7               ✗1.3.7
coverage      ✗0.15.2              ✗0.15.2              ✗0.15.2              ✗0.15.2

I think, dart-lang/build#2920 contains info about this.

@fryette
Copy link
Contributor

fryette commented Mar 1, 2021

@JEuler So actually we waiting for buld_runner and build_test, right?
Probably coverage is not too important for us and can be temporarily removed, right?

Have another quite popular package swagger_dart_code_generator which depends on the chopper. That is why I really waiting this feature.

@JEuler
Copy link
Collaborator

JEuler commented Mar 1, 2021

Waiting is a very strong word, but yeah, we have those dependencies and we need them to be updated to support sound null safety. But, we also need work to do, if you can help us with conversion, would be cool :)

@fryette
Copy link
Contributor

fryette commented Mar 1, 2021

@JEuler good news
https://pub.dev/packages/coverage/versions/1.0.0
Already has null safety

@stewemetal
Copy link
Collaborator

stewemetal commented Mar 3, 2021

This is the current state of our dependencies' null safety support (at the time of Flutter Engage 😄 ):

chopper:

Package Name Current Upgradable Resolvable Latest
build_runner ✗1.10.4 ✗1.11.1 - ✗1.11.5
build_test ✗1.3.0 ✗1.3.6 - ✗1.3.7
test_coverage ✗0.4.4 (git) ✗0.4.4 (git) - ✗0.4.4 (git)

chopper_generator:

Package Name Current Upgradable Resolvable Latest
build ✗1.5.0 ✗1.6.2 - ✗1.6.3
code_builder ✗3.5.0 ✗3.6.0 - ✗3.6.0
dart_style ✗1.3.9 ✗1.3.10 - ✗1.3.14
source_gen ✗0.9.8 ✗0.9.10+2 - ✗0.9.10+3

chopper_built_value has the same problems that are already listed above.

@stewemetal stewemetal added this to the 4.0.0-nullsafety.0 release milestone Mar 3, 2021
@stewemetal
Copy link
Collaborator

stewemetal commented Mar 3, 2021

source_gen apparently can already generate null safe code (but it itself is not null safe):

dart-lang/source_gen#493

With that, json_serializable is also null safe.

@stewemetal
Copy link
Collaborator

@lejard-h, and possibly @JEuler : why do we need Angular in our example project? I'm just curious, we could drop it as web support is now stable, and rewrite the example project.

@grahamsmith
Copy link
Contributor

@stewemetal great work! Unsure if this is relatable or not but logger 1.0.0 (null safe) is out and conflicts with current stable Chopper.

Because x depends on chopper ^3.0.3 which depends on logging ^0.11.4, logging ^0.11.4 is required.
So, because x depends on logging ^1.0.0, version solving failed.

Was going to raise an issue and fix via PR but unsure if it falls into this category. My hope would be it doesn't but some guidance would be great. If it were fixed asap could it be released as 3.0.4 soonish?

@JEuler
Copy link
Collaborator

JEuler commented Mar 4, 2021

About Angular, I think we can drop it :)

@JEuler
Copy link
Collaborator

JEuler commented Mar 4, 2021

@grahamsmith Feel free to raise this fix as separate PR. :) But @stewemetal opened PR for null safety, #204 - of course, any help is a very pleasant thing 👍

@stewemetal
Copy link
Collaborator

@grahamsmith Not trying to be nitpicky, but the latest version is 3.0.6. 😉 But even that version doesn't solve the problem at hand.

@lejard-h @JEuler Maybe we should just roll out every update planned for 3.0.7 along with null safety as 4.0.0?

@JEuler
Copy link
Collaborator

JEuler commented Mar 4, 2021

Yeah, maybe even as 3.1.0 :) I like the concept of frequent releases. It will help people. And our own null safety is okay to be published as 4.0, cause it is a big thing :)

@stewemetal
Copy link
Collaborator

OK with me. 😉 I was discussing (by email) with @lejard-h the possibility of moving away from TravisCI and using GitHub Actions instead.

I'll open a new issue for that and let's discuss releases there. 😉

@danielgomezrico
Copy link
Contributor

One little comment around this, I was trying to update but built_collection now have a version 5.0.0 which supports null safety and this depends on an older version, it will be cool to update to that 5.0.0 in the process of this.

Because chopper_generator >=3.0.5 depends on built_collection ^4.3.2 and client depends on built_collection 5.0.0, chopper_generator >=3.0.5 is forbidden.

So, because client depends on chopper_generator 3.0.6, version solving failed.
pub get failed (1; So, because client depends on chopper_generator 3.0.6, version solving failed.)

@AhmedNourJamalElDin
Copy link

AhmedNourJamalElDin commented Mar 8, 2021

+1 for @danielgomezrico

Also logging package.

@eliascoder
Copy link

Is there a date when the update for logging dependency will come out? I can't update another dependency in my project because the last version of this library still depends on logging 0.11.4

@JEuler
Copy link
Collaborator

JEuler commented Apr 19, 2021

https://pub.dev/packages/chopper/versions/4.0.0-nullsafety.1

@JEuler JEuler closed this as completed Apr 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

9 participants