Commit Graph

1468 Commits

Author SHA1 Message Date
Robert Nystrom 061e843207 Roll dart_style into the SDK.
This doesn't roll the latest dart_style main branch in because that has some style changes and there are other style changes still in flight. I want to roll all of those in all in one batch later.

Instead, this brings in a single commit whose parent is the current dart_style commit in the SDK. That commit contains only a fix for a crash bug when an analysis_options.yaml file contains an include pointing to a non-existent file. See:

https://github.com/dart-lang/dart_style/pull/1855

This gets the main branch in sync with the stable branch which has a cherry-pick with that same fix.

Change-Id: I97e3adec1c93175d372bb972989fe6a2860cf31f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510222
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2026-06-09 07:07:06 -07:00
Sam Rawlins d7d118f75e linter: Fix bug in no_dynamic_casts w.r.t. Object? for-loop variable
I discovered this bug while migrating Flutter to the new lint rule.

Change-Id: I7944adff58299907e50bf0b2af3b992ec25721ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510142
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-06-08 15:04:42 -07:00
Mateus Felipe C. C. Pinto 890e259cfd Update release date for version 3.12.0
Closes https://github.com/dart-lang/sdk/pull/63502

GitOrigin-RevId: b2797fd02dc2e513c86f4c10d0e6badd40ba821f
Change-Id: Ic92dcac5bab13220b8b1241d208bd4dcb2273527
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508563
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2026-06-08 02:38:40 -07:00
Sam Rawlins d33ce2f88d linter: Introduce no_dynamic_casts replacing strict-casts
Work towards https://github.com/dart-lang/sdk/issues/63527

We will want to deprecate the `analyzer/language/strict-casts` setting,
but we first need to ship an SDK to Flutter that offers the lint rule,
before we deprecate the setting, which will cause CI to fail (like a
Dart->Flutter roll).

When the deprecation is enabled, we can also ship the automated fix.

Change-Id: I0e9651171b721577acbd416d254bca3d0324f3f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509521
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-06-05 07:02:01 -07:00
Sam Rawlins 4c6fe56ae3 linter: Introduce no_raw_types replacing strict-raw-types
Work towards https://github.com/dart-lang/sdk/issues/63516

I have code here to deprecate the `analyzer/language/strict-raw-types`
setting. But I disabled it, as I realized we first need to ship an SDK
to Flutter that offers the lint rule, before we deprecate the setting,
which will cause CI to fail (like a Dart->Flutter roll).

When the deprecation is enabled, we can also ship the automated fix.

Change-Id: I17d1ea9aba96063059e37891c05d4a8bd3f02737
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509063
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2026-06-04 14:12:28 -07:00
Sam Rawlins 23ad0dc770 linter: Deprecate avoid_public_typedef_functions and one_member_abstracts
Work towards https://github.com/dart-lang/sdk/issues/59524

* avoid_private_typedef_functions - Doesn’t meet any sufficient
  criteria? I think a private typedef can certainly make local code
  more readable.
* one_member_abstracts - Low impact. This is maybe here for Java
  developers? It encourages users to use top-level functions.

Change-Id: I829acda8af0bc2bb265553e1297cd1740761b4da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508681
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-06-02 15:08:43 -07:00
Ryan Macnak 7e5b075680 Reland "[standalone] Remove the fallback root certificates."
Leave in hooks for the google3 build.

TEST=ci
Change-Id: Ib5768d27fcdbf3d4963da3d8dd142bea5fae10ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/506420
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-06-01 08:32:26 -07:00
Ryan Macnak 53733077b2 Revert "[standalone] Remove the fallback root certificates."
This reverts commit 039aef728a.

Reason for revert: b/515601247

Original change's description:
> [standalone] Remove the fallback root certificates.
>
> The discovery of the system root certificates is more robust after 2142d8e148.
>
> TEST=ci
> Change-Id: I8215cb92f98e620b82f21261c13e061a2b488b5d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/433923
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>

TEST=ci
Change-Id: Ib07de221ff1160461d930f7165a7cd8179b4e3f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/506100
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2026-05-26 07:49:52 -07:00
Ryan Macnak 039aef728a [standalone] Remove the fallback root certificates.
The discovery of the system root certificates is more robust after 2142d8e148.

TEST=ci
Change-Id: I8215cb92f98e620b82f21261c13e061a2b488b5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/433923
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-05-19 11:20:48 -07:00
Parker Lougheed 5883c3559a [changelog] Clean up and fixes for 3.12 and 3.13 entries
Change-Id: Ib065e2abf76f36cc9223edbb01c613eeea0a7083
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/503920
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2026-05-15 16:50:03 -07:00
Modestas Valauskas 754239b077 [core] Add trailingZeroBitCount and oneBitCount to int
Adds two new getters to int for bit-counting: trailingZeroBitCount
(ctz) and oneBitCount (popcount). On native platforms they operate
on the full 64-bit two's-complement representation; on the web they
operate on the least-significant 32 bits.

Implementations:
- VM: unified C++ natives Integer_trailingZeroBitCount /
  Integer_oneBitCount on _IntegerImplementation, using
  Utils::CountTrailingZeros64 and Utils::CountOneBits64. The receiver
  may be _Smi or _Mint at runtime.
- dart2js / DDC: clz32-based ctz and a SWAR popcount.
- dart2wasm: inlined i64.ctz and i64.popcnt intrinsics.

leadingZeroBitCount (clz) is intentionally excluded from this CL: its
result depends on the platform integer width (e.g. 1.leadingZeroBitCount
is 31 on web, 63 on native), and the same value can be derived from
the existing bitLength getter when needed.

Asm intrinsification on native architectures is intentionally left for
a separate follow-up CL.

Work towards https://github.com/dart-lang/sdk/issues/6486 (this CL
covers popcount and ctz from the bit-twiddling list; clz, rotate,
reverse, and others remain).

Work towards https://github.com/dart-lang/sdk/issues/1053 (efficient
BitSet implementation).

Bug: https://github.com/dart-lang/sdk/issues/52673
Bug: https://github.com/dart-lang/sdk/issues/38346
TEST=tests/corelib/int_bit_count_test

Change-Id: I8a5cdb5c91360478f47bbd6b9c84ca1c477aa8c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/498041
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Auto-Submit: Modestas Valauskas <valauskasmodestas@gmail.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2026-05-12 05:49:31 -07:00
Ivan Inozemtsev 3c1e1ddb52 Finalize the changelog before stable update
Change-Id: I3f608e935d3ce9c29aabe0cfc58f0e066199e5e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/501080
Auto-Submit: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
2026-05-06 02:34:52 -07:00
Ivan Ugryumov 6dd8ad5397 Add InterfaceAddress for broadcast address support
Closes https://github.com/dart-lang/sdk/pull/63088

GitOrigin-RevId: c72afbbbf2774fd4c3c3f83b69c30e86e4302abd
Change-Id: I2462f006dcbe2256b019c5b13674ca0d93838fc0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/492180
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2026-05-05 01:15:37 -07:00
Kallen Tu 8bfb683892 Enable 'primary-constructors' feature flag.
This CL enables the primary constructors feature by default in Dart 3.13.

The primary constructors feature is a brevity feature. There are no new semantics, but it allows us to express declarations in a less verbose way.

This feature allows one constructor and a set of instance variables to be specified in the header of a declaration.

Currently a declaration with a constructor and some fields is written as:

```dart
// Current syntax.
class Point {
  int x;
  int y;
  Point(this.x, this.y);
}
```

With a primary constructor, we would write the above as:

```
class Point(var int x, var int y);
```

If a primary constructor needs an initializer list or a body, they can be
specified inside the class using the `this` body syntax:

```dart
class Point(var int x, var int y) {
  this : assert(x >= 0) {
    print('Point created at $x, $y');
  }
}
```

As part of this feature, you can also use the `new` and `factory` keywords to
declare constructors in the class body without repeating the class name:
```dart
class Point {
  int x, y;

  // Equivalent to Point(this.x, this.y)
  new(this.x, this.y);

  // Equivalent to Point.origin()
  new origin() : x = 0, y = 0;

  // Equivalent to factory Point.clone(Point other)
  factory clone(Point other) => Point(other.x, other.y);
}
```

To learn more about the feature, check out the feature specification located here: https://github.com/dart-lang/language/blob/main/accepted/future-releases/primary-constructors/feature-specification.md

Tested: Has existing language, CFE, analyzer, analysis server tests.
Bug: https://github.com/dart-lang/sdk/issues/61524
Change-Id: I296f2fcd918b87bf2a1dd00256340759866c2423
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/489241
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2026-05-04 15:09:49 -07:00
Lasse R.H. Nielsen f35a3fcce4 Add alternatives for functions that should be deprecated.
`List.unmodifiable` and `Map.unmodifiable` is as badly typed
as `List.from` and `Map.from`, but does not have a better-typed
`.of` constructor. This adds such, to give a migration target
when deprecating the badly typed constructors.

The `Future.delayed` with no second argument is also unsafely
typed, it fails if the type argument is not nullable.
The `Future.pause` creates `Future<void>` instead.

CoreLibraryReviewExempt: No new or platform specific behavior.
Change-Id: Iba101b3dc62f412003abd501fa042aca0ce63116
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/499280
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2026-05-04 08:08:35 -07:00
Robert Nystrom 1aba9d0fa5 Roll the latest dart_style into the SDK.
This does have some style changes, so probably needs to be coordinated
with an update to the prebuilt SDK.

Change-Id: I026e9df82083b7d5cac2375a8c55d6c6f40337bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/499383
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2026-05-01 00:54:06 -07:00
Srujan Gaddam 94e1217774 Reland "[dart:js_interop] Make JSFunction and JSExportedDartFunction generic"
This is a reland of commit e7dbd6ba48

Original change's description:
> [dart:js_interop] Make JSFunction and JSExportedDartFunction generic
>
> Fixes https://github.com/dart-lang/sdk/issues/54557
>
> The generic type in JSExportedDartFunction corresponds to the
> static type of the function it wrapped, whereas for JSFunction,
> it's purely a descriptor of the JS function.
>
> When calling JSExportedDartFunction, a cast is now introduced
> to cast it to T.
>
> When calling isA, the type in JSExportedDartFunction is passed
> along to check that the value that is wrapped is that function
> type. Because the T in JSFunction is descriptive, e.g.
> isA<JSFunction<int Function()>>() does no such check.
>
> ____
>
> Also cleans up:
>
> - isA<JSTypedArray>() logic to use intrinsic functions
> - some expectation files to be consistent for both dart2js and ddc.
>
> CoreLibraryReviewExempt: Backend-specific library with needed reviews.
> Change-Id: I1a55c4386e416fa4ccabe06ac5051f41c2e2e95a
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/496820
> Reviewed-by: Lasse Nielsen <lrn@google.com>
> Commit-Queue: Srujan Gaddam <srujzs@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

CoreLibraryReviewExempt: Reland.
Change-Id: I29d706aa4967fd80390e8cb37f8144603ec007f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/498100
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2026-04-27 20:32:55 -07:00
Srujan Gaddam 442bdeda4a Revert "[dart:js_interop] Make JSFunction and JSExportedDartFunction generic"
This reverts commit e7dbd6ba48.

Reason for revert: Broke flutter_analyze

Original change's description:
> [dart:js_interop] Make JSFunction and JSExportedDartFunction generic
>
> Fixes https://github.com/dart-lang/sdk/issues/54557
>
> The generic type in JSExportedDartFunction corresponds to the
> static type of the function it wrapped, whereas for JSFunction,
> it's purely a descriptor of the JS function.
>
> When calling JSExportedDartFunction, a cast is now introduced
> to cast it to T.
>
> When calling isA, the type in JSExportedDartFunction is passed
> along to check that the value that is wrapped is that function
> type. Because the T in JSFunction is descriptive, e.g.
> isA<JSFunction<int Function()>>() does no such check.
>
> ____
>
> Also cleans up:
>
> - isA<JSTypedArray>() logic to use intrinsic functions
> - some expectation files to be consistent for both dart2js and ddc.
>
> CoreLibraryReviewExempt: Backend-specific library with needed reviews.
> Change-Id: I1a55c4386e416fa4ccabe06ac5051f41c2e2e95a
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/496820
> Reviewed-by: Lasse Nielsen <lrn@google.com>
> Commit-Queue: Srujan Gaddam <srujzs@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I98447c8c95906feb7f8f1a57859a24fc8e4966d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/498080
Commit-Queue: Alexander Aprelev <aam@google.com>
Auto-Submit: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
2026-04-24 09:31:08 -07:00
Srujan Gaddam e7dbd6ba48 [dart:js_interop] Make JSFunction and JSExportedDartFunction generic
Fixes https://github.com/dart-lang/sdk/issues/54557

The generic type in JSExportedDartFunction corresponds to the
static type of the function it wrapped, whereas for JSFunction,
it's purely a descriptor of the JS function.

When calling JSExportedDartFunction, a cast is now introduced
to cast it to T.

When calling isA, the type in JSExportedDartFunction is passed
along to check that the value that is wrapped is that function
type. Because the T in JSFunction is descriptive, e.g.
isA<JSFunction<int Function()>>() does no such check.

____

Also cleans up:

- isA<JSTypedArray>() logic to use intrinsic functions
- some expectation files to be consistent for both dart2js and ddc.

CoreLibraryReviewExempt: Backend-specific library with needed reviews.
Change-Id: I1a55c4386e416fa4ccabe06ac5051f41c2e2e95a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/496820
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2026-04-23 20:55:26 -07:00
Lasse R.H. Nielsen ab434651fa Fix cookie-date parsing to use the correct algorithm.
A prior parser change made the parsing more restrictive,
only accepting the dart formats that a cookie creator should
produce, rather than what the RFC specifies should be accepted.

Now implements the specified algorithm again.

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

Prior over-optimisitc breaking change: https://dart-review.googlesource.com/c/sdk/+/448383

Change-Id: I4ed7cf2368d04063e0fc563ff8e64904bf0d3e1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/496080
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2026-04-22 06:13:58 -07:00
Khanak Khandelwal 862f948650 Fix private named parameters example in CHANGELOG
Closes https://github.com/dart-lang/sdk/pull/63203

GitOrigin-RevId: 349a1c4b5408356679b3b8c86f0c265dd0492c58
Change-Id: I583d7c5fe409bce718bbf70ed37d43e1f0b13887
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/496400
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2026-04-17 13:59:07 -07:00
Sam Rawlins 8d19f6b2ed CHANGELOG notes for Dart 3.12 for analyzer
Change-Id: I153a2bf91f381a4a61ac31eccc6f73f7b512c457
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/493489
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2026-04-08 14:20:59 -07:00
Sam Rawlins 82bcae5657 [release] Increase version on main to 3.13
Change-Id: Ice6dfd3b694637da4e20529af9374fece32eda4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/491821
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-04-08 01:10:34 -07:00
Natalie Weizenbaum d863706259 Add JS iterable types
Closes https://github.com/dart-lang/sdk/pull/62610

GitOrigin-RevId: 63f5c6eddcd2e3f6ef88656c34d67df68c053c12
Change-Id: I74556b1bd8241e1de344d4f73ca76cfea7167de6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/478704
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Jackson Gardner <jacksongardner@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2026-04-06 13:30:46 -07:00
kevmoo a2db0bd018 Add simple_directive_paths lint and fix
Fixes https://github.com/dart-lang/sdk/issues/62948

Implement a new experimental lint `simple_directive_paths` that flags
non-minimal paths in import and export directives. This includes
redundant `./` segments, backtracking `../` that can be simplified,
and un-normalized `package:` URIs.

An associated automated fix is provided to simplify these paths.
Tests are included for both the lint and the fix, covering various
scenarios inside and outside the `lib/` directory.

Change-Id: I4375547f48cc30d5375c7bdaf699ceba312df5b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/489700
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2026-03-27 21:43:26 -07:00
Srujan Gaddam 81320bc337 Fix libraries header in changelog
Fixes https://github.com/dart-lang/sdk/issues/62902

`### Libraries` was duplicated, this removes one of the
extraneous ones.

Change-Id: I228437a19daa58025f2c4e2dd53d8f6fb9d6194c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/488381
Reviewed-by: Kevin Moore <kevmoo@google.com>
Auto-Submit: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2026-03-16 15:19:09 -07:00
Sigurd Meldgaard 24a7ac636f Bump pub to 74408212b5348003381bc63f3b59274aaa23cfa3
Changes:
```
> git log --format="%C(auto) %h %s" 26c6985..7440821
 https://dart.googlesource.com/pub.git/+/74408212b Bump actions/stale from 10.1.1 to 10.2.0 in the github-actions group (4788)
 https://dart.googlesource.com/pub.git/+/ac14a82d0 Finish override logic (4780)
 https://dart.googlesource.com/pub.git/+/26d41b4f6 Handle both tagged and lightweight tags in tag patterns (4781)
 https://dart.googlesource.com/pub.git/+/701d535d3 Make applicationConfigHome conditional, avoid it when dart:io is unavailable (4779)
 https://dart.googlesource.com/pub.git/+/526635f32 IOOverrides using package:file for testing (4774)
 https://dart.googlesource.com/pub.git/+/970c4f7c9 Wrap platform (4778)
 https://dart.googlesource.com/pub.git/+/3b6317778 Test for gzipDecoder (4772)
 https://dart.googlesource.com/pub.git/+/d60133739 Wrap path (4775)
 https://dart.googlesource.com/pub.git/+/eac9e600d 'Add @TestOn('vm') to all tests (4769)
 https://dart.googlesource.com/pub.git/+/e1d6f0679 Remove skipped feature test (4773)
 https://dart.googlesource.com/pub.git/+/27a584dcd Stop sending X-Pub headers (4764)
 https://dart.googlesource.com/pub.git/+/143730e76 Introduce platform-agnostic gzipDecoder abstraction (4768)
 https://dart.googlesource.com/pub.git/+/0062dc9b9 Support Git LFS for git dependencies (4761)
 https://dart.googlesource.com/pub.git/+/2ec22ec97 Allow (and prefer) using @ instead of : in `pub add` and `pub unpack` (4759)
 https://dart.googlesource.com/pub.git/+/d3d0824ab Fix path-activated packages not picking up source changes (4748)
 https://dart.googlesource.com/pub.git/+/54a30dd79 Bump analyzer from 10.0.1 to 10.0.2 (4750)
 https://dart.googlesource.com/pub.git/+/1d9b56e2f Bump meta from 1.17.0 to 1.18.1 (4751)

```

Diff: https://dart.googlesource.com/pub.git/+/26c6985c742593d081f8b58450f463a584a4203a..74408212b5348003381bc63f3b59274aaa23cfa3/
Change-Id: I53e9723c511561e9e7c4b10fdb41db00cc157e56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/484580
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Auto-Submit: Sigurd Meldgaard <sigurdm@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2026-03-06 08:07:17 -08:00
Srujan Gaddam b24f3cce3c [linter/dart2wasm] Add new check for catch clauses in invalid_runtime_check_with_js_interop_types
Now that JS exceptions are caught as JS interop values in Dart,
we should warn users on the pitfalls of including a JS interop
type in the catch clause, and instead advise them to use `isA`
to do type-checks.

dart2wasm dry-run is updated to capture this lint.

There's also some minor wording changes in the lint guidance now
that `isA` can be executed on any value.

Change-Id: I65779951f2ff3f7dacfb915f3b105541c1f9a9b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/483960
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2026-03-02 08:21:30 -08:00
Srujan Gaddam 0615d3a467 [dart:js_interop] Make isA<JSExportedDartFunction>() check that it's a wrapped function
Closes https://github.com/dart-lang/sdk/issues/62573

isA<JSExportedDartFunction>() used to just check if the object
was a function, leading to a possible runtime error if `toDart`
is called. Fixes that by introducing some helpers and moving
around some functions in the JS compilers to other internal
libraries (public members can't be added to
js_allow_interop_patch.dart). Also fixes a minor issue in dart2js
where `allowInterop`ed functions could successfully invoke
`JSExportedDartFunction.toDart`.

CoreLibraryReviewExempt: Documentation change.
Change-Id: I5a9d7c31d3143eb3fb6ebd3273a4bf06ca329479
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/482967
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2026-02-24 10:40:43 -08:00
Sam Rawlins f5949231ce analyzer: add note about new mustBeConst tear-off warning
Change-Id: Ibdb8708bf882f84211b4b61487204971c412b234
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/482980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
2026-02-23 11:04:18 -08:00
Ryan Macnak e443b89f23 [vm] Update Irregexp to V8 commit 254cc758346f10be2a7e22e55d90d4defe9cad74.
Includes support for modifier spans and duplicate named capture groups.

Drops the flow graph implementation to ease maintenance.

TEST=corelib/regexp
Bug: https://github.com/dart-lang/sdk/issues/56573
Bug: https://github.com/dart-lang/sdk/issues/61337
Bug: https://github.com/dart-lang/sdk/issues/62349
Bug: https://github.com/dart-lang/sdk/issues/62708
Change-Id: I05640ba945a4fa5476e7ad463738f4f39d842c14
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/480121
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-02-23 09:54:47 -08:00
Srujan Gaddam 29af7aa641 Clarify scope of breaking change of isA
https://github.com/dart-lang/sdk/commit/9f367b170941868927e4c1fad3f6f629c1ba52fb
is only breaking if the user referred to the extension
names directly, so we should clarify that in the changelog.

Change-Id: Ibaff9227dc9ffd0bbd7c2e7cd21e7bd9da124204
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/482081
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Auto-Submit: Srujan Gaddam <srujzs@google.com>
2026-02-20 17:02:28 -08:00
Srujan Gaddam 9f367b1709 [dart:js_interop] Expand isA to Object?
Fixes https://github.com/dart-lang/sdk/issues/56905

Instead of just supporting isJSAny and isJSObject, we
can support isA for all objects. Depending on the static
type, we include an intrinsic _isJSAny function first in
the transformation. For fast paths for JSObjects, we also
now call an intrinsic function which has the added benefit
of now correctly returning true for objects with no prototype.

The intrinsic functions in dart2wasm need to be careful to
not treat ExternalDartReferences as JS values, so JSValue
is amended to include a field that determines if the value
is a Dart value (and caches it if not set already). JSValue
constructions are updated to pass false for this field if
we know for sure this value isn't an externalized Dart value.

CoreLibraryReviewExempt: Backend-specific function changes.
Change-Id: Ib2a6e74b4130632791375fcda9a5b85198ad64af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/478241
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2026-02-19 14:10:32 -08:00
Robert Nystrom c82716b216 Enable "private-named-parameters" experiment flag.
TEST=many language, co19, and other tests

Bug: https://github.com/dart-lang/sdk/issues/61629
Change-Id: I24d761cc2dc3fa2707a2486a39bfde1b8e847b1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/480384
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Morgan :) <davidmorgan@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2026-02-18 15:26:18 -08:00
Nate Biggs d0eb238f1f [dart2wasm] Update deferred module embedding to faciltate batched module fetching.
With `loadDeferredModule` there was no easy way for the embedder to batch module loads that were part of the same load ID. The loop happened within the wasm runtime and so the best the embedder could do was a `setTimeout(f, 0)` and collect the modules before making a request. This can lead to unintended delays though.

Instead we now pass the full list of modules to the embedder's registered loader along with an instantiator function so that the emebedder can start compiling concurrently before all the modules are done loading.

Added a changelog entry since this API is new but might be in use.

Change-Id: I4ae3a9fc28fc726909f63a1dd4ea1d98d5fc3fc0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/481360
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2026-02-18 08:58:28 -08:00
Sigurd Meldgaard 41f1293766 Move changelog notice to correct version
In https://dart-review.googlesource.com/c/sdk/+/476761 I accidentally put this notice under the wrong version header.

Change-Id: Ifd0a0d1610f8304ad976258151f71fdc6fcdd95e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/478940
Auto-Submit: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Jonas Jensen <jonasfj@google.com>
2026-02-06 05:01:47 -08:00
Sam Rawlins 14f2edb906 add CHANGELOG entry for Dart 3.10.9
b/480851924

Change-Id: I99f30ee63c8645a1df969c9cd2dbc9c04d9f1582
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/477942
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-02-04 12:03:28 -08:00
Sigurd Meldgaard 86132e7602 Bump pub to ed2628f65de5d54922e2d34ebbcb1bafa8c93cc2
Changes:
```
> git log --format="%C(auto) %h %s" db5c3c0..ed2628f
 https://dart.googlesource.com/pub.git/+/ed2628f65 Make cache repair only repair packages from package_config.json by default (4744)

```

Diff: https://dart.googlesource.com/pub.git/+/db5c3c06b21098fcf7e9e5acb8a9e6f5dd15b2fe..ed2628f65de5d54922e2d34ebbcb1bafa8c93cc2/
Change-Id: Ia21871f87bd04f5e1505c988be57b9e8b53fb720
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/476761
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2026-02-02 01:14:58 -08:00
Robert Nystrom 76370ada08 Get CHANGELOG ready for 3.11.
Add a section noting there are no language changes.

Couple of minor copy-edits and format tweaks.

Change-Id: I42d258044696a09ea3847afd11a476dd253b2799
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/476320
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2026-01-29 11:26:22 -08:00
Ivan Inozemtsev 5536cac9c4 [release] Increase version on main to 3.12
Change-Id: I278eb371cd7e8d776a71c1c6f6920b9d0f5598bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/460043
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2026-01-07 00:02:21 -08:00
Sam Rawlins f81eee2ac4 analyzer: More CHANGELOG notes
Change-Id: If696fd117f5ec1b45a43c89df3b256dc2fad213f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/470806
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2026-01-06 09:25:47 -08:00
Natalie Weizenbaum 9947e20c36 Add additional definitions to JSSymbol
Closes https://github.com/dart-lang/sdk/pull/61917

GitOrigin-RevId: 16c03048f0108a22a36713513ea646cf43d89e87
Change-Id: Ia2f7d79d3e1048da7684da2a55eda0266c57489f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/460141
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2025-12-22 09:50:26 -08:00
Nicholas Shahan 03bb1c75d6 [ddc] Use correct async timing on deferred imports
The correct async timing is now always enabled by default.

Change-Id: Ic7489668af14e1acd6069019121e0ff381f0c8a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/467442
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2025-12-15 10:08:39 -08:00
Sam Rawlins 04753f6565 analyzer: Deprecate the avoid_null_checks_in_equality_operators lint rule
Work towards https://github.com/dart-lang/sdk/issues/59514

We introduced a new Warning called NON_NULLABLE_EQUALS_PARAMETER a few releases ago. It warns when the parameter of an `operator ==` override has a nullable type:

> The parameter type of '==' operators should be non-nullable.

I didn't realize it at the time, but that new warning, plus null safety, basically replace the `avoid_null_checks_in_equality_operators` lint rule. This rule reports doing any null-check work on a nullable parameter of an `operator ==` override.

Change-Id: Ibd8139cd5804a9ccb6cc07d2187c9305a336c7cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/467922
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-12-12 19:06:29 -08:00
Sam Rawlins 4aa853ad72 analyzer: Add a CHANGELOG entry for Dart 3.11 and analysis_server_plugin
Change-Id: Id3505a7ff5070969ad4480f6698991c0814dc655
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/467383
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-12-10 11:15:32 -08:00
Sigurd Meldgaard 3b071a67cb Bump pub to b297f1f5e42f2569f15a98548f44b4b9a48487c1
This is a reland of https://dart-review.googlesource.com/c/sdk/+/461823 that
was reverted in https://dart-review.googlesource.com/c/sdk/+/462680 with a fix
of the breaking glob behavior.

Changes:
```
> git log --format="%C(auto) %h %s" f7f1891..b297f1f
 https://dart.googlesource.com/pub.git/+/b297f1f5e Bump http from 1.5.0 to 1.6.0 (4715)
 https://dart.googlesource.com/pub.git/+/7990c26b9 Bump crypto from 3.0.6 to 3.0.7 (4705)
 https://dart.googlesource.com/pub.git/+/32af2f163 Don't use the glob mechanism to parse pre-glob workspace entries (4711)
 https://dart.googlesource.com/pub.git/+/b8bd825ba new command `pub cache gc` (4684)
 https://dart.googlesource.com/pub.git/+/5215714f2 Bump analyzer from 8.4.0 to 9.0.0 (4709)
 https://dart.googlesource.com/pub.git/+/28791d3fe Bump actions/stale from 9.1.0 to 10.0.0 in the github-actions group (4686)
 https://dart.googlesource.com/pub.git/+/bd89adfcf feat: Add --ignore-warnings flag to pub publish --dry-run (4698)
 https://dart.googlesource.com/pub.git/+/8a6c0677a Don't attempt to fetch advisories when --offline (4697)
 https://dart.googlesource.com/pub.git/+/bda151fc9 Bump analyzer from 8.3.0 to 8.4.0 (4693)
 https://dart.googlesource.com/pub.git/+/b52f176e7 Bump analyzer from 8.2.0 to 8.3.0 (4689)
 https://dart.googlesource.com/pub.git/+/4e68fd984 Workspaces glob support (4680)
 https://dart.googlesource.com/pub.git/+/acf54b8d1 Give sdk tagging action write permissions (4688)
 https://dart.googlesource.com/pub.git/+/c6695f8d2 Refactor/login (4583)
 https://dart.googlesource.com/pub.git/+/ba02edbd3 Merge pull request 4685 from sigurdm/merge-cp_example
 https://dart.googlesource.com/pub.git/+/58668b7e2 Merge remote-tracking branch 'origin/cp_example' into merge-cp_example
 https://dart.googlesource.com/pub.git/+/52f512315 Handle all examples in workspace with flag `--example` (4679)

```

Diff: https://dart.googlesource.com/pub.git/+/f7f1891e2de3d795532f45ec214f88ac912ffcd6..b297f1f5e42f2569f15a98548f44b4b9a48487c1/
Change-Id: I35616197e7bd2898d82a189234346fef7aae3a42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/464420
Reviewed-by: Sarah Zakarias <zarah@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2025-11-25 04:35:52 -08:00
Sigurd Meldgaard 9ca248e945 Revert "Bump pub to 5215714f2319d22094acc7f0feeec4a4cb1c4c34"
This reverts commit a74050ecb1.

Reason for revert: Broke some tests. Will investigate

Original change's description:
> Bump pub to 5215714f2319d22094acc7f0feeec4a4cb1c4c34
>
> Changes:
> ```
> > git log --format="%C(auto) %h %s" f7f1891..5215714
>  https://dart.googlesource.com/pub.git/+/5215714f2 Bump analyzer from 8.4.0 to 9.0.0 (4709)
>  https://dart.googlesource.com/pub.git/+/28791d3fe Bump actions/stale from 9.1.0 to 10.0.0 in the github-actions group (4686)
>  https://dart.googlesource.com/pub.git/+/bd89adfcf feat: Add --ignore-warnings flag to pub publish --dry-run (4698)
>  https://dart.googlesource.com/pub.git/+/8a6c0677a Don't attempt to fetch advisories when --offline (4697)
>  https://dart.googlesource.com/pub.git/+/bda151fc9 Bump analyzer from 8.3.0 to 8.4.0 (4693)
>  https://dart.googlesource.com/pub.git/+/b52f176e7 Bump analyzer from 8.2.0 to 8.3.0 (4689)
>  https://dart.googlesource.com/pub.git/+/4e68fd984 Workspaces glob support (4680)
>  https://dart.googlesource.com/pub.git/+/acf54b8d1 Give sdk tagging action write permissions (4688)
>  https://dart.googlesource.com/pub.git/+/c6695f8d2 Refactor/login (4583)
>  https://dart.googlesource.com/pub.git/+/ba02edbd3 Merge pull request 4685 from sigurdm/merge-cp_example
>  https://dart.googlesource.com/pub.git/+/58668b7e2 Merge remote-tracking branch 'origin/cp_example' into merge-cp_example
>  https://dart.googlesource.com/pub.git/+/52f512315 Handle all examples in workspace with flag `--example` (4679)
>
> ```
>
> Diff: https://dart.googlesource.com/pub.git/+/f7f1891e2de3d795532f45ec214f88ac912ffcd6..5215714f2319d22094acc7f0feeec4a4cb1c4c34/
> Change-Id: I34d6c0d1a7b9c17bcfafe7609e46b71253f2eb4b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/461823
> Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
> Reviewed-by: Sarah Zakarias <zarah@google.com>

No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Ic64d4011876753202e44810e4ab05e03eefc5471
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/462680
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Sarah Zakarias <zarah@google.com>
Reviewed-by: Sarah Zakarias <zarah@google.com>
Auto-Submit: Sigurd Meldgaard <sigurdm@google.com>
2025-11-18 05:10:47 -08:00
Sigurd Meldgaard a74050ecb1 Bump pub to 5215714f2319d22094acc7f0feeec4a4cb1c4c34
Changes:
```
> git log --format="%C(auto) %h %s" f7f1891..5215714
 https://dart.googlesource.com/pub.git/+/5215714f2 Bump analyzer from 8.4.0 to 9.0.0 (4709)
 https://dart.googlesource.com/pub.git/+/28791d3fe Bump actions/stale from 9.1.0 to 10.0.0 in the github-actions group (4686)
 https://dart.googlesource.com/pub.git/+/bd89adfcf feat: Add --ignore-warnings flag to pub publish --dry-run (4698)
 https://dart.googlesource.com/pub.git/+/8a6c0677a Don't attempt to fetch advisories when --offline (4697)
 https://dart.googlesource.com/pub.git/+/bda151fc9 Bump analyzer from 8.3.0 to 8.4.0 (4693)
 https://dart.googlesource.com/pub.git/+/b52f176e7 Bump analyzer from 8.2.0 to 8.3.0 (4689)
 https://dart.googlesource.com/pub.git/+/4e68fd984 Workspaces glob support (4680)
 https://dart.googlesource.com/pub.git/+/acf54b8d1 Give sdk tagging action write permissions (4688)
 https://dart.googlesource.com/pub.git/+/c6695f8d2 Refactor/login (4583)
 https://dart.googlesource.com/pub.git/+/ba02edbd3 Merge pull request 4685 from sigurdm/merge-cp_example
 https://dart.googlesource.com/pub.git/+/58668b7e2 Merge remote-tracking branch 'origin/cp_example' into merge-cp_example
 https://dart.googlesource.com/pub.git/+/52f512315 Handle all examples in workspace with flag `--example` (4679)

```

Diff: https://dart.googlesource.com/pub.git/+/f7f1891e2de3d795532f45ec214f88ac912ffcd6..5215714f2319d22094acc7f0feeec4a4cb1c4c34/
Change-Id: I34d6c0d1a7b9c17bcfafe7609e46b71253f2eb4b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/461823
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Sarah Zakarias <zarah@google.com>
2025-11-18 02:22:42 -08:00
Michael Thomsen 9cdaa88747 Document stable support for hooks in CHANGELOG
Closes https://github.com/dart-lang/sdk/pull/61958

GitOrigin-RevId: c2cb88673a0ca0a835cbeb9c6a0ceebc79fb45cf
Change-Id: Ie10d29e8045025d5eb4293e74844523895ad58f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/461740
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2025-11-13 03:54:59 -08:00
Ivan Inozemtsev 14e69a1494 Add planned release date to 3.10 log entry
Change-Id: I35491be47146441438057c45803372d276a4885e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/459802
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
2025-11-06 04:48:09 -08:00