Skip to content

NNBD support in Dart API #40176

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

Closed
liamappelbe opened this issue Jan 15, 2020 · 5 comments
Closed

NNBD support in Dart API #40176

liamappelbe opened this issue Jan 15, 2020 · 5 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. NNBD Issues related to NNBD Release vm-nnbd-unfork-sdk Label for all issues that need to be done before the nnbd sdk can be unforked
Milestone

Comments

@liamappelbe
Copy link
Contributor

The Dart API needs to be updated to support nullability. For example, it should be possible to choose what kind of nullability you want when calling Dart_GetType.

@liamappelbe liamappelbe added area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. NNBD Issues related to NNBD Release labels Jan 15, 2020
@a-siva a-siva added the vm-nnbd-unfork-sdk Label for all issues that need to be done before the nnbd sdk can be unforked label Jan 16, 2020
@franklinyow franklinyow added this to the D28 Release milestone Jan 21, 2020
@a-siva a-siva assigned bkonyi and unassigned a-siva Feb 1, 2020
@a-siva
Copy link
Contributor

a-siva commented Feb 1, 2020

Here is some notes from the discussion that @rmacnak-google and @a-siva had

Dart_NewListOf - Need to figure out if an equivalent of the fill call is needed here.
Dart_NewListOfType

Should look at removing the following calls
Dart_Allocate
Dart_AllocateWithNativeFields
Dart_InvokeConstructor

  • calls to these are in //depot/google3/third_party/dart_lang/tonic/dart_wrappable.cc and @chinmaygarde has removed them.

Dart_GetType -needs an additional argument.

Would we want to know if a library is opted in or opted out ?

Dart_CompileToKernel/Dart_CompiledSourcesToKernel does it need a way to pass parameters to CFE (--enable-experiment).

Does the C/Dart messaging API needs a change?

dart-bot pushed a commit that referenced this issue Feb 7, 2020
…embedding API for dynamic, void and Never.

Fix crash when create type errors involving Never.

Bug: #12478
Bug: #40176
Change-Id: I8cff7042850717d02da36ad935cf0a49ace80c3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134886
Commit-Queue: Ryan Macnak <[email protected]>
Reviewed-by: Ben Konyi <[email protected]>
@bkonyi
Copy link
Contributor

bkonyi commented Feb 12, 2020

Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor were removed in 3d1b8b2.

dart-bot pushed a commit that referenced this issue Feb 12, 2020
In order to be backwards-compatible existing Dart API should create
lists using legacy types (instead of lists of non-nullable types).

Issue: #40176
Change-Id: Ie5460b41b2c5e9ecfb124bce1ab43fd466930ea0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135531
Reviewed-by: Ryan Macnak <[email protected]>
Commit-Queue: Alexander Markov <[email protected]>
@bkonyi
Copy link
Contributor

bkonyi commented Feb 14, 2020

Added support for nullable/non-nullable/legacy types in 06f86bf

@franklinyow
Copy link
Contributor

Are we ready to close this?
Thx

@bkonyi
Copy link
Contributor

bkonyi commented Mar 2, 2020

Yes, we just need to remove the Dart_Allocate APIs described above. However, that's not directly related to NNBD so I'll close this issue.

@bkonyi bkonyi closed this as completed Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. NNBD Issues related to NNBD Release vm-nnbd-unfork-sdk Label for all issues that need to be done before the nnbd sdk can be unforked
Projects
None yet
Development

No branches or pull requests

4 participants