Commit Graph

98097 Commits

Author SHA1 Message Date
Jonas Termansen 11ec96ab8a Rename be channel to main.
**This change cannot easily be reverted**: After reverting this change,
dart-ci-internal-release-bucket-breakglass must be broken by a member of
Dart EngProd and gs://dart-archive/channels/main/raw/latest must be
purged as well as gs://dartlang-api-docs/channels/main/latest.txt. This
operation would risk our release security and it is strongly preferred
if any problems can be fixed forward instead.

This change will upload the main channel builds to the main directory in
the dart-archive bucket instead of the be directory. The existing builds
remain where they are and the last version on the be channel remains
permanently frozen.

The downstream uses already have forward compatibility for the new
channel name. The Dart recipes respect the input channel name and output
to the release location by that name. The api.dart.dev service will
notice when the main channel pops into existence and switch
api.dart.dev/be to become api.dart.dev/main. The setup-dart github
action will likewise notice when the main channel starts existing.

The main channel is not an officially supported product since the builds
are not signed and tested and we don't advertise the existence of these
builds to our users. Ideally nobody would be broken by this change since
they shouldn't be using the main channel builds, but if they are, they
will have to rename the channel in their download links.

This change ensures that all the release branches and release channels
have the same matching names, which simplifies our infrastructure and
makes our releases easier to understand.

Fixes: b/270022416
Change-Id: Ib47ae7d2ded5fe0d405b3f19c34981c38082a090
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/327940
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-11-13 13:27:24 +00:00
Johnni Winther 6b5b3cc98a [cfe] Add test for issue 53485
Closes #53485

Change-Id: I3db3ebd30fc6b335406fa0c0e6303650c746e978
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335467
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2023-11-13 09:15:13 +00:00
Johnni Winther edec6c115c [cfe] Handle inference of erroneous setters
Closes #54006

Change-Id: I05c9352525d91196fcefd59ab244b3979b0cfcc1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335465
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-11-13 09:13:16 +00:00
Johnni Winther 3adcec9e0a [fe_analyzer_shared] Add clarification to reproduction command
This adds a clarifying note the reproduction command emitted
when id-tests fail, that the used dart executable must be from
the out/ReleaseX64/dart-sdk/bin folder.

Change-Id: Iabbe68063f097544bb1ad1ca43d73ca27ccaa183
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335462
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2023-11-13 09:02:24 +00:00
Johnni Winther 0dd30703e2 [cfe] Add test for issue 53446
Closes #53446

Change-Id: I9c0e886e667a1988c061db9a998d59bd432c0595
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335521
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-11-13 08:59:40 +00:00
Johnni Winther 13c335f7be [cfe] Add test for issue 53751
Closes #53751

Change-Id: I4b0a081ff904b2e2b097d47aaa09a04c8795e105
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335045
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-11-13 08:42:54 +00:00
pq f962700302 + flutter_style_todos
Enabled `flutter_style_todos` in analyzer packages:

* `analyzer_cli`
* `analyzer_plugin`
* `analyzer_utilities`
* `meta`


Change-Id: I5fcd76bfa5a3bdeb14d6a81b8193129c6d83d0e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335405
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-11-13 00:14:09 +00:00
Konstantin Shcheglov 57a2fb6167 Augment. Allow augmentations set 'supertype' and append 'superclassConstraints'.
...and don't append `Object` is there are other constraints.

Change-Id: I1640fa6290905e1d133d1e073d9cceb39e23bf91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335406
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-11-12 21:14:41 +00:00
Parker Lougheed 11762189a1 [linter] Fix avoid_unstable_final_fields release version
Fixes https://github.com/dart-lang/sdk/issues/53852

Change-Id: I957373bfd9f04014a3e307f54b7e3f8e27b88564
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331340
Auto-Submit: Parker Lougheed <parlough@gmail.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-11-12 19:18:03 +00:00
pq 63118a139d handle more flutter_style_todos cases
Change-Id: Iadf85cc56193c16c041097ca33a2a819a204bc37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335381
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-11-11 05:23:25 +00:00
Devon Carew 755aabd096 [pkg] switches the default linting for pkg/ packages to dart_flutter_team_lints
Change-Id: I201b984fd8794e04bf6e0131ed4f85192f641ef4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335502
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-11-11 01:52:16 +00:00
Sigmund Cherem 95738fa095 [infra] increase timeout for loading the sdk in ddc.
This increases the timeout from 30 to 45s when using require.js.
We noticed that many tests (>50) flake on firefox due to this timeout,
so we hope that adding a bit of extra time may help reduce the
likelyhood of tests flaking for this reason.

Bug: https://github.com/dart-lang/sdk/issues/53991

Change-Id: I3dd952d5dd42c8644f96a636df9a7cd486312ad6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335503
Auto-Submit: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2023-11-11 00:56:49 +00:00
Brian Quinlan a826354365 Document that writeAsBytes truncates values beyond 0..255
Closes https://github.com/dart-lang/sdk/pull/53782

GitOrigin-RevId: 5453268e4ebad23c4085efbab78b53cec551930d
Change-Id: I7804cbe65c93bc34f56db6da7bc68aa1ef4e9303
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330944
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2023-11-10 23:54:40 +00:00
Kenzie Schmoll 5c9186fc1c Update DevTools rev to fec80c6e29b627aa17e8b15f72cb4013a28d14ec
Change-Id: Ie85ea8dd75fe9556b4a73aaf3b9537970578d12b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335409
Reviewed-by: Elliott Brooks <elliottbrooks@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
2023-11-10 22:04:32 +00:00
Elliott Brooks 25c35a8538 Update DWDS commit hash
Bug: https://github.com/dart-lang/webdev/issues/2276
Change-Id: I554bbb70a83ee135770b2d21eac11892fae9ef7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335408
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Elliott Brooks <elliottbrooks@google.com>
2023-11-10 21:58:12 +00:00
Ömer Sinan Ağacan 3939bf3dad [dart2wasm|js] Add element size tests for typed array to JS conversions
Change-Id: Ie7fe21630044ff2e76eee7a58fd22c95fcfd2f2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335041
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2023-11-10 21:25:25 +00:00
Sam Rawlins f2a001d2fd Reland: Improve file structure of linter files.
There is much code in pkg/analyzer/lib/src/lint which is only used by
_tests_ and _tools_ in the linter package. This CL attempts to tidy up
the separation of linter lib code and non-lib code by moving some
files, and moving some source elements, which are only used in tests,
or in tools.

I originally dug into this because I saw `LinterOptions` has a public late field
(dangerous):

`late file_system.ResourceProvider resourceProvider;`

It turns out this field is only initialized in tests and tools, and
then it's read by multiple methods, and it just so happens those
methods are only called during tests or in tools.

Summary of changes:

* Mark LintDriver and DartLinter classes as only used for linter tools
  and tests.
* Remove CamelCaseString class.
* Mark `DartLinter.lintPubspecSource` as `@visibleForTesting`.
* LinterOptions: mark `enabledLints` and `analysisOptions` final, and remove
  `resourceProvider`.
* Remove SourceLinter; it was only used in a few `engine_test.dart` tests in
  linter, but all uses could be replaced with DartLinter.
* Remove linter's `bin/linter.dart`; it is not meant to be used as any sort of
  user entrypoint. The main method is moved to `cli.dart`.
* Move linter's `lib/src/cli.dart` to `tool/cli.dart`.
* analyzer's top-level function `lintFiles`, classes ErrorWatchingSink
  and FileGlobFilter are moved to linter's tool/ directory.
* Delete the engine_test.dart tests which only validate basics of
  linter's old entrypoint.

This reverts commit d1bc88de8f.

Change-Id: I1063aa72c640ad8ab62f76bf89f665cb8b9952dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334645
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-11-10 21:25:11 +00:00
asiva 43e4bc4682 [VM] Address flakiness in
SafepointRwLockExclusiveNestedWriter_Regress44000 test

Should address https://github.com/dart-lang/sdk/issues/44947

TEST=ci

Change-Id: Ib04ed675a59e8ed7635d7888a97e8ce5ef79764f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335580
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2023-11-10 21:06:10 +00:00
Nicholas Shahan b82465111c [test,ddc] Update library test to use static method
The test was relying on the runtime type representation to verify
that the library object returned from `getLibrary` was correct. Now
it uses the static `print()` method instead to avoid issues in the new
type system.

Change-Id: Iaa26427e46afd0e7f4ae0a84cb4c123755484647
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335023
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-11-10 20:39:00 +00:00
Nate Biggs b9e25afcb4 [dart2js] Stop emitting a dill with closed world.
All transformations to the dill are now performed with the CFE linker phase (phase0b). This means we no longer need to emit a dill as part of the closed world computation. This saves both time and memory resources associated with the cost of serialization during that phase.

Change-Id: I28dde8a1eecd71e823880027505f62fc804fcca6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332821
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-11-10 20:38:34 +00:00
Nate Biggs fdfca11d39 [dart2js] Move Dart2js const conditional simplifier to phase 0b, the CFE linker.
Change-Id: I9ed7f46c5641c28dc71b7712dbd4e8d2062b1f4d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332820
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-11-10 20:38:34 +00:00
Nate Biggs bebd08746b [dart2js] Evaluate CFE consts as part of phase 0b (CFE linker).
Constants are current evaluated in a few places during closed world generation, primarily as part of the ScopeModelBuilder. The scope visitor was modifying the AST which meant we had to emit a new dill with these evaluated constants along with the closed world results.

This change instead evaluates the constants directly after linking the Kernel as part of the global transformations. This means we can update the ScopeModelBuilder to not mutate the AST at all as all constants are already simplified.

A potential follow up here is to simplify the ScopeModelBuilder since all nodes should already be simplified if they can be, we should be able to avoid visiting some children.

After this change we only directly create a single ConstantEvaluator, the one in `load_kernel`. The const simplifier also creates one and a follow up CL moves this to to run right after this new transformation.

Note: Alternate versions of this CL tried to make the global transformation simpler by either:
1) Running the const evaluator indiscriminately on all expressions. This didn't work because it lead to exponential computation on constants set up as a DAG (see tests/language/const/constant_dag_test).
2) Only evaluating ConstantExpression nodes to update UnevaluatedConstants. This does not cover all the cases where the ScopeModelBuilder is modifying the tree and lead to a different compiler output.

Change-Id: I746d889b37feddc9ab6c386c6252016dec745e6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332601
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-11-10 20:38:34 +00:00
Nate Biggs a32d78c13d [dart2js] Rename global and modular Kernel transformers.
Change-Id: I1160143f0cc4b71629efd484083fee8ce35b22e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334340
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-11-10 20:38:34 +00:00
Srujan Gaddam 2c5cd7820f [CFE] Add support for indexing extension types
Adds an index for extension types and their members. Refactors
some members in this file to better reflect what's being indexed.

Change-Id: Ic397a5bfe1a8f9671a92f82c94f023faeeb5acac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332861
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-11-10 19:28:00 +00:00
Ryan Macnak 63aaca8c9a [build] Switch to Fuchsia core SDK.
build/fuchsia/gn-sdk is a copy of the current GN SDK with paths adjusted.
The rest of build/fuchsia comes from Flutter.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/38752
Change-Id: I192cca955d05991bde3931d053df9835c5a2195d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334142
Reviewed-by: Zijie He <zijiehe@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-11-10 19:23:11 +00:00
Parker Lougheed 4830c96420 [linter] Add changelog entries for removed unrelated type lints
Change-Id: Ia55b403ef35e6ee252d36c9a86f797e0e39de1f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335540
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Parker Lougheed <parlough@gmail.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-11-10 19:06:42 +00:00
Keerti Parthasarathy 69cf1dfa5c Start adding tests for package platform migrations
based off https://github.com/lrhn/platform.dart/blob/18312f7a48586e92a196c27c1001a1e57297f44e/migration-guide.md

Change-Id: I29d3227fdf6b01faf6ddad4133aac9079ec3b994
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335327
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-11-10 17:44:18 +00:00
Sam Rawlins d6749acf09 analyzer: Fix comment reference in source
`AnalysisContext.getContents` is not a thing.

Change-Id: Ieec4d91ee0480278b1a0bc83d3156e7a815c3ffb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335325
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-11-10 17:12:40 +00:00
Sergey G. Grekhov 8bcb6ec804 [co19] Roll co19 to 306f82e85b3d9e596eed38d36cbef369643515c0
2023-11-10 sgrekhov22@gmail.com dart-lang/co19#2361. Improve some flaky tests on Web (dart-lang/co19#2364)
2023-11-10 sgrekhov22@gmail.com dart-lang/co19#2350. Add more factory constructor tests. Part 3 (dart-lang/co19#2363)
2023-11-09 sgrekhov22@gmail.com dart-lang/co19#2349. Add more tests for constant constructors of the extension types (dart-lang/co19#2352)
2023-11-09 sgrekhov22@gmail.com Fixes dart-lang/co19#2361. Fix flaky tests on web-platforms (dart-lang/co19#2362)
2023-11-08 sgrekhov22@gmail.com dart-lang/co19#2359. Update tests according to the new nullability rules. Part 1 (dart-lang/co19#2360)
2023-11-07 sgrekhov22@gmail.com Fixes dart-lang/co19#2356. Fix return type of `this` (dart-lang/co19#2358)
2023-11-07 sgrekhov22@gmail.com dart-lang/co19#2350. Update existing factory constructor tests. Part 2 (dart-lang/co19#2357)
2023-11-03 sgrekhov22@gmail.com Fixes dart-lang/co19#2339. Add tests that extension can't have name `type` (dart-lang/co19#2340)
2023-11-03 sgrekhov22@gmail.com dart-lang/co19#2346. Add expected error in analyzer (dart-lang/co19#2347)

Change-Id: I6c0e1e9612dc4a0e21c4d506fa682ae1e9b98ea9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335461
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-11-10 16:56:05 +00:00
Ömer Sinan Ağacan a332c17c50 [dart2wasm] Refactor JSCM typed list class hierarchy
- Add mixins to the implementation classes rather than the base classes.
  This makes `this.member` calls in the mixed-in members direct calls
  and allows inlining.

- Make immutable classes subclasses of mutable classes. This makes sure
  we have one `[]` implementation per typed list type and allows
  inlining `[]`.

- Implement specialized iterators for each typed list. This allows
  unboxed and unchecked iteration of array elements.

# Final class hierarchy:

- `final class JSARrayBufferImpl implements ByteBuffer`:
  The JS `ArrayBuffer` class.

- `final class JSDataViewImpl implements ByteData`:
  The JS `DataView` class.

- `abstract class JSArrayBase implements TypedData`:
  Base class for all typed array classes. Implements common operations
  on the the `DataView` `externref`.

## Array classes

- `_IntListMixin`:
  Implements `List<int>` operations. Declares unchecked getters and
  setters and uses them when possible for performance.

- `_UnmodifiableIntListMixin`:
  Overrides only `get buffer`, `[]=`, and `setRange` to convert a
  `List<int>` implemented with `_IntListMixin` to unmodifiable.

- `JSUint8ArrayImpl extends JSArrayBase with _IntListMixin implements Uint8List`:
  The `Uint8Array` class.

- One class as above for `Int8Array`, `Uint16Array` etc.

- `UnmodifiableJSUint8Array extends JSUint8ArrayImpl with _UnmodifiableIntListMixin implements UnmodifiableUint8ListView`:
  Same as `JSUint8ArrayImpl`, but made immutable with
  `_UnmodifiableIntListMixin`.

- One class as above for the rest of the int arrays.

- `double` classes have the same structure as the `int` classes.

## Iterator classes

To allow fast iteration with `get iterator`, each array class has its
own iterator class. Compared to a generic iterator shared by all
classes, these classes (1) do direct (instead of virtual) and unchecked
(instead of bound checked) calls to read the elements (2) avoid boxing
the `current` elements by having a field with the right non-nullable
type, `int` or `double`.

# Benchmarks

In a benchmark that decodes a 1.3M large protobuf:

- Before: 35.9 seconds.
- After: 3.2 seconds.

(Remaining performance issues in this benchmark are in the
`dart:convert` implementation for JSCM, which I will be optimizing
separately)

Change-Id: I5f29882600c1ca95972e2a62af22b181787cb73a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334465
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2023-11-10 16:40:11 +00:00
Johnni Winther 1807debf84 [cfe] Add test for issue 53539
Closes #53539

Change-Id: Ib9453c9bbf3c39d8b4aaa13f72e7e954c3774e28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335445
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2023-11-10 13:56:28 +00:00
Johnni Winther c3cecaa791 [cfe] Add test for issue 53720
Closes #53720

Change-Id: I8c704ca47d089a2352414defd1e7fc6f96b52d03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335463
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-11-10 13:52:22 +00:00
Johnni Winther 6830cafbff [cfe] Add test for issue 53607
Closes #53607

Change-Id: I5b636d11c65b7fc9ef77a0dccbc4b44090112024
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335466
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-11-10 13:48:25 +00:00
Johnni Winther e15806ae42 [cfe] Add test for issue 52542
Closes #52542

Change-Id: I18105107faff642a6a0932eb0537ec02dfb5823b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335468
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-11-10 13:44:20 +00:00
Johnni Winther cd58ce5030 [cfe] Add test for issue 53740
Closes #53740

Change-Id: I14edfcd610366bd0f759030e1eb0dd057fbbaeae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335443
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-11-10 13:40:19 +00:00
Alexander Thomas 57724af73a [test] Prepare symbolic links test for the removal of _2 suites
Bug: b/310114753
Change-Id: Id39362d267c9967ab679456c6f891700196f9170
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335444
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2023-11-10 11:45:16 +00:00
Johnni Winther 1f86f34c5c [dartdevc] Add id-testing support in ddc
This adds id-testing support to dartdevc and uses it to add a
scope_test for the DartScope created for expression compilation.

Change-Id: I861092e17807190880bd20e4e39e012fbf0cbe53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334220
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2023-11-10 10:49:56 +00:00
Johnni Winther 519b342cc6 [cfe] Erasure extension types in constants
Closes #53936

TEST=added testcases

Change-Id: I0457bed4c9ed3d242549bba328eabb2b03825227
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334463
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-11-10 10:42:51 +00:00
Ömer Sinan Ağacan 75c975fe6d [dart2wasm] Remove stringref target
stringref target won't be used any time soon (probably ever). To help
with build times and avoid keeping it updated remove it for now.

Change-Id: I0df33b7ab2e19bae5090e8ea32ea6a3dc3751652
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334881
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2023-11-10 09:49:37 +00:00
Johnni Winther ad768fb480 [cfe] Handle generic extension types from dill
Closes #53780
Closes #53270

Change-Id: Ie1530e4d2d9bf77d17c1795fd514303e3e474b1b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333826
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-11-10 06:57:50 +00:00
Johnni Winther e6fa7c9003 [cfe] Add test for issue 53822
Closes #53822

Change-Id: Iece860cce2f6e38e652ea95995e6c823cfdb5177
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334464
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-11-10 06:57:29 +00:00
Konstantin Shcheglov 8db273daf2 Macro. Add synthetic class constructors after running declaration macros.
Bug: https://github.com/dart-lang/language/issues/3459
Change-Id: I051978e2045f83e7980974e92998bdfb1c5cd2ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335383
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-11-10 05:34:17 +00:00
Konstantin Shcheglov 497e4e3be5 Macro. Run Observable() example, field declaration from node.
Change-Id: I31eb9c8aa0ff5e4ce4742d493d374fd05e0a527e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335380
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-11-10 05:30:38 +00:00
Sigmund Cherem 751a47f942 [tests][web-fixit] Fix date_time_extremes_test.
The test creates DateTime objects reusing the data from another
DateTime object, but on one case it didn't include the seconds and
milliseconds value.

When using the minimum date value, this omission made the copy to be
out of range, and as a result returned an InvalidDate.

Change-Id: I83f1d8a755e8d3a78ef0fd0468ee80e162c10545
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335400
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2023-11-10 02:00:18 +00:00
Sigmund Cherem 1cba9f344c [tests] Skip multiple html and co19/html tests.
All tests skipped here are flaking or timing out. Most of them fail for
a common reason tracked in
https://github.com/dart-lang/sdk/issues/53985: Chrome inactive tabs do
not run behave the same as active tabs. This means that interactions like
css transitions, requestAnimationFrame, and video play don't work as
expected.

This CL skips the tests only on Chrome, but continues to run them in
other browsers where the expectation is met.  If we can in the future
ensure tests are run on an active tab, we can consider reneabling these
tests. That said, the value of this tests was higher when we mantained
Dartium, but these days we may consider deleting them instead.

Change-Id: I9c0ea230fecca16fa008b64c2cf316ccdd0f53e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335030
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2023-11-10 01:20:39 +00:00
Konstantin Shcheglov 40a5f6f756 Add comment for NodeTextExpectationsCollector.updatingIsEnabled
Change-Id: I199516779c4e8662ebb2850664877dee56a6e680
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-11-10 00:19:06 +00:00
Sam Rawlins 706663ac5e analyzer: Document DisplayStringBuilder and clean up fields.
* `skipAllDynamicArguments` was always false; remove.
* `withNullability` and `multiline` are both unused outside the class;
  make them private.

Change-Id: Ic869abc1f76d0cc59e9feaffe969a24ea1deb363
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335360
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Kallen Tu <kallentu@google.com>
2023-11-09 23:13:59 +00:00
Alexander Aprelev e0751fb8aa [gardening] Use Platform.lineTerminator in remove_error_listener_test expectations.
Follow-up to https://dart.googlesource.com/sdk/+/088b178d9d464a3e89e6467dff37d80d4170e7fd

Fixes https://github.com/dart-lang/sdk/issues/54007
TEST=ci

Change-Id: I507de90fb46641af06890d052af0f8db29363473
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335326
Auto-Submit: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2023-11-09 22:54:03 +00:00
Konstantin Shcheglov 0ab26a7751 Extension type. Issue 53935. Update constant evaluation.
Bug: https://github.com/dart-lang/sdk/issues/53935
Bug: https://github.com/dart-lang/sdk/issues/53751
Change-Id: I514c79c79c9229b7fed313712b8f1d7a3ed91ca7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334862
Reviewed-by: Kallen Tu <kallentu@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-11-09 22:42:20 +00:00
pq 4dcdfc57d6 enable flutter_style_todos
(The bulk of these fixes where auto-applied by `dart fix`)

Change-Id: I5476294ca63ee6584ee07af1ae448db7ba07760e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335324
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-11-09 22:01:47 +00:00