Json_serializable.dart: Null safety version on pub dev

Created on 5 Mar 2021  ·  9Comments  ·  Source: google/json_serializable.dart

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

blocked

Most helpful comment

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

All 9 comments

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

@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.

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

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

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

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

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.

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

@namchuai it's already null safety

v4.1.0 is out!

Was this page helpful?
0 / 5 - 0 ratings