958ae6ab1e
The new updateAnalysisOptions4 parameter is a callback function, similar to updateAnalysisOptions3, but with one removed parameter itself, the `DartSdk sdk` parameter. The one place where this parameter was used in the callback passed by the caller, was in DAS's ContextManager, and it was just used in order to compute a FeatureSet from (a) the computed DartSdk and (b) the command-line `--enable-experiment` options. We can instead provide a `enabledExperiments` parameter on AnalysisContextCollectionImpl, leading to a simpler API and still a simple implementation in ContextBuilder. The reason for the incremental migration is that dartdoc, and possibly some internal clients, use updateAnalysisOptions3. Change-Id: Ie990ab8f7b850aed1ce3ef39ab71c01835c080da Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/447400 Commit-Queue: Samuel Rawlins <srawlins@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>