Commit Graph

6601 Commits

Author SHA1 Message Date
Jens Johansen 8270944c5d [CFE] Extend weekly test - fuzz tests and advanced invalidation leak test
We currently run our leak tests weekly.
This extends it so we also run leak tests with advanced invalidation,
as well as our strong and weak tests with fuzzing enabled.

Change-Id: I2c941f58594791d1981c6b6612db2205b68f5e19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192682
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-03-24 14:44:51 +00:00
William Hesse e900b9c090 [infra] Fix default path to git directory when running GN
This should fix the tools/get_dot_git_folder.py script when
running the Debian package build from a source tarball.

Change-Id: I703fa34bbb6c73763c385e7d05b130091a131ade
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191401
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2021-03-16 16:58:49 +00:00
Jens Johansen 1b3f6d8f9e [infra] Make worktrees work (again?) (2nd try)
History:

* Back in (pre June) 2018 worktrees in git just worked.
* https://dart-review.googlesource.com/c/sdk/+/48091 made it not work.
* https://github.com/dart-lang/sdk/issues/33619 was filed.
* https://dart-review.googlesource.com/c/sdk/+/127485 was created to
  work around the problem.

I don't know when it happened, but I can't make the above workaround
work (at least not anymore) --- adding a `default_git_folder` to my
`args.gn` has no effect.

This CL builds on it and automatically sets the correct path based on
a call to `git rev-parse --resolve-git-dir .git` which gives the
correct dir for both worktrees and non-worktrees.

This is the 2nd try which should also work on Windows.
The original CL is in patchset #1.

This reverts commit 7e2cc73da8.

Change-Id: I298aef8ac9095ce3ef4f827218675584b68a02c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191362
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-03-16 12:32:55 +00:00
Jens Johansen 7e2cc73da8 Revert "[infra] Make worktrees work (again?)"
This reverts commit a531b78369.

Reason for revert: Doesn't work on Windows.

Original change's description:
> [infra] Make worktrees work (again?)
>
> History:
>
> * Back in (pre June) 2018 worktrees in git just worked.
> * https://dart-review.googlesource.com/c/sdk/+/48091 made it not work.
> * https://github.com/dart-lang/sdk/issues/33619 was filed.
> * https://dart-review.googlesource.com/c/sdk/+/127485 was created to
>   work around the problem.
>
> I don't know when it happened, but I can't make the above workaround
> work (at least not anymore) --- adding a `default_git_folder` to my
> `args.gn` has no effect.
>
> This CL builds on it and automatically sets the correct path based on
> a call to `git rev-parse --resolve-git-dir .git` which gives the
> correct dir for both worktrees and non-worktrees.
>
> Change-Id: I4dcf0445a44348621752fb88d4dab4c99c6ddd1d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190522
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: William Hesse <whesse@google.com>
> Commit-Queue: Jens Johansen <jensj@google.com>

TBR=whesse@google.com,rmacnak@google.com,jensj@google.com,sigmund@google.com

Change-Id: I7681a7b48abdd6e5901f1e445015adc9bf51ef77
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191361
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-03-16 09:18:50 +00:00
Jens Johansen a531b78369 [infra] Make worktrees work (again?)
History:

* Back in (pre June) 2018 worktrees in git just worked.
* https://dart-review.googlesource.com/c/sdk/+/48091 made it not work.
* https://github.com/dart-lang/sdk/issues/33619 was filed.
* https://dart-review.googlesource.com/c/sdk/+/127485 was created to
  work around the problem.

I don't know when it happened, but I can't make the above workaround
work (at least not anymore) --- adding a `default_git_folder` to my
`args.gn` has no effect.

This CL builds on it and automatically sets the correct path based on
a call to `git rev-parse --resolve-git-dir .git` which gives the
correct dir for both worktrees and non-worktrees.

Change-Id: I4dcf0445a44348621752fb88d4dab4c99c6ddd1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190522
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-03-16 08:54:15 +00:00
Alexander Thomas e7ad5b9b42 [infra] Fix type errors in Firestore client
The http package now requires Uri objects.

Change-Id: I3952e8ac9dce6549a1936c48cd4f060224827fc3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190527
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-03-11 18:37:51 +00:00
Alexander Thomas ee3dca4b97 [tools] Delete unused python scripts
See also https://github.com/dart-lang/sdk/issues/28793.

Change-Id: I6c21080c3c8d4edb3bcfea9015ef37d6ce1ee6af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189205
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-03-05 14:55:57 +00:00
Liam Appelbe b6188939ec [vm] Align compressed pointer allocations on Fuchsia.
TEST=Local testing using Fuchsia emulator
Change-Id: I6946f07b8abab534986d7c23284e6e250c13b822
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188080
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-03-03 21:51:24 +00:00
Alexander Markov 16a521c532 [infra] Add builders for testing AOT with dwarf stack traces
AOT in PRODUCT mode with --dwarf_stack_traces performs more aggressive
optimizations of snapshot contents (compared to other modes).
This mode is now used in certain internal apps, so it should be
tested more thoroughly.

This change adds new builders which would enable testing of
--dwarf_stack_traces mode.

Change-Id: I866ef5b0dae2f0d5cbf0cfbc1c161259b7b4a523
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188140
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-03-02 17:58:23 +00:00
Clement Skau 4d99c94d11 [tools] gn.py: Ensures args parsed.
Since parse_args() returns None in case parsing failed we should
check for this and bail.
Previously we'd still try to run RunGnOnConfiguredConfigurations
on None and crash with an unrelated issue.
This would overshadow the otherwise nice error message.

Change-Id: If9e267c8eedaaacb388fd8f8475ec0e861060ed5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187900
Auto-Submit: Clement Skau <cskau@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-02-26 12:46:57 +00:00
Sigmund Cherem 06a4b109bc [web] Delete check_nnbd_sdk test
Change-Id: Ia55f76a57adbe2e133ad9e049e1201bec5094b53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186660
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2021-02-24 00:04:29 +00:00
Sigurd Meldgaard e7fdd7b693 Let experimental features specify an example for tooling to have generic
tests.

Bug: https://github.com/dart-lang/sdk/issues/44937
Change-Id: I309e6e4299b09705f653d59c7842a05fdf7cdaa5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184790
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-02-23 13:57:29 +00:00
Kallen Tu 5d99c6b449 Added 'const-functions' experiment flag.
Change-Id: I907c17e8a2039574505273b1f12f706be6121b76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185680
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2021-02-22 16:32:19 +00:00
Dmitry Stefantsov 32fe29617e [cfe] Remove line enabling 'extension-types' flag
TEST=The flag is updated according to the documented recommendations.

Change-Id: I0997b29eafc40844b6ab6dc089ad91723071d4e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185880
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-02-19 17:43:17 +00:00
Nate Bosch 0485883d66 Add trailing newline to package_config file
Avoids spurious diffs in git when generating with the tool compared to
editing the file in an editor which may correct the missing newline.

Change-Id: If73928fef0682c32d728bae666ccaea4c2749890
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185497
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2021-02-19 00:12:49 +00:00
Dmitry Stefantsov 3a79baed23 [cfe] Add 'extension-types' experimental flag
TEST=The flag is added as per recommended instructions.

Change-Id: I7135fa772e884d083f7388741bc2b3c3a4e6f0e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185360
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-02-17 14:08:15 +00:00
Lasse R.H. Nielsen d352bc28b8 Remove (most) uses of the "non-nullable" experiment flag.
Since the flag is now enabled by default, there should be no mention of it.
There are still some uses in front_end/testcases that are not just removable
(it also uses `no-non-nullable`). There migth be more uses that are not
as easily found as grepping for `--enable-experiment

Removes two VM tests where fixing them meant they were just duplicating
the corresponding non *_2/ tests.
Fixes #44941

TEST= Large number of tests chaged.=(no-)?non-nullable`.

Change-Id: Ief755981ccde9a5482fcdf408c2929c74433a710
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183688
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2021-02-12 17:16:54 +00:00
Sigmund Cherem d0dc45bbe0 [ddc] run web suite under ddc
Change-Id: I9390b837a17dd9cb6c67fe855dbcf90ad96518a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183921
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2021-02-10 21:47:48 +00:00
Ryan Macnak f40113cda5 [infra] Further teach test harness about new compressed architectures.
Change-Id: Ibfcad1997c79b1839b1842a1b7f7b14b328c3599
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183720
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-02-09 17:55:27 +00:00
Leaf Petersen fe3cd179cf Add presubmit check for package_config.json .
Change-Id: Ida784b6e73601e0309e10b2808f46e70926eabc0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183045
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2021-02-06 01:02:38 +00:00
Sigmund Cherem 912005267d [web] rename suite dart2js -> web.
Change-Id: I46be49b2effec3e38a3dc44cd45cfe736f77fa78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182680
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-02-04 23:11:32 +00:00
Ryan Macnak be7bea72dc [infra] Add new compressed architectures to the test matrix.
This merely makes the architectures known to test.py; it does not create new bots.

TEST=ci
Change-Id: Icd50eb3b09c7eeadec796d5154226bba5cacf227
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182665
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-02-04 17:44:37 +00:00
Alexander Thomas c88171c8af [sdk] Bump version to 2.13
TEST=Presubmit tests and local builds
Change-Id: I1b15d60eced0cf3f422548eda75706609f6640cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182624
Commit-Queue: Alexander Thomas <athom@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-02-04 12:10:17 +00:00
Jens Johansen f3f831f103 [CFE] Enable asserts on unit test suites
This also updates the status files with the new crashes caused by
assert failures.

Change-Id: I0ec3fe8a10ad77c712760ab262297913f84e89b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182503
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-02-04 08:13:47 +00:00
Sigmund Cherem 11b92b57e7 [dart2js] add coverage for important configurations.
Defines a configuration for -O0 and for --no-legacy-javascript and adds
a run for a small test suite with these configurations on existing bots
as a smoke test.

Change-Id: Ib63602e0066d48e154a7527b229831c82b37bf95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182440
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-02-03 21:45:59 +00:00
Devon Carew b7e9413d14 Several doc fixes for dart:io.
Change-Id: I0b7577faf49bc2e80e82ef77b2677478503fe6c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182180
Reviewed-by: Janice Collins <jcollins@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-02-03 18:43:22 +00:00
Paul Berry 0427342228 Add flag for generic metadata
See implementation plan PR:
https://github.com/dart-lang/language/pull/1417

Change-Id: Ib75026d7008d313f3dad94d9ccf47e341f945dc9
Bug: https://github.com/dart-lang/language/issues/1297
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182301
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-02-03 13:54:48 +00:00
Liam Appelbe c88e48939c [vm] Offsets extractor support for compressed pointers
TEST=CI
Change-Id: Ie39f7bc3454594ee5cb3a21fc829ee173ebc1eed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182080
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2021-02-02 19:26:34 +00:00
Paul Berry a42244f73b Flow analysis: begin tracking non-promotion reasons.
This CL implements the core flow analysis infrastructure for tracking
reasons why an expression was not promoted.  It supports the following
reasons:

- Expression was a property access
- Expression has been written to since it was promoted

I expect to add support for other non-promotion reasons in the future,
for example:

- `this` cannot be promoted
- Expression has been write captured
- Expression was a reference to a static field or top level variable

These non-promotion reasons are plumbed through to the CFE and
analyzer for the purpose of making errors easier for the user to
understand.  For example, given the following code:

  class C {
    int? i;
    f() {
      if (i == null) return;
      print(i.isEven);
    }
  }

The front end now prints:

  ../../tmp/test.dart:5:13: Error: Property 'isEven' cannot be accessed on 'int?' because it is potentially null.
  Try accessing using ?. instead.
      print(i.isEven);
              ^^^^^^
  Context: 'i' refers to a property so it could not be promoted.

Much work still needs to be done to round out this feature, for example:

- Currently the analyzer only shows the new "why not promoted"
  messages when the "--verbose" flag is specified; this means the
  feature is unlikely to be noticed by users.

- Currently the analyzer doesn't show a "why not promoted" message
  when the non-promotion reason is that the expression is a property
  access.

- We need one or more web pages explaining non-promotion reasons in
  more detail so that the error messages can contain pointers to them.

- The analyzer and front end currently only show non-promotion reasons
  for expressions of the form `x.y` where `x` fails to be promoted to
  non-nullable.  There are many other scenarios that should be
  handled.

Change-Id: I0a12df74d0fc6274dfb3cb555abea81a75884231
Bug: https://github.com/dart-lang/sdk/issues/38773
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181741
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-02-02 16:15:34 +00:00
Devon Carew f93a844060 [sdk docs] validate the sdk docs per commit
Change-Id: I0521297a1da229b190eb7ec6c7615da445ed5685
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181000
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2021-02-01 19:39:49 +00:00
pq 2ecc9b76c8 initial sdk API fix data
Some simple SDK API changes codified in fix data w/ accompanying tests.

Tests are in `tests/lib/fix_data` and run on the pkg bots.

Sample run:

https://ci.chromium.org/ui/p/dart/builders/try/pkg-linux-release-try/46526/steps?succeeded=true&debug=false
https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8856735093298466576/+/steps/validate_SDK_API_data-driven_fixes/0/stdout


Change-Id: Id0959d6cde4003f114056c21b9969f2792f21a6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180940
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-02-01 18:47:59 +00:00
Liam Appelbe f7eaaf2ce1 [vm] Build configs for compressed pointers
Change-Id: Ied0f17b2c314ce7e0b5e70989684b95b8e506ffc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181442
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-01-28 23:15:15 +00:00
Riley Porter 3eb117c24e Extend timeout for dart2js ia32 trybot.
Extends timeout on dart2js-strong-hostasserts-linux-ia32-d8-try
after reaching timeout on this change:
https://dart-review.googlesource.com/c/sdk/+/180442/6

Change-Id: Ic3a9adc087c98b458b6407c9cff6c2ddb707c647
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181523
Reviewed-by: Riley Porter <rileyporter@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-01-28 18:24:35 +00:00
Jens Johansen e2b6208871 [CFE] Shard front-end try bots better
This CL shards the CFE try bot tests better.
* co19_2 runs was previously made faster, so using 10 shards on that is
  way too much.
* sdk_test runs was previously made faster, so using 5 shard on that is
  way too much.
* unit_tests was taking ~10 minutes and wasn't sharded. This CL shards
  it. Note that this sharding is semi-complicated because a few tests
  use git which is not usable on shard-runs. To overcome this a previous
  CL renamed the tests that use git and here the sharded runs only run
  the tests that doesn't require git. Then the "main bot" runs the tests
  that require git.
* unit tests suites was taking ~12 minutes and wasn't sharded. This CL
  shards it. Note that this sharding is semi-complicated because a few
  of the suites use git which is not usable on shard-runs. Also a single
  suite uses many more files that it is reasonable to include in the
  fileset for the shards. In both cases these are run on the "main bot"
  instead. The suit runnier was already "threaded", but simply launched
  all threads (say around 20 or something like that) at the same time.
  That's not ideal if having, say, 8 cores to work with (which is what
  the bots seem to have) - or 12 (which is what my computer has).
  Now only 'cores - 1' "threads" are run at any one time, and most
  "sub-suites" are sharded, so that if one finishes early that core
  can start another "sub-suite" - hopefully utilizing more of the
  resources avaiable on the computer running it.

In total - in my 'benchmarks' (i.e. try bot runs) - the
front-end-linux-release-x64-try bot previously rook around 35 minutes
to complete, and with these changes it takes around 15 minutes to
complete. The biggest entry in the timeline is now building dart which
takes almost half that time. It does so with fewer shards than before,
but each might be utilized for longer.

Change-Id: Ie034058d8f33aafd21bc49f2bc878484563ba01c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181383
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-01-28 14:16:25 +00:00
Jens Johansen 30ae8e3d14 [CFE] Rename tests that require git; split unit_test_suites; filter tests better
This CL is a warm-up to a follow-up change that will make running the
CFE trybot faster.
This CL:
* Rename tests that require git (because when working with filesets
  and shards in the test system, the "checkout" is not a git checkout
  and git commands thus doesn't work properly.
* Filters the front-end unit test setup on the front-end bot the way
  it was probably intended, i.e. run tests in pkg/kernel, pkg/front_end
  and pkg/fasta (actually, the last one doesn't exist, but still)
  instead of just in folders inside the "suite" 'pkg' that somewhere in
  the path has something called 'kernel', 'front_end' or 'fasta'.
* Split unit_test_suites.dart into a "forwarding shell" and a impl.
  In a follow-up CL the impl will be converted to nnbd to allow for
  using 'required' on named parameters, but if the entry point was
  nnbd it would run in sound nnbd mode and nothing would compile
  because all imports are not nnbd.

Overall this CL should change very little, mostly just run a few less
tests, i.e. for instance skip tests that live inside a folder called
'fasta' somewhere inside the analyzer directory path.

Change-Id: I3226c7261cff8b68cc287cff07dc1715dfd85159
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181381
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-01-28 07:46:10 +00:00
Sigmund Cherem 7c1b43d10a [dart2js] make js_runtime a proper package
Change-Id: Ib5583f79abc0ab00a96ce6473282f4322da5143c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180720
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2021-01-25 22:39:23 +00:00
eggfly 341213becd Add --export-compile-commands option to generate compile_commands.json
compile_commands.json compilation database file can be easily recognized by IDEs such as VSCode, CLion or SciTools Understand.

Closes https://github.com/dart-lang/sdk/pull/44690
https://github.com/dart-lang/sdk/pull/44690

GitOrigin-RevId: 72a0848cd1db2fa787a057ba07be0e7e2ade596a
Change-Id: Ib5212063bec58fc1575c7bfd5fb5f2a01db9db52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179780
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2021-01-25 10:37:02 +00:00
Sigmund Cherem 9866c06867 [infra] Build kernel snapshots for dart2js and dartdevc in ARM.
Our build infrastructure uses simarm to build for the ARM architecture.
Because of that, building the full sdk with dart2js and dartdevc was
too expensive.  In the past there wasn't as much need for the web
compilers in ARM, so we defaulted to exclude the web compilers from
the ARM SDK builds.

We are seeing more use and interest in using these tools in ARM, for
example, from users of modern Apple MacBooks and Raspberry Pi.

This change adds again the web compilers to ARM, but uses kernel
snapshots instead.  We believe doing so will be more affordable in
our build infrastructure.

Fixes https://github.com/dart-lang/sdk/issues/43776

Change-Id: I81094f2c51941b0af1dedaf238601c91b0b9dbeb
Bug: https://github.com/dart-lang/sdk/issues/43776
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178960
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Auto-Submit: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-01-20 17:06:25 +00:00
Nate Bosch 58e7e7eb26 Prepare for breaking change in package:http
The `url` argument is changing from `Object`, accepting either `String`
or `Uri` at runtime, to `Uri` for better static help.
https://github.com/dart-lang/http/pull/507

- Switch to using `Uri` for requests. Where sensible push this type into
  the signature of the surrounding method.
- Make some updated method private where they were unnecessarily public
  which makes it harder to have confidence when looking for usages.
  Rename a method with an unnecessary `get` name.

Change-Id: Ibf075741d6b9d292349b15f1dc84004981729aca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179368
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2021-01-15 16:35:01 +00:00
Devon Carew b87af6d153 [dart fix] test flutter's use of data driven fixes
Change-Id: I7a1ce80eb30aeabbb35c980a2af0c0ae03cbc4d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178662
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-01-12 00:58:40 +00:00
eggfly 318babd5ac [tools] Fix typo in build.py
Closes https://github.com/dart-lang/sdk/pull/44580
https://github.com/dart-lang/sdk/pull/44580

GitOrigin-RevId: 43ebbcec6ee358d04f19bdd2850b2aa8f9718ad5
Change-Id: Ia10816097d43f9ee1062d846326a680767033165
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177520
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2021-01-11 09:58:36 +00:00
Erik Ernst b27735d404 Add missing change log entries for 8 changes.
Dart.g has a 'CHANGES' section, but it hasn't been updated for a while.
This CL adds the missing entries.

Change-Id: Ib99f480b872d176344f5ad4a5af15a869c1550a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177601
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2021-01-05 16:32:14 +00:00
Daco Harkes 550d580d5e [vm/ffi] Fuchsia FFI testing package
This does not include enabling the FFI on Fuchsia. So these tests will
fail without the dependent CL.

This CL adds an `all_positive.dart` test file to be packaged in the
.far file, such that it is easier to run all FFI tests in one go.

We don't run tests on the bots, but we do build this test package on
the bots.

To build the .far files locally:
```
tools/build.py --os=fuchsia -m debug fuchsia_ffi_test_package
tools/build.py --os=fuchsia -m debug -a arm64 fuchsia_ffi_test_package
```

Issue: https://github.com/dart-lang/sdk/issues/44434

Change-Id: Iec418e0c10d77afbf811fb83151664bcc2710b99
Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175484
Reviewed-by: Liam Appelbe <liama@google.com>
2020-12-10 12:15:17 +00:00
Daco Harkes 4ccb45c172 [vm] Fuchsia arm64 build
Also runs the build on the existing Fuchsia bot and start building the
test .far on the bot.

Issue: https://github.com/dart-lang/sdk/issues/38752
Issue: https://github.com/dart-lang/sdk/issues/44434

TEST=tools/build.py --os=fuchsia -a arm64 create_sdk

Change-Id: I8ba92defb9318773552af7e178dea12460790004
Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175482
Reviewed-by: Liam Appelbe <liama@google.com>
2020-12-10 12:15:17 +00:00
Ryan Macnak b957f09c6b [infra] Expand TSAN coverage.
Bug: https://github.com/dart-lang/sdk/issues/39611
Change-Id: I060403da4b5daff91b60805bad1e83865e021133
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139496
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-12-09 19:31:50 +00:00
Nicholas Shahan 4c2edfd5b9 [html] Make cancel() always return synchronously
Before Null Safety, `_EventStreamSubscription.cancel()` used a trick
to run with synchronous timing even though it was typed to return a
`Future`. During the migration of the SDK to support Null Safety it
kept the synchronous timing in weak mode, but was changed to
asynchronous in sound mode so that the behavior matched the method
signature. In hindsight, changing the timing when opting into Null
Safety is problematic:

* A shared package has no control over what mode it runs in. Libraries
  may be opted in and run their tests with sound null safety but the
  apps they are used in could still be running in weak mode. This
  results in library unit tests that behave differently than the
  production app that deploys the code.

* This codepath can be triggered by EventTarget.dispatchEvent() from
  dart:html which should have synchronous timings for the event
  listeners before returning to the calling code. The asynchronous
  timing when running with sound null safety is inconsistent with the
  browser API.

This change reverses that migration decision and keeps the synchronous
timing in both modes. To support this in sound mode it returns a
special future value that is internal to the SDK and known to be used
for synchronous timing.

This change also removes the workaround introduced in DDC to avoid
warning/failing when `_EventStreamSubscription.cancel()` returned
null and the extra warnings/errors features were enabled in weak
null safety mode.

Change-Id: I6b08a2ada5b10120bea787ad59d1d58e6e181de5
Fixes: https://github.com/dart-lang/sdk/issues/44157
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175323
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-12-09 01:44:38 +00:00
Joshua Litt 7d64e39572 [dart2js] Add flag to specify maximum number of deferred code fragments.
Change-Id: Ifd85eb01c0be9de9ebbb157df616ef8765a4d5b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158366
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-12-08 21:21:40 +00:00
Ryan Macnak fc4726e1cb [vm, gc] Fix write-write race between array truncation and the concurrent sweeper.
TEST=tsan
Bug: https://github.com/dart-lang/sdk/issues/44091
Change-Id: I589b31c0b8664d6b10aa5aad5ed6079c55cfba0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174843
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2020-12-07 20:05:38 +00:00
Devon Carew 8cba879f46 Add additional validations to the pkg/ package pubspecs.
TEST=these are additional validations that we run on the bots

Redux of https://dart-review.googlesource.com/c/sdk/+/161040

Change-Id: Ia32ced5d48fbfeafacfa9e51dc4774d2e9425091
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174601
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-12-02 17:27:18 +00:00
Erik Ernst 82403371ac Adjust qualifiedName, constructorDesignation, metadata
Cf. language issue #1341: The grammar rule in Dart.g for <metadata> is
wrong, it does not allow `@x` where `x` is the name of a variable
which is not a `<typeIdentifier>` (in particular, a variable can have
a name like `required` even though it's a built-in identifier).

This CL changes `qualifiedName` such that it only includes the cases
with a '.', and then the remaining case is added where `qualifiedName`
is used. We add `identifier` in `metadata` such that it allows
`@required` and such, and we add `typeIdentifier` in
`constructorDesignation`, because that's required to be an import
prefix or a class name, which are both `typeIdentifier`s.

Change-Id: Ia22d9d9842b995c4ebaa8e18e1c2ccbce1c30e62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174540
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-12-02 10:03:47 +00:00