Commit graph

37 commits

Author SHA1 Message Date
Anis Alibegić 40e18905f2 Fixed various typos in a lot of files
Closes https://github.com/dart-lang/sdk/pull/49478

TEST=Manual

GitOrigin-RevId: f4c9c6869dfe73639295e86574a021523b3d374d
Change-Id: I134a97caed4eec59d70e9cbca16b7e9a472cf2c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251902
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Chisholm <kevinjchisholm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2022-07-25 12:21:59 +00:00
Devon Carew 3dbed884c2 [pkg] use package:lints when analying pkg/
Change-Id: Ib25573375ea1f54e07846af6fcd9cd74a8fefb7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250784
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-07-07 14:29:22 +00:00
Devon Carew f7c46f145c [pkg] prefer 'any' deps for package dev dependencies
Tested: CI validation
Change-Id: If65cc156130a65ffe00c6f1660ac320e2921afae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246053
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2022-05-27 01:34:59 +00:00
Nate Bosch 6ebd2633cd Use any deps for all unpublished packages
It should not be necessary to ever run `pub get` for a package which is
not published. All packages used in the SDK are controlled by a single
package config, so it's not necessary to declare versions or paths for
any packages.

Remove all dependency overrides.

R=devoncarew@google.com

Change-Id: Icb328813b471f35ee4c99995f4e90aac4d8ed438
Tested: Covered by existing static analysis.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244767
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2022-05-17 01:22:25 +00:00
Lasse R.H. Nielsen 33c38e914b Fix bug in Isolate.run.
Failed to close the receive-port if `Isolate.spawn` threw
asynchronously, which would keep the isolate alive forever.

Fixes #48516

BUG= http://dartbug.com/48516

Change-Id: If53a868bcc6a11aef9123e95a7dfe47d25932c4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235603
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-03-09 11:53:34 +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
Lasse R.H. Nielsen cd0606e425 Simplify asyncExpectThrows and enhance Expect.throws.
For `asyncExpectThrows`, instead of taking a function,
then checking if that function can be called with zero arguments,
and then immediately calling it and checking that it returns a future,
just take the future as argument.

Since synchronus errors from calling the function were not caught
anyway, doing the entire `Future` computation directly shouldn't
change behavior.

Also make `asyncExpectThrows` and `Expect.throws` return the caught error,
so that you can use normal `Expect.something` checks on it afterwards,
instead of doing that in the `check` function.
That basically makes the `check` function unnecessary (but hard to remove
with the existing test corpus using it heavily).

This makes some uses of the `asyncExpectThrows` function slightly more
complicated, those that have no other way to create a future than calling
the argument function anyway, but other uses become simpler
when they can avoid adding the function wrapper.

TEST= Refactoring. If the tests keep running, it's successful.

Change-Id: I983eb65ea4805760339073fabc27f78c57f9a471
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226102
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-01-06 17:06:47 +00:00
Franklin Yow 03101c0c2b Update LICENSE
Changes to comply to internal review

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

TEST=CL contains no code changes.

No-Try: true
GitOrigin-RevId: 65796784e5fdfddaa021b5c55ad435b1db419700
Change-Id: I085a948f16dc9a0de128ed0bd456ae69adf6c124
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193888
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-04-07 10:28:38 +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
Kevin Moore 063c3ede72 Update pkg dependencies on pkg:analyzer
Now `pub get` actually succeeds on `pkg:front_end`

Change-Id: Ifdab9d6741efba034ecd56f27fd83e288267e46c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168662
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
2020-10-26 19:30:06 +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
Robert Nystrom d9bb487ca8 Treat the expect and async_helper packages as opted in to NNBD.
This should enable strong mode tests to be fully NNBD opted in. At the
same time, legacy tests when run with the experiment off should
hopefully be able to still consume these libraries because they don't
actually use any NNBD features.

To do this, I changed the script that generates the SDK repo's package
config to not put in a language version for any package whose pubspec
has no SDK version. According to language versioning, that means the
package should be considered to be at the "current" version of the SDK
running the code.

In NNBD, that's opted in. With the experiment off, that is (presumably)
"opted out" in the sense that NNBD doesn't exist.

In order to *not* opt in some of the other packages that currently
lack SDK constraints, I put those in and pinned them to "^2.7.0" which
was what the package config script used to implicitly fill in for them.

I see a bunch of other changes in the generated package config too. The
update script probably hasn't been run in a while.

Change-Id: I55193d42eac0696a6b0105546551efa45a1f3252
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144305
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-04-27 21:04:56 +00:00
Liam Appelbe 2e75c3d7ca [nnbd] Fix remaining async tests in strong mode.
stream_controller_async_test and stream_join_test are built on
async_minitest, so most of the issues were fixed by migrating it to use
Never as the bottom type rather than Null.

Change-Id: I6f43e818a7a8d6793844166c8f9fc07b3b0f7a16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143562
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-04-16 21:15:45 +00:00
Robert Nystrom 54ae6c123e Make minitest and async_minitest NNBD agnostic.
Fix a couple of errors when compiling those libraries as opted in to
NNBD.

Change-Id: I7dfb629d951d8531c8bed4e765950984e9291f44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139686
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2020-03-16 19:58:10 +00:00
Srujan Gaddam 799cf665ea Move html custom tests off unittest
Many of the setUps were meant to be one time setUps, so
they're only called once.

anyOf is added to async_minitest using the minitest impl.

Change-Id: Ibb2d4d0c3990d0df025fcaf6c02d49faa9733569
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139147
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-13 23:09:07 +00:00
Robert Nystrom 63bff1a2fb Improve asynchronous test failures and async_minitest.
There's a bundle of improvements here:

- Show the stack trace of the failure when a test using async_minitest
  fails. The trade-off is that it now only reports the first failure.
  Collecting all of them didn't play nice with the stack trace
  deobfuscation the test runner does.

- Report the group and name of the test that failed when known.

- Fix as many double-reporting test result bugs as I could find. Also,
  in case that still happens, don't spew out a pile of useless JSON.

- Correctly wait for a test to complete even if it schedules its own
  asynchronous operations without returning futures.

- Generally simplify and clean some stuff up.

Change-Id: Ie020ae0b80a11764c455cf0ce24dfea09ca0adce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138903
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-03-11 01:12:48 +00:00
Srujan Gaddam e3070b6f02 Add predicate to async_minitest
Change-Id: Ife13e0f319519d083ff8116eb10756e8d8ec6ba2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138740
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-09 20:32:49 +00:00
Srujan Gaddam 3d0432eafc Add returnsNormally to async_minitest
Included change in fileapi_supported_throws_test to sanity test the
change in async_minitest.

Change-Id: I6e6b6b4eb0740ae695a85d4b3c1e2b4f8f63615a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138614
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-07 02:02:24 +00:00
Robert Nystrom b81f12a549 Migrate language_2/async_star to NNBD.
Change-Id: I0fa2ee2561dd0bc399d88868d790d56e6df3c94d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134940
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-02-21 00:22:06 +00:00
Robert Nystrom a2b556b937 Migrate lib_2/async to NNBD.
Change-Id: Ia5c41dda6503e1fbb8cc6099835d07588425e2ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128310
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-01-09 22:04:37 +00:00
Robert Nystrom ed0cc81e81 Get DDC and DDK test builds working with the forked NNBD SDK.
With these changes, I can run:

  ./tools/build.py -m release --nnbd dartdevc_test

In a checkout that also includes a migrated core library that uses
NNBD features.

I haven't verified if the resulting JS is *correct*, but the build
doesn't error out.

Change-Id: I7d89efe5da8c46e2a9805743e4e61858da8097dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122280
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2019-10-21 17:19:59 +00:00
Sigmund Cherem fb29d0e96d Move async_minitest to package:async_helper.
This allows to break a circular dependency between package:expect and

package:async_helper, which will simplify the support for modular tests using
package:modular_test.
Change-Id: Ie48723d3f35d51a8fbe622e0158450e8104fe3f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102140
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-05-10 19:43:58 +00:00
Bob Nystrom ffee99d79b Add asyncExpectThrows<T>() to async_helper.
This lets you test that a callback returns a Future that completes to
a given error. Like Expect.throws(), but async.

At first, I added support for this directly to Expect.throws(), but I
think it's better to minimize the amount of dynamic logic going on in
the language test framework.

I was worried about having to duplicate all of the Expect.throws___()
convenience functions but now that we have generic methods, those
functions aren't that much more convenient.

Change-Id: I8b288945611fa16f8d27056f3cf79181fc22d256
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97881
Reviewed-by: William Hesse <whesse@google.com>
2019-03-27 18:26:15 +00:00
Mike Fairhurst 9727a4a4ef Fix #33415 no error for awaiting a void expression.
Bug:  33415
Change-Id: I4d4e81fef79a5bc5162e37ab07a8fe99e50c8dfc
Reviewed-on: https://dart-review.googlesource.com/60522
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-07-24 19:31:57 +00:00
Kevin Moore d4df9b9152 misc: update async_helper pubspec to make it clear it's not public
...and not intended to be published

Change-Id: I6d753c02d4284dfdb737fe206afabd886b8122db
Reviewed-on: https://dart-review.googlesource.com/64247
Reviewed-by: Kevin Moore <kevmoo@google.com>
2018-07-09 23:27:54 +00:00
Lasse R.H. Nielsen dc76aa34c7 Stop using a port to keep the isolate alive in async_helper.
Addresses issue #33067.

Bug: http://dartbug.com/33067
Change-Id: Id9e60e930a8f289a51063f609e13fb998f6907c3
Reviewed-on: https://dart-review.googlesource.com/55662
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-05-18 09:33:27 +00:00
Lasse R.H. Nielsen 8dc7d5e907 Update language_2/await_test.dart to use async_helper.
Add more tests.

See #31535.

Bug: http://dartbug.com/31535
Change-Id: I1db9ecb84d9ed87f1111e3fdc9637143cf46fa33
Reviewed-on: https://dart-review.googlesource.com/26220
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2017-12-06 12:05:59 +00:00
Jacob Richman de54e18369 Run dartfmt on remaining unformated pkg packages
BUG=
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2743423009 .
2017-03-21 18:21:32 -07:00
lrn@google.com 3a66c29a6d Add cleanUp function to Future.wait.
The cleanUp function is called on the values of successful futures,
so it can release any resources that were successfully allocated.

R=sgjesse@google.com

Review URL: https://codereview.chromium.org//815773002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42730 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 10:52:15 +00:00
kevmoo@google.com 97835dc3a6 pkg/unittest: added LICENSE
R=rnystrom@google.com

Review URL: https://codereview.chromium.org//135343002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31750 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-13 18:07:45 +00:00
dgrove@google.com 18ca7d0036 Re-land r29957 (add versions and constraints for packages and samples), with
SDK constraints bumped from 1.0.0 to 0.8.10+6 .

R=ricow@google.com, sigmund@google.com

Review URL: https://codereview.chromium.org//62473002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29986 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-06 18:28:22 +00:00
ajohnsen@google.com 61f6c51990 Revert "add versions and constraints for packages and samples"
This is currently blocking us from testing samples.

BUG=
R=kasperl@google.com

Review URL: https://codereview.chromium.org//59513007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29960 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-06 09:09:18 +00:00
jmesserly@google.com 02638c5760 add versions and constraints for packages and samples
- all packages at 0.9.0, except "analyzer" which had a version already
- dependencies at ">=0.9.0 <0.10.0" except analyzer is ">=0.10.0 <0.11.0"
- sdk constraint ">=1.0.0 <2.0.0"

R=sigmund@google.com

Review URL: https://codereview.chromium.org//59763006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29957 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-06 03:27:58 +00:00
johnniwinther@google.com 776bd8ef05 Call asyncEnd only on success.
BUG=
R=ahe@google.com, kustermann@google.com

Review URL: https://codereview.chromium.org//23512008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27465 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-13 07:36:02 +00:00
johnniwinther@google.com 4c7b97d041 Remove reference to unimported Future.
BUG=

Review URL: https://codereview.chromium.org//23551007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27030 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-03 08:28:11 +00:00
johnniwinther@google.com 3d22a350b3 First pass at asynchronous input loading in dart2js.
R=ahe@google.com, johnniwinther@google.com

Review URL: https://codereview.chromium.org//17759007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27028 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-03 08:04:38 +00:00
floitsch@google.com a1a91eb915 Add async_helper package.
This package is private and should not be published to pub (nor should
its documentation be published to api.dartlang.org).

R=kustermann@google.com

Review URL: https://codereview.chromium.org//23547005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26774 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 09:24:50 +00:00