Based on https://dart-review.googlesource.com/c/sdk/+/52340, but adds
the necessary plumbing through the test system to pass through
negations to strong and preview-dart-2. Also adds support for those
negations to the analyzer.
Change-Id: I9793ff28bb593d25bbb0a2ed8736b5b53e0a62d8
Reviewed-on: https://dart-review.googlesource.com/52461
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Move logic out into a ContextCache since we're not interested in caching
at least two if not three things (the options, the options path, and
optionally the builder).
Move some convenience methods around accessing contexts into a mixin.
Regarding some semantic decisions for finding analysis roots:
* treat the analysis_options.yaml file as the analysis root if it exists
* if it doesn't exist, assume the directory passed in is the root
* if custom options are provided, assume they "overwrite" the others
_in-place_.
Tests to confirm this logic via excludes configurations with & without
the yaml file specified, passing in the root in some cases and
subdirectories in others.
Also change to use PathFinder for handling wildcards in excludes.
Bug: 31343,31344
Change-Id: I400fe30a1ec379f9040f812fc0bd9481d42a13cf
Reviewed-on: https://dart-review.googlesource.com/41570
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
In CLI no batch, support analyzing multiple files in multiple contexts
Support `dartanalyzer pkg/a/foo pkg/b/foo` and use a different context
for each.
Requires knowing the source being analyzed while creating a context,
which gets a bit hacky with build mode, but seems to work as is.
Suggestions on a cleaner integration there are welcome!
Change-Id: I2648fdb80c0a36a05580ef7267350ffb847c43e9
Reviewed-on: https://dart-review.googlesource.com/42582
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
We have decided to move to a different API for Fasta/Analyzer
integration, one that doesn't involve compiling to Kernel or observing
type inference. The listener API will become broken, so let's just
remove it before that happens.
We lose the ability to trace type inference so let's restore that
ability next. The analyzer's resolution storer is not used, but that
code has been left. The resolution applier will no longer work
without the resolution storer, so those tests have been disabled.
Change-Id: If9ac5aba2d5de7788d8a65f7fa8410599e636d21
Reviewed-on: https://dart-review.googlesource.com/42400
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
This reverts commit 126bfebb4e.
Reason for revert: Fails on windows due to forward slash paths, and seems to have one or two other secondary issues.
Original change's description:
> In CLI no batch, support analyzing multiple files in multiple contexts
>
> Support `dartanalyzer pkg/a/foo pkg/b/foo` and use a different context
> for each.
>
> Requires knowing the source being analyzed while creating a context,
> which gets a bit hacky with build mode, but seems to work as is.
> Suggestions on a cleaner integration there are welcome!
>
> Change-Id: Ia4e63fe01342f2299c96ca8d34ca983a9280a911
> Reviewed-on: https://dart-review.googlesource.com/41900
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
TBR=scheglov@google.com,brianwilkerson@google.com,mfairhurst@google.com
Change-Id: I0e90d8d4e2256b7087daeeb934ed14da57fd20df
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/42540
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Support `dartanalyzer pkg/a/foo pkg/b/foo` and use a different context
for each.
Requires knowing the source being analyzed while creating a context,
which gets a bit hacky with build mode, but seems to work as is.
Suggestions on a cleaner integration there are welcome!
Change-Id: Ia4e63fe01342f2299c96ca8d34ca983a9280a911
Reviewed-on: https://dart-review.googlesource.com/41900
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Fuchsia is including some dart proto code that expects protobuf 0.7.0.
Change-Id: Ie42a3751a2d3a7e51e759b9913d0901ecefafc70
Reviewed-on: https://dart-review.googlesource.com/40480
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
(was reverted in https://dart-review.googlesource.com/c/sdk/+/40980
due to an analyzer bot breakage)
Original commit message:
Implement proper checking for callability of Function class.
There was some old (incorrect) logic for doing this, behind the flag
enableStrictCallChecks. This flag has been removed, since the new
behavior is now standard in Dart 2.0.
Fixes#31509
Change-Id: Ice5cf38bbc648badf7f2563ff930b69f9a799635
Reviewed-on: https://dart-review.googlesource.com/41120
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This reverts commit 6837dafcc3.
Reason for revert: Broke analyzer bots.
Original change's description:
> Implement proper checking for callability of Function class.
>
> There was some old (incorrect) logic for doing this, behind the flag
> enableStrictCallChecks. This flag has been removed, since the new
> behavior is now standard in Dart 2.0.
>
> Fixes#31509
>
> Change-Id: I4a6da34a4b85ea8409f6e0d14c377a586546056a
> Reviewed-on: https://dart-review.googlesource.com/40509
> Commit-Queue: Paul Berry <paulberry@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
TBR=paulberry@google.com,scheglov@google.com,brianwilkerson@google.com,mfairhurst@google.com
Change-Id: Ib631ad16bc5e937ff914127d1c5330f3fcaff2c9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/40980
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
There was some old (incorrect) logic for doing this, behind the flag
enableStrictCallChecks. This flag has been removed, since the new
behavior is now standard in Dart 2.0.
Fixes#31509
Change-Id: I4a6da34a4b85ea8409f6e0d14c377a586546056a
Reviewed-on: https://dart-review.googlesource.com/40509
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@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>
This CL deprecates the front-end API and moves it into src/api_prototype.
For now all usages have been updated to point to the new location,
but they should be updated to use custom-client invocations instead (e.g.
one specific way for DDC, another for dart2js etc.)
Bug:
Change-Id: I9b4f41f6ebf55d42510fd35240d942d1dc7292d6
Reviewed-on: https://dart-review.googlesource.com/24822
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
At this point KernelDriver is used only by Analyzer, so I don't include
anyone from the FrontEnd team. We will merge to get the same performance
benefits of the latest IKG approach, but later.
Only just enought integration is done - we can store and apply
types in the local variable declaration.
Everything is in disarray, I will follow up with improvements.
R=brianwilkerson@google.com, paulberry@google.com
Bug:
Change-Id: Ie3434e26233b84fb019c50a7cc834a08d0dadbed
Reviewed-on: https://dart-review.googlesource.com/22202
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
We need this to be able to access classes that are required by Fasta,
but come from VM patches.
R=brianwilkerson@google.com, paulberry@google.com
Bug:
Change-Id: I4d29e1dca42e016446516a2dab0fae138cb74548
Reviewed-on: https://dart-review.googlesource.com/16863
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Also fix Fuchsia tools to account for new project location (//third_party/dart).
Change-Id: If89a934729c4fa44229eaca83219dbdf8bb700a8
Bug:
Reviewed-on: https://dart-review.googlesource.com/14800
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Zach Anderson <zra@google.com>