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

Unable to pass --enable-experiement=non-nullable to dart2native #42849

Closed
gspencergoog opened this issue Jul 27, 2020 · 4 comments
Closed

Unable to pass --enable-experiement=non-nullable to dart2native #42849

gspencergoog opened this issue Jul 27, 2020 · 4 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Comments

@gspencergoog
Copy link
Contributor

I am trying to build an AOT executable on Linux from an app that has been updated to be compatible with NNBD using dart --enable-experiment=non-nullable, which works fine, but when I try and build a standalone executable from that code, I am unable to.

When I build the executable using dart2native, I get the following error:

Error: This requires the 'non-nullable' language feature to be enabled.
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.9 or higher, and running 'pub get'

My pubspec constraints are set to:

environment:
 sdk: '>=2.9.0 <2.11.0'

And I re-ran pub get before trying it (for both the dependent package I built, as well as for the executable). I also tried blowing away the .dart_tool directories.

I downloaded the dev SDK from the website:
Dart SDK version: 2.10.0-0.0.dev (dev) (Wed Jul 22 19:58:38 2020 +0200) on "linux_x64"

It seems like dart2native needs an --enable-experiment flag for this to work.

@lrhn lrhn added the area-infrastructure Use area-infrastructure for SDK infrastructure issues, like continuous integration bot changes. label Jul 28, 2020
@athomas athomas added area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. and removed area-infrastructure Use area-infrastructure for SDK infrastructure issues, like continuous integration bot changes. labels Jul 28, 2020
@mkustermann
Copy link
Member

@cskau-g Could you look at this?

@mkustermann mkustermann assigned ghost Jul 28, 2020
@hexaclue
Copy link

hexaclue commented Aug 9, 2020

Any update on this issue?

@ghost
Copy link

ghost commented Aug 10, 2020

I've had a look at it and it looks like a quick fix. A change is in review now.

dart-bot pushed a commit that referenced this issue Aug 11, 2020
Bug: #42849
Change-Id: Ibde382971a6b8b296f9a0a8792f0fec0e1741286
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157963
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
@ghost
Copy link

ghost commented Aug 11, 2020

The fix has been merged.

Anyone interested can test it at HEAD now, but there will naturally be a little bit of time as the change makes its way into the next dev and stable releases.

There's nothing more to do from our side so I'll close this issue.

Thanks

@ghost ghost closed this as completed Aug 11, 2020
This issue was closed.
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.
Projects
None yet
Development

No branches or pull requests

5 participants