Commit graph

101369 commits

Author SHA1 Message Date
Konstantin Shcheglov d047d44bf0 Macro. Issue 55611. Support for type parameters as diagnostic targets.
Bug: https://github.com/dart-lang/sdk/issues/55611
Change-Id: I429de25be81f8d51bfe57131e19ffb4ad737f467
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368700
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-05-29 19:58:09 +00:00
Derek Xu b53b6b7f0b [DDS] Start running tests that are currently getting skipped
The test runner only runs files that end with "_test.dart". This is
evidenced by
https://dart-current-results.web.app/#/filter=pkg/dds/test&showAll
not showing any results for the tests renamed in this CL.

The tests renamed in this CL were found by runnning
`find pkg/dds/test | sed "/.*_test[.]dart/d"`

Some changes had to be made to
pkg/dds/test/client_resume_approvals_no_longer_require_permission_test.dart
after renaming it, the other tests did not have to be changed after
getting renamed.

Change-Id: Ib3b30ba784b182e4cc014d93aa5d8a792f8bb457
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367700
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2024-05-29 19:56:57 +00:00
Ryan Macnak f72f43096c [standalone] Increase AppJIT alignment to 64k.
Linux ARM64 may have a page size of 4k, 16k, or 64k.

Cf. 935b69e676.

TEST=no 64k device available
Bug: https://github.com/flutter/flutter/issues/148659
Change-Id: I1894db74bc61719f7deb2537bc3ff17168644ed1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368525
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-05-29 19:35:29 +00:00
Devon Carew b3178802df Bump http to 6337ee3f6d1f641192ba40e133f27085c69aa815
Changes:
```
> git log --format="%C(auto) %h %s" 7df2ac8..6337ee3
 https://dart.googlesource.com/http.git/+/6337ee3 Mark flutter .metadata files as generated (1214)
 https://dart.googlesource.com/http.git/+/bd18656 Add a skeleton package:ok_http (1212)
 https://dart.googlesource.com/http.git/+/a2e241b [cronet_http] Apply relevant rules with the ProGuard (1204)
 https://dart.googlesource.com/http.git/+/0937562 Allow `1000` as a WebSocket close code (1211)
 https://dart.googlesource.com/http.git/+/f361779 Ready cupertino_http 1.5 for publish (1210)
 https://dart.googlesource.com/http.git/+/4726f43 Integrate cronet_http with `package:http_profile` (1167)
 https://dart.googlesource.com/http.git/+/46d49e3 Integrated cupertino_http with package_http_profile (1079)
 https://dart.googlesource.com/http.git/+/ad2e827 Remove files that are covered by .gitignore (1208)
 https://dart.googlesource.com/http.git/+/4b65331 Update `topics` in package "http" (1205)
 https://dart.googlesource.com/http.git/+/1a1b939 Add explanation about why `package:web_socket` exists (1207)

```

Diff: https://dart.googlesource.com/http.git/+/7df2ac8488ec69ee5945ae188625c0e820c4f63c..6337ee3f6d1f641192ba40e133f27085c69aa815/
Change-Id: I82cad825074618b1bac30a3b8cf71cb6f0424ac7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368680
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2024-05-29 19:30:38 +00:00
Jelle van der Waa 18b40a3b27 replace logging.warn with logging.warning
Closes https://github.com/dart-lang/sdk/pull/55843

GitOrigin-RevId: e0a5f9c2cc42bb7d977bb2e41f8e872c44ef6990
Change-Id: Ie7ecc2a86ea1ac9fa57ff2c50c50363c577e819e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368203
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2024-05-29 19:07:56 +00:00
Devon Carew 9c5085ec5b [deps] rev args, async, benchmark_harness, boolean_selector, collection, dartdoc, markdown, shelf, web, web_socket_channel, webdev
Revisions updated by `dart tools/rev_sdk_deps.dart`.

args (cf90551..b3608bd):
  b3608bd  2024-05-28  Kevin Moore  bump lints dep and fix (dart-lang/args#275)

async (77a25d7..f933ddf):
  f933ddf  2024-05-28  Kevin Moore  bump lints dep and fix (dart-lang/async#275)

benchmark_harness (accc755..6fa42b0):
  6fa42b0  2024-05-28  Kevin Moore  bump lints dep and fix (dart-lang/benchmark_harness#106)

boolean_selector (2cbd4a6..84467e5):
  84467e5  2024-05-28  Kevin Moore  bump lints dep and fix (dart-lang/boolean_selector#61)

collection (4718398..fe2e800):
  fe2e800  2024-05-28  Kevin Moore  bump lints dep and fix (dart-lang/collection#344)

dartdoc (1e1a004..ed97585):
  ed975850  2024-05-28  Sam Rawlins  Fix flutter CI with re-internalized snippets tool (dart-lang/dartdoc#3776)

markdown (340c76f..c1013dc):
  c1013dc  2024-05-28  Kevin Moore  update lints dependency (dart-lang/markdown#613)
  7a3b8d6  2024-05-28  Sam Rawlins  Bump to 7.2.3 (dart-lang/markdown#612)

shelf (d9f82bf..338962c):
  338962c  2024-05-28  Kevin Moore  update lints dependency (dart-lang/shelf#433)

web (d776645..f6f778b):
  f6f778b  2024-05-28  Kenzie Davisson  Expose `onUnload` event stream and `ElementStream` as a public class (dart-lang/web#246)
  e1d5148  2024-05-23  Kevin Moore  Update MDN source and doc comments (dart-lang/web#244)
  53862f1  2024-05-22  Kevin Moore  update lints dependency (dart-lang/web#243)
  7604578  2024-05-21  Srujan Gaddam  Only emit APIs that are standards track and not experimental (dart-lang/web#239)

web_socket_channel (45b8ce9..afd1e3c):
  afd1e3c  2024-05-23  Brian Quinlan  Remove `--fatal-infos` from `dart pub downgrade` analysis (dart-lang/web_socket_channel#367)
  cb20b71  2024-05-23  Sarah Zakarias  Add `topics` to `pubspec.yaml` (dart-lang/web_socket_channel#362)
  8514229  2024-05-22  Kevin Moore  Bump and fix lints (dart-lang/web_socket_channel#366)

webdev (fc32eb6..1bed26a):
  1bed26ab  2024-05-28  Elliott Brooks  Add a reload handler along with a restart handler (dart-lang/webdev#2439)
  15028c4f  2024-05-24  Elliott Brooks  Register a restart handler directly over the VM service connection (dart-lang/webdev#2437)

Change-Id: I4e80ae77b6e74b9cd0b5524b1ba66e0f3de0a14e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368445
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
2024-05-29 17:50:09 +00:00
Helin Shiah 70988840f2 Add type Event ot postEvent
IntelliJ expects a "type" field for events; otherwise the JSON will not be parsed correctly. This came up as part of making the widget rebuild table in DevTools clickable (https://github.com/flutter/devtools/issues/4564)

I'm not totally sure this is the change I need, as I don't know how to test this out end-to-end (build Dart SDK and put into Flutter SDK, then run an app with these changes in DDS?). I think it's right because I'm modifying a spot that was first added in https://dart-review.googlesource.com/c/sdk/+/304981, which added `postEvent` in dds_service_extension.

Change-Id: I9a78903dca7855896b6a9b9c3f9e1d62dcb7099e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368202
Reviewed-by: Dan Chevalier <danchevalier@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-05-29 17:49:34 +00:00
Paul Berry 9ee7bb59f9 Remove OperationsCfe.omittedNullabilityValue.
There is no functional change, because all callers were passing
`Nullability.nonNullable`.

Change-Id: Iaaf6a69362079343ebef5c8097a2885ef1788c4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368500
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-05-29 16:56:09 +00:00
Danny Tuppeny 6549a66a50 [dds/dap] Remove unnecessary runZonedGuarded when started DDS
Now that https://github.com/dart-lang/sdk/issues/55731 is fixed, this zone is not required to handle failures connecting to DDS.

Change-Id: I4d309e6ef0f555be39744d1509584fafe13ceb78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368567
Commit-Queue: Helin Shiah <helinx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Helin Shiah <helinx@google.com>
2024-05-29 16:23:52 +00:00
pq 2250404330 quick fix for ABSTRACT_STATIC_METHOD
Change-Id: I3452e0eb48900f146e531504039ab15976742aa5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368444
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-05-29 14:32:28 +00:00
Jens Johansen 727796e692 [kernel] Fix uri on some constants
Change-Id: I8b23563df3765bb076c851179bdbb02ad70671bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368402
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-05-29 14:01:32 +00:00
Paul Berry ed4f2425f5 Update pre-NNBD TypeSchemaEnvironmentTest to use NNBD libraries.
Since legacy libraries are no longer supported, the only remaining
functionality that this test exercises is the behavior of legacy
("star") types (which can still occur in unsound mode builds). This
functionality can be tested equally well regardless of whether the
containing library has null safety enabled.

By switching the test over so that the containing library has null
safety enabled, we remove the last piece of code that was configuring
libraries in legacy mode. This will pave the way for removing support
for legacy libraries from the type system, which will in turn make it
easier to share type system logic between the analyzer and front end.

Change-Id: I32495e59a1b6680b1f13407c4199df9e09f6d6a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367364
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2024-05-29 13:49:21 +00:00
Martin Kustermann 5963c95f47 [dart2wasm] Unskip lib/async/stream_periodic3_test
Closes https://github.com/dart-lang/sdk/issues/50901

Change-Id: If0d4cc4160fc038c93ee6d2357eb185dd42e5a17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368564
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-05-29 12:48:24 +00:00
Martin Kustermann 698bf0846b [vm] Hoist CStringUniquePtr out of Utils, add CAllocUniquePtr` to simplify code
Hoist `CStringUniquePtr` out of the `Utils` class as there
is no reason it has to be nested inside a class - it just makes
code more verbose.

This simplifies code of the form
   std::unique_ptr<T, decltype(std::free)> a = { nullptr, std::free };
to
   CAllocUniquePtr<T> a;

TEST=ci

Change-Id: Ice42c1b16dfa5b20b321c13fbe5b28b3918581cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368425
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2024-05-29 10:16:28 +00:00
Daco Harkes a8dcef9173 [vm/ffi] Fix callback void returns
The void case was removed in
https://dart-review.googlesource.com/c/sdk/+/353101/68/runtime/vm/compiler/frontend/kernel_to_il.cc#b5594

The void case is handled in `FfiConvertPrimitiveToNative`, but the
null check should not happen for void.

It doesn't seem to reproduce for me locally, but the bug report and
workaround are clear about what error is thrown.
TEST=No idea why it's not reproducing.

Bug: https://github.com/flutter/flutter/issues/149017
Change-Id: Ifbffa501af904a0d2268d0e4e19a9145e6c694cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368341
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2024-05-29 09:58:02 +00:00
Ömer Sinan Ağacan b9216c5804 [dart2wasm] Remove unused diagnosticReporter argument
Change-Id: Ia9ba761773b1d246886c1cf15196dcb7bb8015a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368401
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2024-05-29 08:21:05 +00:00
Ryan Macnak 12e5feec19 Restore ARM32 GCC testing.
Bug: https://github.com/dart-lang/sdk/issues/52080
Bug: https://github.com/dart-lang/sdk/issues/55669
Change-Id: Ic248f9f25e4fa2a6ed4471eff57062c5eb2d8af1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367641
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-05-28 22:50:19 +00:00
pq bcc35a8d15 quick fix for ABSTRACT_STATIC_FIELD
Change-Id: I4311b1d6341432e5e1ccb18d516dc08cf34f7abd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368520
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-05-28 22:39:47 +00:00
Ryan Macnak 1a9acb9171 [vm, ffi] Make callbacks profiler-safe.
Delay changing Thread::vm_tag on callback entry and restore the tag early on callback return so that the profiler doesn't see the "running Dart" tag unless it can also see the fake return address marking the entry frame.

TEST=ffi/async_void_function_callbacks, ffi/function_callbacks_subtype, ffi/function_callbacks, ffi/isolate_local_function_callbacks
Bug: https://github.com/dart-lang/sdk/issues/52814
Change-Id: I40d80ec7c44063d078db0e211565e2d127c6b81e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367460
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-05-28 21:16:41 +00:00
Danny Tuppeny 761b4288a1 [analyzer] Update the correction message for IMPORT_OF_NOT_AUGMENTATION
Change-Id: I4d136c10719450a5e9ea46c7cb4d6b3d085a4d83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368422
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-05-28 19:46:33 +00:00
Danny Tuppeny d328e9c06a [analysis_server] Add highlights/semantic tokens for augmented()
+ tests for fetching semantic tokens for macro-generated sources.

Change-Id: I1811e5fd3eb3f5564a1d6f21348f9650e30eb536
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368421
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-05-28 19:39:16 +00:00
Konstantin Shcheglov cae5e3b4c3 Prepare to publish analyzer 6.5.1 and _fe_analyzer_shared 69.0.0
After https://dart-review.googlesource.com/c/sdk/+/368460

Change-Id: I9013bf67b820b3e47ab00c9607a043b254f588eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368441
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-05-28 19:38:28 +00:00
Danny Tuppeny 3833a7bd3e [dartdev]/[analysis_server] Report server errors to "dart analyze" to prevent misleading output for parse/analysis exceptions
If analysis failed due to an exception, "dart analyze" may still report "no issues found" because it didn't get any server errors.

It didn't get server errors for a number of reasons:

1. Analysis errors were silent (see https://github.com/dart-lang/sdk/issues/39284)
2. `server` in ErrorNotifier was always `null` because the code that set it did so too early
3. `ErrorNotifier` was never added to the instrumentation service, so never got called anyway

Additionally, "dart analyze" printed "No errors found!" even if server errors occurred (as long as the server didn't crash).

This change fixes up the server reference in ErrorNotifier, adds it to the instrumentation service and uses a new flag ("--disable-silent-analysis-exceptions") to allow opting-in to getting analysis errors to the client. It also updates "dart analyze" to not print "No errors found!" (and to not use a 0 exit code) when server errors occur.

Because this change "fixes" ErrorNotifier, it's possible that with this change clients will now get additional error notifications (non-silent exceptions that were being dropped previously) which could result in users seeing more errors - but presumably errors that should have been reported before anyway.

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

Change-Id: I4948117c78b8f382550b7641076de443250bba6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358902
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-05-28 19:10:40 +00:00
Sam Rawlins 500a8c0a72 linter: Make some allowances in avoid_catches_without_on_clauses
Fixes https://github.com/dart-lang/linter/issues/3023

This fix is a little unusually large because I have to add some
elements to both the mock flutter package, and the mock SDK. This
affects some completion tests.

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I44b68754f756cfe1cf99518957d74c4af56043f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-05-28 18:36:58 +00:00
Sam Rawlins 97d4d12dc0 meta: Add TargetKinds for @immutable; narrow error range for "invalid annotation" warnings.
This change looks big, and this is because we change the range of all
of the "INVALID_x_ANNOTATION" from the whole annotation (like
`@Immutable("...")`) to just the annotation identifier (like
`Immutable`). This affects many tests.

The error range is changed so that we can consistently use the
`RemoveAnnotation` fix to fix these warnings; it just needs a
consistent error node, so that it can find the Annotation node above.

All this to support `TargetKind`s for `@immutable`, so that we can
remove the custom "INVALID_IMMUTABLE_ANNOTATION" message.

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: Ifd64e154986b6cbcbafeb9420ca8d0949653e618
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367881
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-05-28 18:28:49 +00:00
Parker Lougheed 238a29d8a1 [analyzer] Mark latest FFI diagnostic docs as published
Change-Id: I1582ee1dc8c3618ccea60853843c729bb30f05e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368361
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-05-28 14:48:32 +00:00
Parker Lougheed 687a1d5a43 [linter] Fix formatting of noop_primitive_operations docs
Fixes https://github.com/dart-lang/site-www/issues/5867

Change-Id: I618199e38dfb524f0a4caeb2b01b498c63411064
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368360
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2024-05-28 14:47:36 +00:00
Jake Macdonald 77490aacc7 update macros and _macros versions to reflect breaking change for implementations
Change-Id: Ia60631c494de0e5f8a286275c056ce0c3026410a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368460
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2024-05-28 14:40:29 +00:00
pq 27883e748a quick fix for MIXIN_SUBTYPE_OF_FINAL_IS_NOT_BASE
Change-Id: I3a7edf5290b542abadaee8b007d2786c43a54c17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367986
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-05-28 14:39:32 +00:00
Martin Kustermann 647c039d56 [infra] Update firefox to 126.0
Change-Id: Icd255b46d9374f45287b014d87870b8c7fa7fa39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368404
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-05-28 13:32:19 +00:00
Martin Kustermann 7b61a7c888 [dart2wasm] Remove deprecated --omit-type-checks/--dart-sdk options from dart2wasm
Flutter no longer uses the --dart-sdk option (see [0]).
g3 usages will be removed in [1]


[0] https://github.com/flutter/flutter/pull/149129
[1] cl/637819163

Change-Id: Ic06bb30da45428367ddcbfaf165c8f046dcbaaa0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368306
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-05-28 12:35:57 +00:00
Martin Kustermann 8aa5e2dbca [dart2wasm] Remove pkg/dart2wasm/README.md and move remaining things into pkg/dart2wasm/docs/*.md files
* removes duplicate list of options in readme file (that is available
  via `--help` already)

* add more information about checkout, namely the custom vars for
  `.gclient`

* moves remaining 2 sections into their own pkg/dart2wasm/docs/*.md file

Change-Id: I9a505b7a37cdfe6e3745933410dd1ba309e50c3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368305
Reviewed-by: Ömer Ağacan <omersa@google.com>
2024-05-28 11:36:40 +00:00
Martin Kustermann 004d6a3fad [dart2wasm] Remove experimental warning for dart compile wasm and make dart compile --help show the wasm subcommand
Closes https://github.com/dart-lang/sdk/issues/32894

Change-Id: Ief15c21bb28de8df6ef9aefbb8891d9af9368626
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368307
Reviewed-by: Ömer Ağacan <omersa@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-05-28 11:02:48 +00:00
Simon Binder 78f2e16cc9 Add asInstanceOf to StaticType introspection capabilities
This adds `asInstanceOf` to `StaticType`, which tries to find the
instantiation of a given class so that a `StaticType` becomes a subtype
of it.
To actually make use of that data, the definition of `NamedStaticType`
is expanded to contain information about the resolved type identifier
and the type arguments instantiating the class.

Change-Id: I4f7b05d9e44f5228863ef875545286b5cd7f9a41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348920
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Morgan :) <davidmorgan@google.com>
2024-05-28 10:56:55 +00:00
Sigurd Meldgaard 5ae66feaac Mention workspaces in CHANGELOG
Change-Id: I6c2fe0f87292402f5af1399fc6fb4706c32dead6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368342
Reviewed-by: Sarah Zakarias <zarah@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2024-05-28 10:07:09 +00:00
Jens Johansen f22752f661 [kernel] Give better error message if crashing on .location
In for instance https://github.com/flutter/flutter/issues/148668 we
crash on .location, but don't have anything to go on about why that is.
This CL adds more information (e.g. the url, and - in the particular
crash - it would also have added the name of the procedure it got the
uri from).

If this will actually be enough (once a crash comes in with this info)
to fix the issue, I'm don't know, but it should give us more to go on.

Change-Id: Iceab6f7841380d59aa39f26a728fd8fcad90ffb6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368303
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-05-28 07:28:59 +00:00
Ömer Sinan Ağacan a0f1bd5a4b Update test for #45060
Equal types should have the same hash, but they are not necessarily
identical.

Update the test to remove the identity check between a constant type and
a type constructed in runtime.

Change-Id: I0d6c6395c587391d3087c26b00fff36d645b33dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368340
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2024-05-28 07:10:39 +00:00
Sam Rawlins cf4550718f DAS: Move CorrectionProducer and Selection classes
Work towards https://github.com/dart-lang/sdk/issues/53402

None of the classes which were moved are changed in any way.

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: If81098971de044e2f69c1039ec23eff07b108af6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368066
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-05-28 04:54:08 +00:00
Chloe Stefantsova 991fbf4aca [cfe] Avoid concurrent modification in delayed action processing
Closes https://github.com/flutter/flutter/issues/148611

Change-Id: Idb091df6d771f286428809326e65ac6203f09d49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368301
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2024-05-27 13:11:55 +00:00
dependabot[bot] 9a7e07aca0 Bump github/codeql-action from 3.25.5 to 3.25.6
Closes https://github.com/dart-lang/sdk/pull/55846

GitOrigin-RevId: 94c89fafc90542b8b81056f9ffcaaee12e77eda4
Change-Id: Id9140855246167ceb968692b04fab41154a3be72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368280
Reviewed-by: Alexander Thomas <athom@google.com>
2024-05-27 12:19:44 +00:00
Martin Kustermann 827a7c4e95 [dart2wasm] Only perform compile-time lookup in constant list if index is in-bounds
We have an optimization that will do list lookups at compile time when
the receiver is a constant list and the index is a constant integer.

=> We should only perform this optimization if index is in-bounds.
=> If it's out-of-bounds it should be a [RangeError] thrown at runtime
   (if that code is ever executed)

Closes https://github.com/dart-lang/sdk/issues/55817

Change-Id: I3e99cdd96c79e7ff3f490babb2d52131cbd83a88
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368302
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2024-05-27 11:52:48 +00:00
Johnni Winther 85ab16ff67 [cfe] Add OffsetMap
This adds OffsetMap to avoid using names (or other means) to
connect objects/builders created in the OutlineBuilder with the
DietListener. The OffsetMap uses offsets, through Tokens or
Identifiers, as the key for the created objects.

Change-Id: I704d8f8374402463ea741e36ed15b279acb85535
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366942
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-05-27 08:12:34 +00:00
Ivan Inozemtsev 72b2883c6f Revert "[js_runtime, js_dev_runtime] Implement microsecond field of DataTime"
This reverts commit fb057ea4e0.

Reason for revert: b/342552853

Original change's description:
> [js_runtime, js_dev_runtime] Implement `microsecond` field of `DataTime`
>
> - Move DateTime implementation for dart2js and DDC into a shared place to reduce duplication.
>
> - Add a _microsecond field to the web DateTime to track microseconds outside of the JavaScript Date.
>
> - The cute dart2js optimization whereby `DateTime.now().millisecondsSinceEpoch` is compiled to `Date.now()` still works.
>
> - Both implementations report better errors.
>
> - Fixed VM bug with in-range sentinel.
>
>
> Change-Id: I9156255bdb6ecc195500ae9bc88f91fb315b6297
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366963
> Reviewed-by: Alexander Aprelev <aam@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Lasse Nielsen <lrn@google.com>
> Commit-Queue: Stephen Adams <sra@google.com>

Change-Id: I58572256a7710df4589bb5e41c7afee295c2388b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368103
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Auto-Submit: Ivan Inozemtsev <iinozemtsev@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2024-05-27 07:54:14 +00:00
Johnni Winther a3f83a9e44 [vm] Generate VM platform dill in strong mode
This changes the VM platform dill from agnostic to strong. The
VM no longer supports weak mode, so agnostic is not needed.

TEST=existing

Change-Id: I85defb6aec15262b71b4f1c199e77bd356826332
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366670
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2024-05-27 07:52:24 +00:00
Sam Rawlins cf7a697aa5 DAS: Run the shadowing test
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: Ie7ab482018ecc6c74ac8fd9f3bb533f33ed3bd62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368240
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-05-25 05:31:18 +00:00
Sam Rawlins f07e042eaf linter: Fix avoid_types_on_closures for inference cases
Fixes https://github.com/dart-lang/linter/issues/1099
Fixes https://github.com/dart-lang/linter/issues/3330

We just add a check that the (approximate) context type is a function type.

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I56fe14ff8852375754fdaf6b92b3c632b7df9c95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367982
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-05-25 05:28:39 +00:00
pq aa28753491 quick fix for MIXIN_SUBTYPE_OF_BASE_IS_NOT_BASE
Change-Id: I0a397f3aa1fd697014ff20debfbe08a1ea2f62e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368181
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-05-24 22:26:58 +00:00
Parker Lougheed a768742545 [linter] Clarify that none can be specified to disable highlighting
Fixes https://github.com/dart-lang/site-www/issues/5861

Change-Id: Ic0dfdded5f38f1de4a19a7b41e52f87f3f9b9cef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368221
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-05-24 22:11:51 +00:00
Konstantin Shcheglov f42b019f43 Macro. Support for 'extendsType'.
Change-Id: Ic913d26b630f2d2f22fd6c4dec25ed27814d9f8a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368201
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-05-24 21:38:51 +00:00
Jake Macdonald 0ee590e954 stop importing util.dart, it isn't supported (imports dart:mirrors)
Change-Id: I1dd4d650ace0866e3ef88655582c7edfcf946d01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368222
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-05-24 21:27:04 +00:00