Commit Graph

75 Commits

Author SHA1 Message Date
Brian Wilkerson 069849df14 Update the presubmit script to stop running a removed test
The test was removed in https://dart-review.googlesource.com/c/sdk/+/503620.

Change-Id: I271fbff176816c526d8221e0e8cbd3f52dcfbef8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503666
Reviewed-by: Paul Berry <paulberry@google.com>
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2026-05-18 07:13:11 -07:00
Sam Rawlins 97c49e7514 Deprecate errorCodeValues for diagnosticCodeValues
Work towards https://github.com/dart-lang/sdk/issues/60635

Change-Id: Ieea525a3f7260ea50e766feff0a0647fc0c33b4d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/434526
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2025-06-16 16:18:15 -07:00
Ryan Macnak 1fac08e708 Update double-conversion to 7630f84a10f9428b041d0471e71a562141e9684b.
Change-Id: I37d176a938798cb74eae0a3a445182beb55a117d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/434900
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-06-16 15:31:25 -07:00
Ben Konyi befc86b85d [ PRESUBMIT ] Removes Observatory runtime/observatory check
No longer relevant now that Observatory has been removed from
runtime/observatory.

Change-Id: I103dd0a73b2316c6ff4bce50fdcda45a70643264
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/434460
Commit-Queue: Ben Konyi <bkonyi@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2025-06-13 11:19:59 -07:00
Ben Konyi d7cef28bee [ Observatory ] Create fork of runtime/observatory at pkg/observatory
This change further prepares for the removal of Observatory from the
shipped Dart SDK by creating a fork to be used by the remaining
Observatory users.

This is basically a straight copy of the contents from
runtime/observatory with the exception of two new scripts:

- `bin/observatory.dart`, a utility to launch Observatory
- `bin/activate.dart`, which globally activates `bin/observatory.dart`
  as `observatory`

This change also updates the presubmits to ensure that
`runtime/observatory` is effectively placed in read-only mode to prevent
any divergences with the fork.

Work towards https://github.com/dart-lang/sdk/issues/50233

Change-Id: Iff3a7512058f36afa2a96d45d94a1dff424401d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429800
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2025-05-22 07:19:03 -07:00
Ben Konyi a067d75f8f [ Observatory ] Remove legacy Observatory VM service tests
Clean up test_runner and the test matrix to remove all references to
the service test suite and delete the tests.

Work towards https://github.com/dart-lang/sdk/issues/50233

TEST=N/A

Change-Id: Ie3adb0d007d71f9a223843d739e57cbdb5be0d59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429140
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
2025-05-20 10:33:53 -07:00
Robert Nystrom 9282dc5b06 Update the pre-built SDK and re-enable the format presubmit.
Now that the new formatter has landed in the SDK, I can update the
pre-built SDK to use it and turn the presubmit back on.

Change-Id: I2ec47dfa2f26f39451b1bf071fdbeb963f19eeaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/424282
Commit-Queue: Alexander Thomas <athom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-04-23 22:32:43 -07:00
Robert Nystrom 1345cdf399 Roll dart_style 3.1.0 into the SDK.
Change-Id: I6392327cadce5194dabaa719bff945868a690225
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/419990
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2025-04-10 23:55:02 -07:00
Gabriel Terwesten 5c1796f4e0 [vm,ffi] Avoid linking test DLLs to dart.exe
The `ffi_test_functions` shared library needs to access functions from
`dart_api.h` and `dart_native_api.h`, which are only available in
the Dart executable.

UNIX shared libraries can have undefined symbols, which are resolved at
runtime and can be found in the loading executable. Windows DLLs cannot
have undefined symbols, but they can be dynamically linked to an
executable (in this case `dart.exe`). This requires the DLL to be able
to find the executable at runtime.

A better solution is to include implementations for the Dart APIs in the
DLL itself, that use `GetModuleHandle(NULL)` to get a handle to the
executable and `GetProcAddress` to get the address of the function.

This is what `dart_api_win.c` does.

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

TEST=ci

Cq-Include-Trybots: luci.dart.try:vm-win-release-ia32-try,vm-win-debug-x64c-try,vm-win-debug-x64-try,vm-win-debug-arm64-try,vm-msvc-windows-try,vm-aot-win-debug-x64c-try,vm-aot-win-debug-x64-try,vm-aot-win-debug-arm64-try,vm-aot-win-product-x64-try,vm-aot-win-release-x64-try,vm-aot-win-release-arm64-try,pkg-win-release-try,pkg-win-release-arm64-try,dart-sdk-win-try,dart-sdk-win-arm64-try

Change-Id: I7f971a8ce21e03d18ed2967e74998f925c9236b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/400582
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-01-07 08:15:39 -08:00
Robert Nystrom 5236641dd0 Re-enable the dart format presubmit check.
Change-Id: I3048d5db2c66f26da535236cc1aa52f1f55125cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/399887
Reviewed-by: Alexander Thomas <athom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2024-12-11 08:56:17 +00:00
Robert Nystrom 3b931e94b6 Disable the Dart format check in the presubmit.
This is temporary while I roll in the new formatter and Alex builds a
new pre-built SDK.

Change-Id: I89a782bec07b14f19dad374a13ca5e8f89a2a841
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391320
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2024-10-22 00:59:38 +00:00
Robert Nystrom 8b1fab0c8d Don't run dart format --fix in the presubmit.
`--fix` is going away in the new formatter so this gets the presubmit
forward compatible with that.

(If we really care about this check, we could migrate it to a separate
`dart fix` check, but I don't think it's that important.)

Change-Id: I20c9a8d9c849d72b451d9d614d1c5e9c28ca43e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/390564
Reviewed-by: Devon Carew <devoncarew@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2024-10-16 22:11:20 +00:00
Parker Lougheed e2a2761cc6 [linter] Clarify status and use of rules.json and clean up generation
- Adds a doc at `pkg/linter/tool/machine/rules.json` with info about the file.
- Drops the disabled test that checked that the file is up to date.
- Drops inclusion of rule sets from the `rules.json` file.
- Consolidate the remaining logic for determining rule sets


Closes https://github.com/dart-lang/linter/issues/4756
Closes https://github.com/dart-lang/sdk/issues/55977
Contributes to https://github.com/dart-lang/sdk/issues/56835

Change-Id: Ic030640571c0f8cf553a218a2e32c5a767535564
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388481
Auto-Submit: Parker Lougheed <parlough@gmail.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2024-10-08 18:39:29 +00:00
Nicholas Shahan 95a95c31af [infra] Add a presubmit check for edits in DDC
Check for edits in compiler.dart or compiler_new.dart without an edit
in the counterpart and warn about keeping them in sync.

Change-Id: Ia54421a602367d7349df706d8f41615231b6bf32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381384
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2024-08-21 23:50:27 +00:00
Alexander Thomas 64a2407ca7 [infra] Add clang-format to PRESUBMIT.py
Change-Id: I429c168d363f309f6338f0baf3d9b1e5bae2f86a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/363641
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2024-04-19 15:45:16 +00:00
Johnni Winther 2553a65425 [presubmit] Force read files as UTF-8
The avoids the Windows default of using ANSI.

Change-Id: I1a6177729bb4e2453522e763b490396b2f930a42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355741
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-03-05 14:25:09 +00:00
Sigmund Cherem 9a4d8b47cf [presubmit] first check for formatting errors in bulk.
The motivation behind this CL is performance: currently
PRESUBMIT.py checks for formatting errors a file at a time.
This can be very slow when a CL modifies a lot of files. For
reference, a command-line invocation of `dart format`
takes 2s to check 100 files at once, vs 70s if you run the
command one file at a time.

This change updates PRESUBMIT.py to run `dart format` first
on all the changed files in bulk to determine whether any
has formatting errors. If any formatting error is found, it
goes through the process of checking each file individually
again for formatting errors and compares the result against
the state before a CL's changes (same process as today).
However, if no errors are found, we bypass the slow check
entirely!

To validate the implementation I created a pretend CL with
100 modifications. I leveraged
`tests/language/function_type/test_generator.dart` to touch
100 test files easily. The results were as expected:

  * if all files are formatted properly, the presubmit
    completes now in 4s (was 76s).

  * If all files have formatting errors, the presubmit
    didn't regress beyond the usual observable performance
    variances (150s in both cases).

Notes about the change itself:

  * refactored to compute the set of affected files before
    running the formatting checks

  * refactored to provide some information as data (e.g.
    `excluded_folders`) instead of lambdas (e.g.
    `should_skip`) to support the first change

  * added a bulk option to `HasFormatErrors` to take the
    fast pass

Eventually we could take this a step further and improve the
performance of the failure case. That would require parsing
the output of the bulk run in order to avoid the individual
runs on all files, and only check for the previous version
of the files that indeed required formatting changes.

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

Change-Id: I0cfbd84f6c62eca48ac91449599ef9ac4c1800f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352740
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2024-02-15 19:29:42 +00:00
Ben Konyi 294d35f0cf [ Presubmit ] Add rule to prevent new tests from being added under runtime/observatory/tests/service
New service tests should be added to pkg/vm_service/test/ instead.

Change-Id: I22460753478c21956f56b5c7c29cb3dfbc500c21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350420
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-02-08 16:23:16 +00:00
Sam Rawlins 8863ed646e presubmit: fix file path
Change-Id: Ia24889ef70f1d99e5168c739c594119a361a4e56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342100
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-12-18 09:41:58 +00:00
Sam Rawlins 7320da0d19 linter: Add a PRESUBMIT check for example/all.yaml
Work towards https://github.com/dart-lang/sdk/issues/53578

Change-Id: Ia07d999abc2fcf4b8195c9f7688799bc099a1d88
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341385
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-12-15 04:04:28 +00:00
Ryan Macnak 1256db2277 [build] Python 3.12 compatibility.
Bug: https://github.com/dart-lang/sdk/issues/54306
Change-Id: I974e5e70c6c1cbb87343139a26052996d8df858f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341023
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-12-12 18:19:35 +00:00
Sam Rawlins 312b46b444 Introduce first presubmit check for analyzer team.
See the issue below, and the code comments, for the further plans.
I plan on adding whichever ones we find useful, as long as I can
keep them performant. This one is performant, and we can discuss
possible problematic checks on the issue.

Work towards https://github.com/dart-lang/sdk/issues/53578

Change-Id: Ie3980e6194e46574a01ad3e0bd8e36f7ac248917
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Kallen Tu <kallentu@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2023-10-16 16:42:24 +00:00
Alexander Thomas 1cfcb4feaa [presubmit] Remove check to keep _2 suites in sync
We have disabled most legacy testing and keeping the old suites in sync
is no longer worth the effort.

Change-Id: Id2f60ef558225bfc16836ad9c11e4c5819717b45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/315401
Auto-Submit: Alexander Thomas <athom@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2023-07-21 16:08:49 +00:00
Ahmed Ashour 43dbc91025 Add year checking in PRESUBMIT.py
Fixes #47110

Change-Id: I88b20a1ad4cbc5be200db84563ad4024aebc419f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212469
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-02-01 16:31:32 +00:00
Lasse R.H. Nielsen 5179f5ae94 Make presubmit on Dart files check for default value separator.
This should prevent new code using old syntax.

Change-Id: I0620369a34b3838fb4555f5264c93bccf92acc42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256213
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-09-09 12:34:34 +00:00
Devon Carew 47c011abd7 [infra] re-land work to auto-generate .dart_tool/package_config.json
Change-Id: I0ec833062bbffa5a3f01d6dc4152b29cf0461214
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239721
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-04-12 17:21:02 +00:00
Devon Carew c7680744b0 Revert "Auto-generate the package_config.json file on gclient sync."
This reverts commit 92868580b4.

Reason for revert: I'm seeing failures in golem:

ninja: error: '../../third_party/dart/.dart_tool/package_config.json', needed by 'vm_outline_strong.dill', missing and no known rule to make it

Original change's description:
> Auto-generate the package_config.json file on gclient sync.
>
> Change-Id: Ibb5e548c0738e7dd0061433cf054af8336a0683b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234320
> Reviewed-by: Alexander Thomas <athom@google.com>
> Reviewed-by: Lasse Nielsen <lrn@google.com>
> Commit-Queue: Devon Carew <devoncarew@google.com>

TBR=lrn@google.com,devoncarew@google.com,athom@google.com

Change-Id: Ic2b7ae3feedfa064ddbbdb0b36f0e3db088bf177
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234802
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-03-01 18:20:29 +00:00
Devon Carew 92868580b4 Auto-generate the package_config.json file on gclient sync.
Change-Id: Ibb5e548c0738e7dd0061433cf054af8336a0683b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234320
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-03-01 17:05:28 +00:00
Robert Nystrom 0ea8347576 Remove references to dartfmt in various comments and docs.
Change-Id: I02112ce2920d71f84ce4808c13a62e1a1765d83f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215181
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2021-10-01 00:56:14 +00:00
Jens Johansen 497a331365 [parser] Set 'recovered' in more cases
Fixes https://github.com/dart-lang/sdk/issues/47009
Fixes https://github.com/dart-lang/sdk/issues/47008

Change-Id: I4d00e378ad7cfe3b84fe0f48b11cb83ad7a14fc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212826
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2021-09-10 08:18:17 +00:00
Alexander Thomas 588180725b [infra] Workaround dart format hang on Windows
https://github.com/dart-lang/sdk/issues/46947

Change-Id: Ia632fbc73627504f96ef06fa99fff1f343ef6698
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212047
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-09-01 11:09:57 +00:00
Alexander Thomas d2bd43f43e [python3] Migrate PRESUBMIT.py files
* Force depot_tools to use python3 results (USE_PYTHON3=True).
* Fixes the dart format presubmit check.
* Remove broken DOM tools presubmit check.

TEST=Manually provoked errors and ran git cl presubmit -v -f.

Cq-Include-Trybots: luci.dart.try.shared:presubmit-try
Change-Id: I8ba46e2ae1640f1b2f82e18bc8024e0aa4838b2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210123
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-08-16 08:29:54 +00:00
Ben Konyi 44ffad59d2 Pass filename instead of piping contents through stdin to dart format in
PRESUBMIT.py

FIXES=#46600

Change-Id: I69358185b5a8dfc863f17cd4beb0209592d3be09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206681
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-07-13 18:36:57 +00:00
Ben Konyi cb6d0e03c1 Update PRESUBMIT.py to use dart format instead of dartfmt
`dartfmt` is deprecated and will be removed in a future release.

Change-Id: I6572efd1ba2919f6891a90c890a9475933f94202
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206584
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-07-12 23:07:38 +00:00
Leaf Petersen e585bd5655 Add gclient sync to package_config.json presubmit message
Change-Id: I1f53911efc0e809e23bdee4cd522aff9b76c8c53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184640
Auto-Submit: Leaf Petersen <leafp@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Gary Roumanis <grouma@google.com>
2021-02-12 01:44:47 +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
Vyacheslav Egorov 4b6f0f5c7b Revert "Require that all changes to VM have TEST line"
This reverts commit a2ceec3e25.

Reason for revert: presubmit hooks are run very early (before CL description is edited), which breaks common workflows.

Original change's description:
> Require that all changes to VM have TEST line
>
> All changes touching one of the following directories will after this
> change be required to contain TEST= line.
>
>     runtime/vm
>     runtime/bin
>     runtime/lib
>     runtime/include
>     runtime/observatory
>     runtime/observatory_2
>     runtime/platform
>     sdk/lib/_internal/vm
>     pkg/vm
>
> This line is supposed to describe in free form how change was validated,
> for example by listing existing or newly added tests.
>
> The goal behind this requirement is to remind both reviewer and change
> author that changes to the code base are in general expected to be
> covered by tests, especially when CL is addressing a regression which
> slipped through existing testing.
>
> Having TEST line in the description would allow both author and
> reviewer to take additional time to consider if validation was
> sufficient or additional test coverage is needed.
>
> The inspiration for this line comes from Chromium[1].
>
> [1] https://chromium.googlesource.com/chromiumos/docs/+/master/contributing.md#describe-testing-performed
>
> TEST=changed file in runtime/vm and run git cl presubmit
>
> Change-Id: Ie16cf7c14af18e3a22a17084c0aebb4d1dfd6d23
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169640
> Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=vegorov@google.com,kustermann@google.com,asiva@google.com

Change-Id: Ib2e198c322447e8d1166d5d05b2f3209d168f1e9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169887
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2020-10-30 15:28:41 +00:00
Vyacheslav Egorov a2ceec3e25 Require that all changes to VM have TEST line
All changes touching one of the following directories will after this
change be required to contain TEST= line.

    runtime/vm
    runtime/bin
    runtime/lib
    runtime/include
    runtime/observatory
    runtime/observatory_2
    runtime/platform
    sdk/lib/_internal/vm
    pkg/vm

This line is supposed to describe in free form how change was validated,
for example by listing existing or newly added tests.

The goal behind this requirement is to remind both reviewer and change
author that changes to the code base are in general expected to be
covered by tests, especially when CL is addressing a regression which
slipped through existing testing.

Having TEST line in the description would allow both author and
reviewer to take additional time to consider if validation was
sufficient or additional test coverage is needed.

The inspiration for this line comes from Chromium[1].

[1] https://chromium.googlesource.com/chromiumos/docs/+/master/contributing.md#describe-testing-performed

TEST=changed file in runtime/vm and run git cl presubmit

Change-Id: Ie16cf7c14af18e3a22a17084c0aebb4d1dfd6d23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169640
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-10-30 09:16:41 +00:00
Leaf Petersen d44457f79d [Core Libraries] Eliminate the fork in the core libraries.
Move the nnbd core libraries from sdk_nnbd to sdk, and updates
references in build files and elsewhere accordingly.

Change-Id: I09760fe1e006657aacdfe80f3b22fdf6f7e30a9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151121
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-06-16 23:37:36 +00:00
Martin Kustermann 2c69fb1d53 [vm] Update PRESUBMIT.py to also check for synchronized changes between runtime/tests/vm/{dart,dart_2}
Change-Id: Iaa026a312933e14fd3d56acb4d89257efd40b6b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150221
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-06-06 00:50:10 +00:00
Daco Harkes 2b84822b3a [nnbd] Make PRESUBMIT.py not warn about status files
Status files have different names in different folders.

Change-Id: I291b38cc6dae96ff7101c204a93d247580c64313
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149841
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-06-03 11:53:39 +00:00
Martin Kustermann e50a064034 [nnbd] Make PRESUBMIT.py warn on upload if tests are not changed in NNBD and non-NNBD suites
This CL ensures that the presubmit check will complain if newly added
tests were only added to NNBD suite but not to non-NNBD (or vice versa).

Also add ffi test suites to the list of checked directories.

Change-Id: I090064b99e5ca30444ab53edf1f262572f60beb9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149426
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-05-30 08:05:11 +00:00
Karl Klose 052c642151 [presubmit] Add presubmit check for valid test matrix
This change adds a rule to the SDK PRESUBMIT.py to validate that the
test matrix used by the CI/CQ builders does not contain errors.

Change-Id: Ie967e71dda76677f4db84c1e9e613d702b57069f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147547
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-05-12 05:48:22 +00:00
Nicholas Shahan 2aa6954014 Fix presubmit file path comparison
I recently added this presubmit to verify changes get replicated
between versions of the SDK and the paths of the current SDK
didn't get created correctly causing it to warn even when you
correctly replicated the changes.

Change-Id: If69e0375dfe097e0210c4249d77b49f0c3537a2c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143640
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-04-16 16:16:24 +00:00
Nicholas Shahan 3b300f519d [presubmit] Add check for DDC's dart:_runtime lib
The logic in one subdirectory of the SDK is being unforked so
we need to ensure changes are mirrored in both directions.

Change-Id: I6485bcafe4ebaf135c5683660e8cac3bd9945033
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143003
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-04-10 17:52:24 +00:00
Robert Nystrom 730a46093b Add some minimal presubmit checks to keep forked SDK tests in sync.
This only validates that if a test and its fork exist that the CL
touches both. There are lots of other cases we could imagine checking
like if you *add* a new test on one side, you should one on the other.
But those are likely to have a lot of false positives now while the
migration is happening and new NNBD tests are being written.

So for now, this just tries to check that tests that have been forked
at least don't diverge. It's a start.

Change-Id: Id6a9c39699a510da1a4a4702879210f94cd69c26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131945
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-01-16 18:50:27 +00:00
asiva b1c6d89fb0 [VM/runtime] Remove support for loading URLs through service isolate
- Removes the load port functionality from the service isolate, this was
  used to load sources in Dart 1 and is pretty much dead code in Dart 2
- Moves resolution of URIs and Package URI (based on package map) to the
  individual isolates instead of sending a request to the service isolate
- Setups the package map lazily as it is needed only if resolveURI is
  called in Dart code, it is not needed for loading/compiling sources
  (this is now done in the front end).
- Removed Dart_ServiceWaitForLoadPort() methods from the Dart C API as
  it is not used anywhere.

Change-Id: I6c3704bc431bdcd49bf074eb58bee1ed492ccccb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129742
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-12-27 17:30:05 +00:00
Ryan Macnak 623fd5c8cd Add embedder/vm layer checks to presubmits.
Change-Id: Idcfe4692ac0c047ed9a0fb817a17513ff964a2eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119080
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-09-30 16:28:07 +00:00
Jonas Termansen 11c5c34d95 [infra] Check whether sdk and sdk_nnbd are in sync on presubmit.
Change-Id: I3da7f3f59f941fdb25b1fde941ec0a91c710cb4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116761
Reviewed-by: William Hesse <whesse@google.com>
2019-09-11 10:42:35 +00:00
Nate Bosch e82d1115ac Remove _CheckBuildStatus on commit
See discussion at https://dart-review.googlesource.com/c/sdk/+/116364

Checking the tree is handled in gerrit.

Change-Id: I2fe6b5f40ba1c80df6dade5accc6c4b5e2eae58d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116549
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2019-09-10 20:44:10 +00:00