Skip to content

Remove flag and turn on --enable-assert-initializers by default #30977

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
munificent opened this issue Oct 3, 2017 · 7 comments
Closed

Remove flag and turn on --enable-assert-initializers by default #30977

munificent opened this issue Oct 3, 2017 · 7 comments
Assignees
Labels
legacy-area-analyzer Use area-devexp instead.
Milestone

Comments

@munificent
Copy link
Member

Asserts in initializers will be a fully-supported feature in 2.0 (#30968), so the analyzer should enable it by default and remove the flag.

@munificent munificent added the legacy-area-analyzer Use area-devexp instead. label Oct 3, 2017
@munificent munificent added this to the 2.0 milestone Oct 3, 2017
@bwilkerson
Copy link
Member

@munificent Does this work need to be coordinated with anything else, or is it reasonable to do it now?

@munificent
Copy link
Member Author

If you remove the flag entirely such that it's an error to pass it, then you'll want to check with the Flutter folks to make sure any scripts they have that drive the analyzer stop passing that flag.

If you simply default assert initializers on and allow but ignore the flag, then you should be able to flip it on whenever you like.

@bwilkerson
Copy link
Member

CL is out for review.

@bwilkerson
Copy link
Member

https://dart-review.googlesource.com/c/sdk/+/10740

There was no command-line flag, only an option in the analysis options file. Analyzer will now produce a hint that the option is not valid and will ignore it.

@munificent
Copy link
Member Author

There was no command-line flag, only an option in the analysis options file.

Are you sure? In analyzer_cli, I see:

        enableAssertInitializer = args['enable-assert-initializers'],

@bwilkerson
Copy link
Member

No, I somehow managed to miss that when I looked. I did manage to remove the code that makes use of the argument, so it's now a no-op to include it, but I should at least mark the option as being deprecated.

@bwilkerson
Copy link
Member

I left the flag so that it won't break existing clients, but cleaned up the references to it (https://dart-review.googlesource.com/c/sdk/+/11260).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legacy-area-analyzer Use area-devexp instead.
Projects
None yet
Development

No branches or pull requests

2 participants