- Fix fuzzy arrow errors.
- Default the Dart repo URI so it doesn't always need to be explicitly
set.
- Run dartfmt on everything.
- Move some members out of the garbage bin "TestUtils" class:
- Move the stuff around the Dart repo directory to a new Repository
class.
- Move absolute() into Path where it belongs.
- Move workingDirectory in Path since it is a Path.
- Delete the random number stuff since it was apparently unused.
Change-Id: I3dab3a4f1713b7a749e64b6776149d05a0ce1b69
Reviewed-on: https://dart-review.googlesource.com/14502
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
This ports a fairly large part of DDC's Analyzer-based code generator,
however most nodes are not supported yet.
The goal is to preserve all functionality of code that was ported,
except for deprecated features (e.g. mirrors, fuzzy arrows, libraryRoot).
Change-Id: I3b10d5773c7c10a740fa336720243b03c6b82529
Reviewed-on: https://dart-review.googlesource.com/10705
Reviewed-by: Vijay Menon <vsm@google.com>
This is an attempt to get DDC's bot (https://travis-ci.org/dart-lang/sdk) green and restore test coverage, without affecting the Analyzer --strong buildbot. DDC and Analyzer can generally use the same status entries, as they are running nearly identical strong mode analysis. This fixes DDC's test builder to understand status codes in the same way analyzer does, as that was causing mismatch in statuses.
This does not fix the problem that we're skipping tests instead of recording the status. So there is a bit of test coverage lost, but it restores most of DDC's coverage. We can tackle the skips either in a follow up, or as we migrate tests from *_strong to *_2.
This is a partial revert of "Revert status file changes from 58a6227198d2aa927df19f1b4862f8d0017d6da4" in commit 7be946cf3d.
Review-Url: https://codereview.chromium.org/2990213002 .
This only handles compile time errors & compiler crashes. It does not yet support status files at runtime, that is still hard coded in language_tests.js. Some preliminary support for runtime status is there, but it's not enabled yet.
This also updates *_strong.status to reflect current test behavior. It looks like those files have not been triaged in a while.
R=rnystrom@google.com
Review-Url: https://codereview.chromium.org/2987093002 .
commit 4ed5f6f9d34510c3f0d6a3e5db9f8bac3290e464
Merge: 075833b fb613c0
Author: Bob Nystrom <rnystrom@google.com>
Date: Fri Jul 21 16:08:11 2017 -0700
Merge branch 'master' into ddc-tests-2
commit 075833bbdb33d2642f4df1ca501805f0a97a96e7
Author: Bob Nystrom <rnystrom@google.com>
Date: Thu Jul 20 18:08:25 2017 -0700
Include migrated "_2" test directories in DDC's codegen_test.
This required a couple of other changes too:
- I renamed "not_yet_strong_tests.dart" to "compile_error_tests.dart"
because it includes some tests that have been made strong mode clean,
but still generate static errors due to bugs in analyzer or ddc.
- Reworded the test failure messages to take the above into account.
- I cleaned up the failure reporting code a bit. There was some
redundancy and unreachable code.
- Triaged the "_2" tests to mark the ones that are failing at compile
time or runtime appropriately. Good news! The big integers tests
compile now! Of course, they don't actually *run* correctly on the
web...
fixes#27625, Object constraints were not tracked in inference
fixes#27933, pin return type from downwards inference
We now prefer to pick the bound (lower or upper) that had some information on, and it also improves inference error messages somewhat (still a ways to go).
The way this works is we now have a type representing an unknown type: ?. We use ? when performing downward inference steps, instead of `dynamic`. This allows more accurate tracking of type constraints.
For example: given:
var x = await Future.wait([a, b]);
Future.wait<T>'s argument type is Iterable<Future<T>>. Since we didn't know T, we previously pushed down Iterable<Future<dynamic>>. The dynamic caused loss of information. Now we push down Iterable<Future<?>>, allowing us to infer the right type there.
R=leafp@google.com, vsm@google.com
Review-Url: https://codereview.chromium.org/2456803004 .
This implements FutureOr<T> in strong mode, otherwise it's ignored (treated as `dynamic`.
Also fixes strong mode's inference subtype function incorrectly treating `void` as a malformed type. This had the consequence of allowing `void` to be inferred as a type argument.
R=leafp@google.com, paulberry@google.com
Review-Url: https://codereview.chromium.org/2647833002 .
This ensures the runtime type is of the tear-off expression's static
type, even when accessed through a superclass.
I also moved the two tests into a subdirectory so they are easier to
find. (It is inscrutable to me why we would have a single directory
with 1,868 test files in it.) That involved enabling recursive
directory listing in codegen_test, which exposed a couple of things.
Fix#27484.
R=leafp@google.com
Review-Url: https://codereview.chromium.org/2641543003 .
This updates DDC options processing to support:
* --options /path/to/analysis/options/file.yaml
* --enable-strict-call-checks
* --supermixin
* --no-implicit-casts
* --no-implicit-dynamic
As well as general refactoring and cleanup of DDC options processing
R=vsm@google.com
Review-Url: https://codereview.chromium.org/2598593003 .
DDC's codegen test copies those files to a local "gen" directory so
that it can do stuff like splitting out the multitests before it
compiles them to JS.
I left all of that alone, so the rest of DDC's test infrastructure is
unchanged. The very first step that builds the "gen" directory just
copies from sdk/tests/..._strong/... instead and the rest is good to go.
I did not move not_yet_strong_tests.dart somewhere more accessible yet
because I'm not sure if kernel needs it or where it should go.
I did not create any status files because DDC doesn't need them and
there are no test suites for the new directories for the other
platforms.
This should catch tests that suddenly start failing (or passing).
This is an admittedly contrived approach to track compilation failures in
the same runtime logic: the statically failing tests are now compiled
to a trivial output that throws a particular exception. Ideally, we
wouldn't run these, but it's beneficial to keep status in the same
place.
On my laptop, this only adds ~8s to presubmit (which takes ~2:30 min).
Ideas on alternative approaches welcome. :-)
R=jmesserly@google.com, leafp@google.com
Review URL: https://codereview.chromium.org/2079373002 .
The generated summary file matches the generated DDC sdk - i.e., it
does not include dart:io. I modified the codegen_tests to the summary
and had to prune the parts of unittest that relied on dart:io.
Paul / Konstantin: can one of you please look at the summary part?
Bob: can you please look at the unittest changes?
R=rnystrom@google.com, scheglov@google.com
Review URL: https://codereview.chromium.org/1982853002 .
I started trying to get the convert tests all cleaned up and passing
but realized I was going down a rathole. So, for now, all of the slow
or failing ones are just skipped.
BUG=
R=sra@google.com
Review URL: https://codereview.chromium.org/1965563003 .