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

Null safety version on pub dev #821

Closed
nank1ro opened this issue Mar 5, 2021 · 9 comments · Fixed by #841
Closed

Null safety version on pub dev #821

nank1ro opened this issue Mar 5, 2021 · 9 comments · Fixed by #841

Comments

@nank1ro
Copy link

nank1ro commented Mar 5, 2021

Hello,

I can't find a null safety version of json_serializable on pub dev.
Can you publish one please?
I've seen this release json_serializable-v4.0.0-nullsafety.0 here on github.
I've tried to use it with:

json_serializable:
    git:
      url: git://github.com/google/json_serializable.dart.git
      ref: 'json_serializable-v4.0.0-nullsafety.0'
      path: 'json_serializable/'

but when I run dart pub outdated --mode=null-safety
I get back:
json_serializable ✗4.0.0-nullsafety.0 (git) ✗4.0.0-nullsafety.0 (git) ✗4.0.0-nullsafety.0 (git) ✗4.0.0-nullsafety.0 (git)
so this release doesn't support null-safety yet

@nank1ro
Copy link
Author

nank1ro commented Mar 5, 2021

I've checked the pubspec of the release mentioned above, and I found:

environment:
  # Keeping this <2.12.0 because the code is not null safe – yet!
  sdk: '>=2.11.99 <3.0.0'

So, it's not null safe yet

@pparikhatliaison
Copy link

@nank1ro you are correct. It is not null safe but the code generated is, i have pending PR waiting to merge which which makes it completely operational.

@z85510
Copy link

z85510 commented Mar 5, 2021

How much it takes to release new version with null-safety ?
I'm stuck on some tasks which related to library 🤦🏽‍♂️

@kevmoo
Copy link
Collaborator

kevmoo commented Mar 5, 2021

@z85510 – this package generates null-safe code – as of v4

The code itself is not null safe, but that shouldn't affect your package.

@kevmoo
Copy link
Collaborator

kevmoo commented Mar 5, 2021

Ignore the --mode=null-safety bits for this package. This code is run outside of your code.

@kevmoo
Copy link
Collaborator

kevmoo commented Mar 7, 2021

Waiting on down-stream dependencies to update first. This shouldn't block anyone from using this package w/ null-safety, though – as long as you're just using it as a normal builder.

@namchuai
Copy link

I think we also need json_annotation to be null-safety as well.

@fryette
Copy link

fryette commented Mar 18, 2021

@namchuai it's already null safety

@kevmoo
Copy link
Collaborator

kevmoo commented Mar 19, 2021

v4.1.0 is out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants