Reason for revert: it was a breaking change to the analyzer public API.
There were two breakages:
- A @required `languageVersion` parameter was added to
AstFactory.compilationUnit, which is part of the officially
supported analyzer public API.
- A @required `languageVersion` parameter was added to the Parser
constructor, which is not part of the officially supported analyzer
public API, but is part of its de facto public API due to the fact
that it is used by dart_style.
This reverts commit ce26dfda7d.
Change-Id: I507103ea6f6ffabf915d6f56e9f24454725c3930
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136851
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Other than the following changes, all of the changes were made by dartfix:
- the analysis options files
- one line to enable the fix through dartfix (missed in an earlier CL)
- three places where a bug in the fix produced invalid code (issue and fix TBD)
Change-Id: If8660700792561805f4d1c96ccecd81abcebfeb8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131209
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
And deprecate old parser configuration setters.
Change-Id: Ib1507b8d2b20be7c883061e2a92ec9205d6a378f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100664
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
And change clients of the scanner (within the SDK) to use it.
Long term, it would be better to store the FeatureSet object directly
in the Scanner and remove the existing flags `enableGtGt` and
`enableNonNullable`. However there are analyzer clients that
currently use these flags. So for now, we simply plumb in the
FeatureSet as a new way of setting AstBuilder flags. Once we've
updated clients to use FeatureSet, we'll publish a breaking version of
the analyzer that removes the old flag API.
Change-Id: I9e662f4ed45668d9acd4f56e42d7d8dae6180d48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99975
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This is a reland of https://dart-review.googlesource.com/#/c/sdk/+/28920/
with the following changes:
- It creates a new library dart:cli
- waitFor(Future) goes in dart:cli instead of dart:io
- Removes a flaky test, and adds a missing precompiler entrypoint
- Adds waitFor(Future)
- Improves doc comments
fixes#31102
Change-Id: I04d2c46fd0afac049dd4fd1353905dc20da18f90
Reviewed-on: https://dart-review.googlesource.com/29449
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Natalie Weizenbaum <nweiz@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>