Commit Graph

127 Commits

Author SHA1 Message Date
Paul Berry 3186c708a2 [testing] Migrate to new constructor decl syntax.
(Part of https://github.com/dart-lang/sdk/issues/63288)

This change migrates the testing package to use the new constructor
declaration syntax, described in
https://github.com/dart-lang/language/blob/main/accepted/future-releases/primary-constructors/feature-specification.md#abbreviations-of-in-body-constructor-declarations.

This change was performed in an automated fashion, by (a) bumping the
package's SDK constraint to `3.13.0-0`, (b) enabling the lints
`unnecessary_type_name_in_constructor` and
`unnecessary_const_in_enum_constructor`, (c) fixing the resulting lint
failures using `dart fix`, and then (d) reformatting the affected
files.

To ease code review, I've reverted unrelated formatting changes.

Change-Id: I01dab822f08d804d5c7ce997dee6d7866a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508427
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2026-06-01 18:04:45 -07:00
Jens Johansen d93e62b550 [CFE/testing] Faster listing of testcases, especially for spelling_test_not_src_suite
pkg/front_end/test/spelling_test_not_src_suite.dart:
Before: Returning 5503 results after 0:00:30.424831
Now: Returning 5503 results after 0:00:00.642866

pkg/front_end/test/textual_outline_suite.dart:
Before: Returning 3335 results after 0:00:01.340791
Now: Returning 3335 results after 0:00:00.950186

pkg/front_end/test/outline_suite.dart:
Before: Returning 3328 results after 0:00:01.698578
Now: Returning 3328 results after 0:00:00.908465

pkg/front_end/test/strong_suite.dart:
Before: Returning 3335 results after 0:00:01.719944
Now: Returning 3335 results after 0:00:00.819222

pkg/front_end/test/modular_suite.dart:
Before: Returning 3328 results after 0:00:01.777826
Now: Returning 3328 results after 0:00:00.887345

pkg/front_end/test/lint_suite.dart:
Before: Returning 600 results after 0:00:00.035862
Now: Returning 600 results after 0:00:00.016070

pkg/front_end/test/spelling_test_src_suite.dart:

Before: Returning 605 results after 0:00:00.027379
Now: Got list of size 605 in 0:00:00.019704
Change-Id: I422b6bd0a4aac6da3d94d500349c3d84bf88cffe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/498880
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2026-04-28 06:00:01 -07:00
Jens Johansen 37de43c52f [testing] Format package testing
Change-Id: Ia4503844bcb6ea76627ab050ff198de2c14cb813
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/498860
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2026-04-28 05:59:53 -07:00
Paul Berry d6db1483e0 Bump model packages to language version 3.12.
This CL is part of an effort to bump the SDK requirement to `3.12.0-0`
for all the packages in `pkg` that are not published to `pub`, so that
we can get better testing of the "private named parameters" feature.

(Packages that *are* published to `pub` can't be safely bumped yet,
because SDK 3.12 hasn't been released, and I don't want to block those
packages' ability to publish useful updates to customers.)

This change covers the following packages, which are owned by
OWNERS_MODEL:
- pkg/analyzer_cli
- pkg/frontend_server
- pkg/testing

Changes to `pubspec.yaml` files were made manually.

Changes to `.dart` files were made automatically, using `dart fix` to
fix failures in the unnecessary_underscores lint.

Change-Id: Ie444a97b2aed3f9eabfde4963c19cfb26a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/487883
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
2026-03-13 15:48:42 -07:00
Sigurd Meldgaard 2fe05bd568 Reland "Migrate to use pub workspace"
This is a reland of commit b9b77058a9

Original change's description:
> Migrate to use pub workspace
>
> Use `pub get` to generate `.dart_tool/package_config.json` on gclient sync.
>
> All pkg/ (and a few third_party) packages that are developed inside the sdk repo are included in the workspace from the root `pubspec.yaml`.
>
> All dependencies that are pulled in via DEPS are added as path dependencies via `dependency_overrides` in the root `pubspec.yaml`.
>
> Bug: https://github.com/dart-lang/sdk/issues/56220
> Change-Id: I38c12b608c68da54c57821116cf9aa6696936746
> Tested: relies on CQ of existing tests. Should have no effect on functionality
> CoreLibraryReviewExempt: only core library change is adding a `// ignore:` comment. Should have no influence on functionality
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/397164
> Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>

Bug: https://github.com/dart-lang/sdk/issues/56220
Change-Id: I29afabade2d2447dea05121cb87ff50bb21a4b76
Cq-Include-Trybots: luci.dart.try:flutter-linux-try,flutter-web-try
Tested: relies on CQ of existing tests. Should have no effect on functionality
CoreLibraryReviewExempt: only core library change is adding a `//
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415561
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-03-20 06:19:16 -07:00
Devon Carew 3c973fb292 [lints] address diagnostics related to strict_top_level_inference
Change-Id: I228058202855900f0adba73c1ab04d35180a6e5d
Tested: this is an analyzer diagnostic only change
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/414900
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2025-03-17 08:27:57 -07:00
Sigurd Meldgaard 6c4de1ab7e Revert "Migrate to use pub workspace"
This reverts commit b9b77058a9.


Revert "Add missing sample pubspec to workspace"

This reverts commit 892ea15ac7.


These seem to break the engine.

Change-Id: Ieee26deb7928c3869a1b6265326c3ce568ffe731
Tested: this is a revert.
CoreLibraryReviewExempt: this is a revert
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415582
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-03-14 09:08:20 -07:00
Sigurd Meldgaard b9b77058a9 Migrate to use pub workspace
Use `pub get` to generate `.dart_tool/package_config.json` on gclient sync.

All pkg/ (and a few third_party) packages that are developed inside the sdk repo are included in the workspace from the root `pubspec.yaml`.

All dependencies that are pulled in via DEPS are added as path dependencies via `dependency_overrides` in the root `pubspec.yaml`.

Bug: https://github.com/dart-lang/sdk/issues/56220
Change-Id: I38c12b608c68da54c57821116cf9aa6696936746
Tested: relies on CQ of existing tests. Should have no effect on functionality
CoreLibraryReviewExempt: only core library change is adding a `// ignore:` comment. Should have no influence on functionality
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/397164
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-03-14 05:21:40 -07:00
Sigurd Meldgaard a9ab52bcbb Language version bumps for publish_to: none pkgs
Also a separate pubspec for the tools/ folder

Extracted from https://dart-review.googlesource.com/c/sdk/+/397164

Change-Id: If49a6ede07e4864d0c0fcb210c04c18c804849df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412041
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-02-27 00:48:40 -08:00
Paul Berry a864586f3c Remove OWNERS file for the CFE team.
The code that was previously owned by the CFE team (OWNERS_CFE) is now
owned by the Dart Model team (OWNERS_MODEL). Accordingly, we don't
need OWNERS_CFE anymore.

Change-Id: I1ede4fbf5a0d29c5d328cc870c75c8a5ec7f217c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410620
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-02-19 09:33:31 -08:00
Paul Berry ca2d428f99 Add an OWNERS file for the new Dart Model team
Moving forward, the Dart Model team will own the following packages:
- _fe_analyzer_shared
- analyzer
- analyzer_cli
- analyzer_utilities
- front_end
- frontend_server
- kernel
- testing

In follow-up CLs I will create an OWNERS file for the developer
experience team, and then remove the OWNERS files for the old analyzer
and CFE teams.

Change-Id: Id7cf38ea41a6d3f9ca44f43fae1f310426a31e29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/409841
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2025-02-14 15:51:17 -08:00
Parker Lougheed ffc82e6f17 Stop enabling the package_api_docs lint
The lint is non-functional and will be deprecated soon.

Bug: https://github.com/dart-lang/linter/issues/5107
Change-Id: I4d4b75a6c7978f584bef37351514391f55761c55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/389594
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Parker Lougheed <parlough@gmail.com>
2024-10-14 21:22:19 +00:00
Lasse R.H. Nielsen f8086c81ae Collect all test-related files in package:expect.
Collects files from `package:async_helper` and `tests/language`
that are generally useful, so that all test-related helpers are
in `package:expect`.

Moves the two libraries from `package:async_helper` into `package:expect`,
and the `tests/language/static_type_helper.dart` file too.

Deprecates `async_minitest.dart`, to follow `minitest.dart`,
expecting the Flutter use of it to have been fixed to not break
on deprecation (I believe Flutter no longer breaks builds on deprecations at all).

Patch 1 is the actual change.
Patch 2+4+8 is changing all existing references to the files.
Patch 6 ignores deprecation in files still using `async_minitest.dart`.

3+5+7+9 are updating this text to make the numbers match.
Then it's just test-expectations and small tweaks from there.

Change-Id: I1b665135b5fef9b9a0c3b340ffe9daf874d0174c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373120
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2024-10-11 16:53:52 +00:00
Jens Johansen de8aa39ff6 [CFE] Fix leak testing after kernels ast.dart was split into parts
The weekly bot this week finished in half the time, but was green.
Turns out the splitting of ast.dart into parts made the actual leak
testing not work because `Library` no longer existed in `ast.dart` (but
rather in `src/ast/libraries.dart`).

This CL:
1) Fixes the issue by also looking up the libraries uri (which is still
   `ast.dart`.
2) Adds an option for requiring to find instances of some things it
   looks for (e.g. `Library` in kernel) and throw if it doesn't. This
   would have made the weekly bot turn red (fail) instead of being green
  (saying that everything was fine) when really it wasn't.
3) Adds a test that is run on the try bots that will exercise the leak
   finding - and throw if it doesn't find `Library` in kernel.

Change-Id: Ie69bfbd188eb870fdc1e340a341c1271187ef110
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/389162
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-10-10 12:41:16 +00:00
Jens Johansen c437107a4c [CFE/testing] Isolate v processes test script; make pkg:testing run more consistent with invalid shards info
E.g. compile to aot:
out/ReleaseX64/dart-sdk/bin/dart compile aot-snapshot pkg/front_end/test/isolates_v_processes.dart

And run with a different number of isolates:
$ out/ReleaseX64/dart-sdk/bin/dartaotruntime --deterministic pkg/front_end/test/isolates_v_processes.aot --isolates -j1
 => 0:01:13.683401
$ out/ReleaseX64/dart-sdk/bin/dartaotruntime --deterministic pkg/front_end/test/isolates_v_processes.aot --isolates -j2
 => 0:00:53.379932
$ out/ReleaseX64/dart-sdk/bin/dartaotruntime --deterministic pkg/front_end/test/isolates_v_processes.aot --isolates -j4
 => 0:01:12.864165

(you might change `const bool doPrint = false;` to `true`,
compile again, run with -j4 and see interesting stops when it runs)

...or you could try the same but using processes:
$ out/ReleaseX64/dart-sdk/bin/dartaotruntime --deterministic pkg/front_end/test/isolates_v_processes.aot --processes -j1
 => 0:01:17.590922
$ out/ReleaseX64/dart-sdk/bin/dartaotruntime --deterministic pkg/front_end/test/isolates_v_processes.aot --processes -j2
 => 0:00:44.055109
$ out/ReleaseX64/dart-sdk/bin/dartaotruntime --deterministic pkg/front_end/test/isolates_v_processes.aot --processes -j4
 => 0:00:26.360444

Change-Id: Ie161e7dfa0f29931af34058b7b043ce93b839218
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/375481
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-07-12 11:11:16 +00:00
Devon Carew 828e6032b3 [pkg/testing] restore analysis options settings
Use package:lints/recommended.yaml for pkg/testing.

Change-Id: I15aedcc4c82447a9d033b575adae745eb138f6f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/363484
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2024-04-19 14:45:41 +00:00
Jens Johansen 198e5ea92b [package:testing] Proposed wildcard solution
This:
* Keeps the '...' syntax so bash-history doesn't become useless
* Adds support for '*' in selecting, e.g.
  `pkg/front_end/test/fasta/strong_suite.dart strong/*ffi*` or simply
  `pkg/front_end/test/fasta/strong_suite.dart *ffi*`
Change-Id: I357d1972e21268b1fb017b9ee92259ce6d42f1ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358900
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2024-03-21 09:03:18 +00:00
Jens Johansen 2bd74882e2 [package:testing] Various updates
* Delete unused stuff
 * rename 'path' to 'root'
 * accept 'includeEndsWith' as a plain text string so we often can avoid
   using regexp
 * accept 'subRoots' to filter to directories faster and more precisly
   than when using regexps in 'pattern'
 * make 'list' async instead of async* (no more yield stuff which we
   promptly turn into a list when actually using it)

Note that some changes in testing.json is not 100% semantic-preserving,
e.g. the "parser_all" suite previously had a pattern "/tests/.*\\.dart$"
which was probably meant to include all dart files in the "tests" folder
in the root, but in fact included all dart files in a "tests" folder
anywhere. The updated version does not.

Change-Id: Idd014274f86bf6214dee0753a7738ec80bc6a49e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358442
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2024-03-21 06:58:32 +00:00
Jens Johansen f3740c96e8 [package:testing] Reset the isolates errors fatal option
This code

```
import 'dart:isolate';

Future<void> main([List<String> arguments = const []]) async {
  await something();
  print("After the call!");
  if (1+1==2) throw "This will be swallowed";
  print("This will never be printed.");
}

Future<void> something() async {
  Isolate.current.setErrorsFatal(false);
}
```

prints

```
$ out/ReleaseX64/dart pkg/front_end/test/fasta/hmm.dart
After the call!
$ echo $?
0
```

I.e. it dies silently, swallowing the throw and has a 0 exit code.

Using package:testing (and having it run at least one thing), it
previously did this so that if anything crashed, say, in user code
after the run (or maybe even some places inside package:testing?) it
would just swallow the error and leave a 0 exit code.
This CL sets the errors fatal thing to true (which must be the default)
causing the normal behaviour of it not swallowing any throws.

Change-Id: I9850bbf504e172cc4077e5e17265833ef58dfe90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350321
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-02-05 14:38:05 +00:00
Jens Johansen 6c897ba077 Remove unused options from package:testing (batch 2)
Change-Id: I7f9227f3b00d84db5c29e8e5da88dba69def91cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346760
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-01-19 08:15:03 +00:00
Jens Johansen 0fabbeb467 Remove unused options from package:testing (batch 1)
Change-Id: I5b214a9661c00cb1817f51bb76c7ad9b2407cc26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346521
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-01-16 13:18:57 +00:00
Johnni Winther 507297562c Revert "[cfe] Run fasta testing directly"
This reverts commit b905c9a171.

Reason for revert: Sometimes all_suites.dart can't be found.

Original change's description:
> [cfe] Run `fasta testing` directly
>
> This avoids the precompile step when running
>
> package:testing/src/run_tests.dart
> Change-Id: Idb7569bb865b077440eb750333cfec5b6c48cd91
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345280
> Commit-Queue: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Jens Johansen <jensj@google.com>

Change-Id: Iedc310eac17fab1b372c03a4852ff0a19f6e2e95
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345500
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2024-01-10 11:46:47 +00:00
Johnni Winther b905c9a171 [cfe] Run fasta testing directly
This avoids the precompile step when running

package:testing/src/run_tests.dart
Change-Id: Idb7569bb865b077440eb750333cfec5b6c48cd91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345280
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2024-01-09 12:27:48 +00:00
Johnni Winther 39b44a02f5 Reland "[cfe] Run suite in together in update_expectations.dart"
This speeds up update_expectations.dart by avoid to restart
the expectation testing for each suite.

Change-Id: If0a4562f92f106c1c04bd22a81eb28e52591c4b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/343220
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-12-21 14:42:46 +00:00
Alexander Thomas 9394b30b77 Fix incorrect file reference in license headers
Bug: b/286184681
Change-Id: I903528c4adfbc576644aec7541903df6b9633e26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325523
Reviewed-by: Jonas Termansen <sortie@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-09-18 06:44:08 +00:00
Johnni Winther 82e3a751a9 [cfe] Remove unnecessary_null_comparison code
The frontend is now run with sound null safety so these are no longer needed.

TEST=existing

Change-Id: I6c1776845854695ff34e310a3bb5bc9d86715f06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307901
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-06-08 08:46:47 +00:00
Devon Carew 0bed5e0398 [pkg/testing] use package:lints/recommended.yaml
Change-Id: If3836cb1758671ccd53bfe2b227b7489a9855fa5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283460
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-02-17 01:34:34 +00:00
Ahmed Ashour 63180b95ed Remove superfluous words.
Fixes #51095

TEST=ci

CoreLibraryReviewExempt: There are no API changes, just removal of superfluous words in the comments.
Change-Id: Ib1020c62fe6baed5ca68f0074323f025cc90e9f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279500
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2023-01-30 15:58:38 +00:00
Josh Soref 01b28894e7 Spelling pkg dev compiler
Closes https://github.com/dart-lang/sdk/pull/50861

GitOrigin-RevId: 71005e6f5bf5a151cb5c1aefb6a2a300fc40f592
Change-Id: Iadfafb5787a62e9a379437f6a3763d31f99ba7c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/277743
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-01-26 09:12:41 +00:00
Ahmed Ashour 10e7e478a2 Fix typos
Fixes #50184

Change-Id: If17f838d932171e30ef92d1bda8d4918e7e08a8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263622
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-10-12 14:12:42 +00:00
Johnni Winther 593eb468f6 [testing] Remove language version from generated library
Change-Id: Ib51b23e2b66e70d3c5e712d750a5b121ecee3da3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251106
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2022-07-12 10:51:17 +00:00
Devon Carew b27709f1b8 [pkg/testing] analyze using package:lints
Change-Id: If43bc64029ac00575dc154b797fc7630d4dac82e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250764
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2022-07-06 18:55:40 +00:00
Jens Johansen 3c8a679b46 [CFE] Handle unevaluated constants differently in constant evaluator
This for instance avoids an exponential blowup that would previously
have occurred in certain cases.

Change-Id: I258d8153e75f7059bca346826b5dec62cc1bac84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249000
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-06-22 08:51:04 +00:00
Nate Bosch 3c231e4f57 Read package_config.json in more tests
Towards #48275

R=mit@google.com

Change-Id: I38cc986937543c5e4d1f2a2cd4c7804d180a2741
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244304
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
2022-05-11 18:58:44 +00:00
Alexander Thomas 30beab0f43 [infra] Add OWNERS to the Dart SDK
* Add team "groups" in tools/OWNERS_<group name>.
* Add top-level OWNERS as a fallback.
* Add OWNERS for all top-level directories.
* Add OWNERS to all packages.

For additional background information see go/dart-sdk-owners.

TEST=No op until code-owners is enabled.
Bug: b/200915407
Change-Id: I7fe6116cc599c749cd50ca16151d6d6a801d99d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229147
Reviewed-by: Jonas Termansen <sortie@google.com>
2022-02-14 14:06:34 +00:00
Nate Bosch f9c68a5679 Replace a bunch of references to .packages
Most of these arguments are flowing through to a `--packages` argument
which allows passing the `package_config.json` file. In the long term we
should remove the `.packages` file entirely.

TEST=None, the change should have no visible impact.

Change-Id: I60a8b175d5e217a85588bbcb91cc5095514066b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211503
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2021-10-12 20:16:15 +00:00
Johnni Winther 0073b55575 [testing] Migrate pkg/testing to null safety
Change-Id: I64caff0a9163305ff122965105e7484c05b9cafb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207138
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2021-07-27 19:45:38 +00:00
Jens Johansen 86e296f3ce [CFE] Make fuzz testing work also when not skipping VM
Also "roll up" fuzz errors/craches to pass if not fuzzing.

Change-Id: Ie044f0c014504f11939d4ce50971bf31930f1193
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192144
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-03-22 10:12:52 +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
Johnni Winther 990b03290f [cfe] Mention update_expectations.dart in failure log
Change-Id: I692e6aa8571c14817831b7c6a135b2cd6ef0ed2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178991
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-01-14 12:06:59 +00:00
Lasse R.H. Nielsen 6e29700e16 Update List constructor documentation, deprecate constructor.
Emphasize that the operation is going away,
and mark constructor as deprecated.

TEST= Refactoring+deprecation only, covered by existing tests.

Change-Id: I82aa044cd2cf7bf347b624371399f44bda8f4a07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173261
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2020-12-07 16:20:28 +00:00
Devon Carew 1bd99aa31c remove a no longer used dartanalyzer env variable
Change-Id: Icc7f69982f914c327b52e496206d9dbd0a2adbf4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173642
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-11-24 17:51:38 +00:00
Johnni Winther 18c7c8bca5 [testing] Opt out generated script in pkg/testing
Change-Id: I1ecb67ad5c7dbd712a2b36fbe8c5b8a1a6fd14f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170340
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-11-04 12:05:27 +00:00
Konstantin Shcheglov 1958d61b02 Issue 43929. Report HintCode.DEPRECATED_MEMBER_USE for Null Safe from Legacy, refactoring.
Bug: https://github.com/dart-lang/sdk/issues/43929
Change-Id: Ib05f2e44f6cac2acfcb8b3708bd88e38df70d6c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169256
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-28 16:41:20 +00:00
Johnni Winther 9ce4f5dfec [cfe] Report distinct error codes in incremental_load_from_dill testing
This changes the reported failure from Crash to something more specific
to the encounter error, like ExpectationFileMismatch. Validation errors
for the .yaml file still produce Crash, and so does a couple of the
checks on Component integrity that were also used outside
incremental_load_from_dill_suite.dart

Change-Id: I48aa8cb25198d24e986b0f354db2b370dc9b8ac8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167565
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-10-14 21:21:48 +00:00
Johnni Winther d34287af1b [cfe] Show regeneration command on unittest expectation failures
Closes #43633

Change-Id: I57f39367c5bf0827a2f0cb62e2e796692e152949
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165660
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-10-02 09:52:17 +00:00
Konstantin Shcheglov ebd5b622ba Add DartSdk.languageVersion
Bug: https://github.com/dart-lang/build/issues/2763#issuecomment-666707445
Change-Id: I8232bd395abc9efea0e5c27716450d6a5442b3bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156489
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-04 21:01:09 +00:00
Michael Thomsen f0c87e9f21 Clean up no-publish comments in pubspecs
Change-Id: I6cc1ab404de75cd02183b862842198c85b6d9256
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152005
Reviewed-by: Alexander Thomas <athom@google.com>
2020-06-23 10:34:09 +00:00
Johnni Winther 5a80fb6090 [testing] Fix path relativization on Windows
Change-Id: Ie685fb3cebf9e9c638c1e82b0f88d1c540c86a98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143810
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-04-20 08:21:46 +00:00
Erik Ernst e3af7e724f Update usage of int/String fromEnvironment
Breaking change 40678 requires the constructors int.fromEnvironment and
String.fromEnvironment to get new default values for the named
parameter `defaultValue`. This CL changes usages of these constructors
such that they do not depend on the default value, such that it
becomes a non-breaking change for code in the SDK repo to perform the
change in sdk and in sdk_nnbd.

Change-Id: I82af0e1f92d6cd3618b65c0c50d754ae8c39eb0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140284
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-03-24 11:19:14 +00:00