Skip to content

chore: update dependency dart to v3.8.0 #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Aug 11, 2024

This PR contains the following updates:

Package Update Change
dart (source) minor 3.4.4 -> 3.8.0

Release Notes

dart-lang/sdk (dart)

v3.8.0

Compare Source

Released on: 2025-05-20

Language

Dart 3.8 adds null-aware elements to the language. To use them, set
your package's [SDK constraint][language version] lower bound to 3.8
or greater (sdk: '^3.8.0').

Null-Aware Elements

Null-aware elements make it easier to omit a value from a collection literal if
it's null. The syntax works in list literals, set literals, and map literals.
For map literals, both null-aware keys and values are supported. Here is an
example a list literal written in both styles, without the null-aware elements
language feature and with it:

String? lunch = isTuesday ? 'tacos!' : null;

var withoutNullAwareElements = [
  if (lunch != null) lunch,
  if (lunch.length != null) lunch.length!,
  if (lunch.length case var length?) length,
];

var withNullAwareElements = [
  ?lunch,
  ?lunch.length,
  ?lunch.length,
];

Full details are in the feature specification.

Libraries
dart:core
  • Added Iterable.withIterator constructor.
dart:io
  • Added HttpClientBearerCredentials.
  • Updated Stdout.supportsAnsiEscapes and Stdin.supportsAnsiEscapes to
    return true for TERM containing tmux values.
dart:html
  • Breaking change: Native classes in dart:html, like HtmlElement, can no
    longer be extended. Long ago, to support custom elements, element classes
    exposed a .created constructor that adhered to the v0.5 spec of web
    components. On this release, those constructors have been removed and with
    that change, the classes can no longer be extended. In a future change, they
    may be marked as interface classes as well. This is a follow up from an
    earlier breaking change in 3.0.0 that removed the registerElement APIs. See
    #​53264 for details.
dart:ffi
  • Added Array.elements which exposes an Iterable over the Array's content.
Tools
Analyzer
  • The analyzer now supports "doc imports," a new comment-based syntax which
    enables external elements to be referenced in documentation comments without
    actually importing them. See the
    documentation

    for details.
  • Code completion is improved to offer more valid suggestions. In particular,
    the suggestions are improved when completing text in a comment reference on a
    documentation comment for an extension, a typedef, or a directive (an import,
    an export, or a library). Additionally, instance members can now be suggested
    in a documentation comment reference.
  • Offer additional assist to wrap a Flutter widget with a FutureBuilder widget.
  • Add a quick assist to wrap with ValueListenableBuilder.
  • Add a quick fix to convert an (illegal) extension field declaration into a
    getter declaration.
  • Add a quick fix to help code comply with a few lint rules that encourage
    omitting types: omit_local_variable_types,
    omit_obvious_local_variable_types, and omit_obvious_property_types.
  • Add a quick fix to create an extension method to resolve an "undefined method
    invocation" error.
  • Renaming a closure parameter is now possible.
  • Renaming a field now adjusts implicit this references in order to avoid
    name collisions.
  • Renaming a field formal parameter now properly renames known super-parameters
    in subclasses in other libraries.
  • Renaming a method parameter now properly renames across the type hierarchy.
  • The "encapsulate field" quick assist now works on final fields.
  • The "inline method" refactoring now properly handles inner closures.
  • The quick fix that adds names to a show clause or removes names from a
    hide clause can now add or remove multiple names simultaneously, in order to
    resolve as many "undefined" errors as possible.
  • The "remove const" quick fix now operates on more types of code.
  • The "add missing required argument" quick fix can now add multiple missing
    required arguments.
  • Add a new warning that reports an import or export directive with multiple
    show or hide clauses, which are never necessary.
  • Add a quick fix for this warning.
  • Add LSP document links for lint rules in analysis options files.
  • Add LSP document links for dependency packages in pubspec files.
  • Fix various issues around patterns, like highlighting, navigation, and
    autocompletion.
  • Add the [use_null_aware_elements][use_null_aware_elements] lint rule.
  • Add the experimental [unnecessary_ignore][unnecessary_ignore] lint rule.
  • (Thanks @​FMorschel for many of the above
    enhancements!)
Dart Development Compiler (dartdevc)

In order to align with dart2js semantics, DDC will now throw a runtime error
when a redirecting factory is torn off and one of its optional non-nullable
parameters is provided no value. The implicit null passed to the factory will
not match the non-nullable type and this will now throw.

In the future this will likely be a compile-time error and will be entirely
disallowed.

Dart to Javascript Compiler (dart2js)

Removed the --experiment-new-rti and --use-old-rti flags.

Dart Native Compiler

Added cross-compilation for the Linux x64 and Linux ARM64 target platforms.

Dart format

In 3.7.0, we released a largely rewritten formatter supporting a new
"tall" style. Since then, we've gotten a lot of feedback and bug
reports and made a number of fixes in response to that.

Features

Some users strongly prefer the old behavior where a trailing comma will be
preserved by the formatter and force the surrounding construct to split. That
behavior is supported again (but off by default) and can enabled by adding this
to a surrounding analysis_options.yaml file:

formatter:
  trailing_commas: preserve

This is similar to how trailing commas work in the old short style formatter
applied to code before language version 3.7.

Bug fixes
  • Don't add a trailing comma in lists that don't allow it, even when there is
    a trailing comment (#​1639).
Style changes

The following style changes are language versioned and only affect code whose
language version is 3.8 or later. Dart code at 3.7 or earlier is formatted the
same as it was before.

  • Allow more code on the same line as a named argument or =>.

    // Before:
    function(
      name:
          (param) => another(
            argument1,
            argument2,
          ),
    );
    
    // After:
    function(
      name: (param) => another(
        argument1,
        argument3,
      ),
    );
  • Allow the target or property chain part of a split method chain on the RHS of
    =, :, and =>.

    // Before:
    variable =
        target.property
            .method()
            .another();
    
    // After:
    variable = target.property
        .method()
        .another();
  • Allow the condition part of a split conditional expression on the RHS of =,
    :, and =>.

    // Before:
    variable =
        condition
        ? longThenBranch
        : longElseBranch;
    
    // After:
    variable = condition
        ? longThenBranch
        : longElseBranch;
  • Don't indent conditional branches redundantly after =, :, and =>.

    // Before:
    function(
      argument:
          condition
              ? thenBranch
              : elseBranch,
    )
    
    // After:
    function(
      argument:
          condition
          ? thenBranch
          : elseBranch,
    )
  • Indent conditional branches past the operators.

    // Before:
    condition
        ? thenBranch +
            anotherOperand
        : elseBranch(
          argument,
        );
    
    // After:
    condition
        ? thenBranch +
              anotherOperand
        : elseBranch(
            argument,
          );
  • Block format record types in typedefs:

    // Before:
    typedef ExampleRecordTypedef =
        (
          String firstParameter,
          int secondParameter,
          String thirdParameter,
          String fourthParameter,
        );
    
    // After:
    typedef ExampleRecordTypedef = (
      String firstParameter,
      int secondParameter,
      String thirdParameter,
      String fourthParameter,
    );
  • Eagerly split argument lists whose contents are complex enough to be easier
    to read spread across multiple lines even if they would otherwise fit on a
    single line.

    The heuristic is that the argument list must contain at least three named
    arguments, some of which are nested and some of which are not.

    // Before:
    TabBar(tabs: [Tab(text: 'A'), Tab(text: 'B')], labelColor: Colors.white70);
    
    // After:
    TabBar(
      tabs: [
        Tab(text: 'A'),
        Tab(text: 'B'),
      ],
      labelColor: Colors.white70,
    );

v3.7.3

Compare Source

Released on: 2025-04-16

This is a patch release that:

  • Fixes a performance regression in the analysis server (issue #​60335).

v3.7.2

Compare Source

Released on: 2025-03-12

This is a patch release that:

  • Fixes a bug in dart2wasm that imports a js-string builtin function with a
    non-nullable parameter type where it must use a nullable one (issue #​59899).

v3.7.1

Compare Source

Released on: 2025-02-26

This is a patch release that:

  • Fixes a bug in the DevTools network profiler that was causing network
    traffic to be dropped (issue #​8888).
  • Fixes a bug in DDC that prevents code from compiling when it includes
    factory constructors containing generic local functions (issue #​160338).
  • Fixes a bug in the CFE that didn't correctly mark wildcard variables
    in formal parameters, causing the wildcard variables to appear in
    variable lists while debugging (issue #​60121).

v3.7.0

Compare Source

Released on: 2025-02-12

Language

Dart 3.7 adds wildcard variables and inference using
bounds
to the language. To use
them, set your package's [SDK constraint][language version] lower
bound to 3.7 or greater (sdk: '^3.7.0').

Wildcard Variables

Local variables and parameters named _ are now non-binding and they can
be declared multiple times without collisions. You will no longer be able to use
these variables nor access their values. All wildcard variable declaration types
that have this behavior are described in the
wildcard variables specification.

Top-level variables, top-level function names, type names, member names, etc.
are unchanged. They can be named _ and used as they are today.

These are a few examples of where wildcard variables can be used:

Foo(_, this._, super._, void _()) {}

main() {
  var _ = 1;
  int _ = 2;

  list.where((_) => true);
}
Inference Using Bounds

With the inference using bounds feature, Dart's type inference
algorithm generates constraints by combining existing constraints with
the declared type bounds, not just best-effort approximations.

This is especially important for F-bounded types, where inference
using bounds correctly infers that, in the example below, X can be
bound to B. Without the feature, the type argument must be specified
explicitly: f<B>(C()):

class A<X extends A<X>> {}

class B extends A<B> {}

class C extends B {}

void f<X extends A<X>>(X x) {}

void main() {
  f(B()); // OK.

  // OK with this feature. Without it, inference fails after detecting
  // that C is not a subtype of A<C>.
  f(C());

  f<B>(C()); // OK.
}

The feature is described in more details in the
inference using bounds specification.

Other Language Changes
  • Breaking Change #​56893: If a field is promoted to the type Null
    using is or as, this type promotion is now properly accounted for in
    reachability analysis. This makes the type system more self-consistent,
    because it mirrors the behavior of promoted local variables. This change is
    not expected to make any difference in practice.
Tools
Analyzer
  • Add a new 'Go to imports' command to find the import directives that export a
    declaration.
  • Assists and quick fixes that add an import now consider the
    prefer_relative_imports and always_use_package_imports lint rules.
  • Add a new fix that converts a ~/ operation into /, when the ~/
    operation is not available.
  • Add a fix that wraps an expression in await if the expression is currently
    not assignable, but awaiting it would make it assignable.
  • Assists and quick fixes that convert a forEach call into a for-loop now
    consider the prefer_final_in_for_each and always_specify_types lint
    rules.
  • Add an additional fix to correct a cascade_invocations lint rule violation.
  • Offer additional assists to wrap a Flutter widget with an Expanded widget,
    and with a Flexible widget.
  • Offer an assist to "inline" an else-block's inner if-statement with the
    else-block to read else if.
  • Add a fix to use_decorated_box by swapping the Container with
    ColoredBox as suggested by the lint.
  • Add an additional fix to import an unknown prefixed identifier by updating
    the show combinator on an existing import.
  • Add a fix to import an unknown prefixed identifier by adding an
    import directive with the given prefix.
  • Add a fix to import an unknown prefixed identifier by removing a hide
    combinator.
  • Add a fix to import an unknown identifier by adding an import directive with a
    show combinator, and optionally a prefix.
  • Code completion now suggests instance variables when completing inside the
    initializer of a late field.
  • Assists and quick fixes that add a const keyword now consider the
    prefer_const_declarations lint rule, preferring to add const to a variable
    declaration rather than the initial value.
  • Add a fix to add a missing on keyword in an extension declaration.
  • Add a fix to wrap an ambiguous property access or method call in an extension
    override.
    (Thanks @​FMorschel for the above enhancements!
  • The 'sort members' command now considers the sort_constructors_first lint
    rule.
  • The 'extract method' refactoring now uses generic method syntax for
    function-typed parameters.
  • Add quick fixes for more than 30 diagnostics.
  • Add the [strict_top_level_inference][strict_top_level_inference] lint rule.
  • Add the [unnecessary_underscores][unnecessary_underscores] lint rule.
  • Add the experimental [specify_nonobvious_property_types][specify_nonobvious_property_types] lint rule.
  • Add the experimental [omit_obvious_property_types][omit_obvious_property_types] lint rule.
  • Add the experimental [unnecessary_async][unnecessary_async] lint rule.
  • Add the experimental [unsafe_variance][unsafe_variance] lint rule.
  • Remove the [package_api_docs][package_api_docs] lint rule.
  • Remove the [unsafe_html][unsafe_html] lint rule.
Dart format

The formatter implements a new style better suited for the kind of
declarative code that many Dart users are writing today. The new style looks
similar to the style you get when you add trailing commas to argument lists,
except that now the formatter will add and remove those commas for you.

The dart format command uses the language version of
each input file to determine which style it gets. If the language version is 3.6
or lower, the code is formatted with the old style. If 3.7 or later, it gets the
new tall style.

You typically control the language version by setting a min SDK constraint in
your package's pubspec
. This means that when you update the SDK
constraint in your pubspec to move to 3.7, you are also opting in to the new
style.

In order to correctly determine the language version of each file it formats,
dart format (like other dart commands) looks for a package_config.json
file surrounding the files being formatted. This means that you need to run
dart pub get before formatting code in your package.
If you have format
checks in your continuous integration server, you'll want to make sure it runs
dart pub get too.

We don't intend to support both styles indefinitely. At some point in the
future when most of the ecosystem is on 3.7 or later, support for the old style
will be removed.

In addition to the new formatting style, a number of other changes are included,
some of them breaking:

  • Project-wide page width configuration. By long request, you can now
    configure your preferred formatting page width on a project-wide basis. When
    formatting a file, the formatter will look in the file's directory and any
    surrounding directories for an analysis_options.yaml file. If it finds one,
    it looks for YAML like so:

    formatter:
      page_width: 123

    If it finds a page width matching that schema, then the file is formatted
    using that width. Since the formatter will walk the surrounding directories
    until it finds an analysis_options.yaml file, this can be used to globally
    set the page width for an entire directory, package, or even collection of
    packages. Since analysis_options.yaml files already support an include
    key to reference other analysis_options.yaml files, you can define a single
    configuration and share it across a number of packages.

  • Opting out a region of code from formatting. In code formatted using the
    new style, you can use a pair of special marker comments to opt a region of
    code out of automated formatting:

    main() {
      this.isFormatted();
      // dart format off
      no   +   formatting
        +
          here;
      // dart format on
      formatting.isBackOnHere();
    }

    The comments must be exactly // dart format off and // dart format on.
    A file may have multiple regions, but they can't overlap or nest.

    This can be useful for highly structured data where custom layout helps the
    reader understand the data, like large lists of numbers.

  • Overriding the page width for a single file. In code formatted
    using the new tall style, you can use a special marker comment to control the
    page width that it's formatted using:

    // dart format width=30
    main() {
      someExpression +
          thatSplitsAt30;
    }

    This comment must appear before any code in the file and must match that
    format exactly. The width set by the comment overrides the width set by any
    surrounding analysis_options.yaml file.

    This feature is mainly for code generators that generate and immediately
    format code but don't know about any surrounding analysis_options.yaml
    that might be configuring the page width. By inserting this comment in the
    generated code before formatting, it ensures that the code generator's
    behavior matches the behavior of dart format.

    End users should mostly use analysis_options.yaml for configuring their
    preferred page width (or do nothing and continue to use the default page width
    of 80).

  • Breaking change: Remove support for dart format --fix. Instead, use
    dart fix. It supports all of the fixes that dart format --fix could apply
    and many more.

  • Treat the --stdin-name name as a path when inferring language version.
    When reading input on stdin, the formatter still needs to know its language
    version to know what style to apply. If the --stdin-name option is set, then
    that is treated as a file path and the formatter looks for a package config
    surrounding that file path to infer the language version from.

    If you don't want that behavior, pass in an explicit language version using
    --language-version=, or use --language-version=latest to parse the input
    using the latest language version supported by the formatter.

    If --stdin-name and --language-version are both omitted, then the
    formatter parses stdin using the latest supported language version.

  • Rename the --line-length option to --page-width. This is consistent
    with the public API, internal implementation, and docs, which all use "page
    width" to refer to the limit that the formatter tries to fit code into.

    The --line-length name is still supported for backwards compatibility, but
    may be removed at some point in the future. You're encouraged to move to
    --page-width. Use of this option (however it's named) is rare, and will
    likely be even rarer now that project-wide configuration is supported, so
    this shouldn't affect many users.

Dart to Javascript Compiler (dart2js)

The dart2js compiler which is invoked when the command 'dart compile js' is
used has been switched to use an AOT snapshot instead of a JIT snapshot.

Dart Development Compiler (dartdevc)

The dartdevc compiler and kernel_worker utility have been switched to use an
AOT snapshot instead of a JIT snapshot, the SDK build still includes a JIT
snapshot of these tools as package build/build_web_compiler depends on it. The
AOT snapshot can be used as follows to run DDC /bin/dartaotruntime /bin/snapshots/dartdevc_aot.dart.snapshot

Libraries
dart:html
  • dart:html is marked deprecated and will be removed in an upcoming release.
    Users should migrate to using dart:js_interop and package:web. See
    #​59716.
dart:indexed_db
  • dart:indexed_db is marked deprecated and will be removed in an upcoming
    release. Users should migrate to using dart:js_interop and package:web.
    See #​59716.
dart:io
  • HttpException will be thrown by HttpClient and HttpServer if a NUL
    (0x00) appears in a received HTTP header value.
dart:svg
  • dart:svg is marked deprecated and will be removed in an upcoming release.
    Users should migrate to using dart:js_interop and package:web. See
    #​59716.
dart:web_audio
  • dart:web_audio is marked deprecated and will be removed in an upcoming
    release. Users should migrate to using dart:js_interop and package:web.
    See #​59716.
dart:web_gl
  • dart:web_gl is marked deprecated and will be removed in an upcoming release.
    Users should migrate to using dart:js_interop and package:web. See
    #​59716.
dart:js
  • dart:js is marked deprecated and will be removed in an upcoming release.
    Users should migrate to using dart:js_interop. See #​59716.
dart:js_util
  • dart:js_util is marked deprecated and will be removed in an upcoming
    release. Users should migrate to using dart:js_interop. See #​59716.

v3.6.2

Compare Source

Released on: 2025-01-30

  • Fixes a bug where HttpServer responses were not correctly encoded
    if a "Content-Type" header was set (issue #​59719).
  • Fix dart format to parse code at language version 3.6 so that digit
    separators can be parsed correctly (issue #​59815, dart_style issue
    #​1630).
  • Fixes an issue where the DevTools analytics did not distinguish
    between new and legacy inspector events (issue #​59884).
  • When running dart fix on a folder that contains a library with multiple
    files and more than one needs a fix, the fix will now be applied correctly
    only once to each file (issue #​59572).

v3.6.1

Compare Source

Released on: 2025-01-08

  • When inside a pub workspace, pub get will now delete stray
    .dart_tool/package_config.json files in directories between the
    workspace root and workspace directories. Preventing confusing behavior
    when migrating a repository to pub workspaces (issue pub#4445).
  • Fixes crash during AOT and dart2wasm compilation which was caused by
    the incorrect generic covariant field in a constant object (issue
    #​57084).
  • Fixes analysis options discovery in the presence of workspaces
    (issue #​56552).

v3.6.0

Compare Source

Released on: 2024-12-11

Language

Dart 3.6 adds digit separators to the language. To use them, set your
package's [SDK constraint][language version] lower bound to 3.6 or greater
(sdk: '^3.6.0').

Digit separators

Digits in number literals (decimal integer literals, double literals,
scientific notation literals, and hexadecimal literals) can now include
underscores between digits, as "digit separators." The separators do not change
the value of a literal, but can serve to make the number more readable.

100__000_000__000_000__000_000  // one hundred million million millions!
0x4000_0000_0000_0000
0.000_000_000_01
0x00_14_22_01_23_45  // MAC address

Separators are not allowed at the start of a number (this would be parsed as an
identifier), at the end of a number, or adjacent to another character in a
number, like ., x, or the e in scientific notation.

  • Breaking Change #​56065: The context used by the compiler and analyzer
    to perform type inference on the operand of a throw expression has been
    changed from the "unknown type" to Object. This makes the type system more
    self-consistent, because it reflects the fact that it's not legal to throw
    null. This change is not expected to make any difference in practice.
Libraries
dart:io
  • Breaking Change #​52444: Removed the Platform() constructor, which
    has been deprecated since Dart 3.1.

  • Breaking Change #​53618: HttpClient now responds to a redirect
    that is missing a "Location" header by throwing RedirectException, instead
    of StateError.

dart:js_interop
  • Added constructors for JSArrayBuffer, JSDataView, and concrete typed array
    types e.g. JSInt8Array.
  • Added length and []/[]= operators to JSArray.
  • Added toJSCaptureThis so this is passed in from JavaScript to the
    callback as the first parameter.
  • Added a static from method on JSArray to create a JSArray from a given
    JavaScript iterable or array-like object.
Tools
CFE
  • Breaking Change #​56466: The implementation of the UP and
    DOWN algorithms in the CFE are changed to match the specification
    and the corresponding implementations in the Analyzer. The upper and
    lower closures of type schemas are now computed just before they are
    passed into the subtype testing procedure instead of at the very
    beginning of the UP and DOWN algorithms.
Dart format
  • Preserve type parameters on old-style function-typed formals that also use
    this. or super..
  • Correctly format imports with both as and if clauses.
Wasm compiler (dart2wasm)
  • The condition dart.library.js is now false on conditional imports in
    dart2wasm. Note that it was already a static error to import dart:js
    directly (see #​55266).
Pub
  • Support for workspaces. This allows you to develop and resolve multiple
    packages from the same repo together. See https://dart.dev/go/pub-workspaces
    for more info.

  • New command dart pub bump. Increments the version number of the current
    package.

    For example: dart pub bump minor will change the version from 1.2.3 to
    1.3.0.

  • New validation: dart pub publish will warn if your git status is not
    clean.

  • New flag dart pub upgrade --unlock-transitive.

  • dart pub upgrade --unlock-transitive pkg, will unlock and upgrade all the
    dependencies of pkg instead of just pkg.

Analyzer
  • Add the [use_truncating_division][use_truncating_division] lint rule.
  • Add the experimental [omit_obvious_local_variable_types][omit_obvious_local_variable_types] lint rule.
  • Add the experimental [specify_nonobvious_local_variable_types][specify_nonobvious_local_variable_types] lint rule.
  • Add the experimental [avoid_futureor_void][avoid_futureor_void] lint rule.
  • Add quick fixes for more than 14 diagnostics.
  • Add new assists: "add digit separators", "remove digit separators", and
    "invert conditional expression".

v3.5.4

Compare Source

v3.5.3

Compare Source

  • Fixes an issue with the DevTools Memory tool causing OOMs. and an
    issue resulting in a missing tab bar when DevTools is embedded in
    IntelliJ and Android Studio (issue#​56607).
  • Fixes an issue with the DevTools release notes showing each time
    DevTools is opened instead of only the first time (issue#​56607).
  • Fixes an issue resulting in a missing tab bar when DevTools is
    embedded in IntelliJ and Android Studio (issue#​56607).

v3.5.2

Compare Source

  • Fixes a bug where ZLibDecoder would incorrectly attempt to decompress data
    past the end of the zlib footer (issue #​56481).
  • Fixes issue where running dart from PATH could result in some commands not
    working as expected (issues #​56080, #​56306, #​56499).
  • Fixes analysis server plugins not receiving setContextRoots requests or
    being provided incorrect context roots in multi-package workspaces (issue
    #​56475).

v3.5.1

Compare Source

  • Fixes resolving include: in analysis_options.yaml file in a nested
    folder in the workspace (issue#​56464).
  • Fixes source maps generated by dart compile wasm when optimizations are
    enabled (issue #​56423).
  • Fixes a bug in the dart2wasm compiler in unsound -O3 / -O4 modes where a
    implicit setter for a field of generic type will store null instead of the
    field value (issue #​56374).
  • Fixes a bug in the dart2wasm compiler that can trigger in certain situations
    when using partial instantiations of generic tear-offs (constructors or static
    methods) in constant expressions (issue #​56440).
  • The algorithm for computing the standard upper bound of two types,
    also known is UP, is provided the missing implementation for
    StructuralParameterType objects. In some corner cases cases the
    lacking implementation resulted in a crash of the compiler (issue #​56457).

v3.5.0

Compare Source

Language
  • Breaking Change #​55418: The context used by the compiler to perform
    type inference on the operand of an await expression has been changed to
    match the behavior of the analyzer. This change is not expected to make any
    difference in practice.

  • Breaking Change #​55436: The context used by the compiler to perform
    type inference on the right hand side of an "if-null" expression (e1 ?? e2)
    has been changed to match the behavior of the analyzer. change is expected to
    have low impact on real-world code. But in principle it could cause
    compile-time errors or changes in runtime behavior by changing inferred
    types. The old behavior can be restored by supplying explicit types.

Libraries
dart:core
  • Breaking Change #​44876: DateTime on the web platform now stores
    microseconds. The web implementation is now practically compatible with the
    native implementation, where it is possible to round-trip a timestamp in
    microseconds through a DateTime value without rounding the lower
    digits. This change might be breaking for apps that rely in some way on the
    .microsecond component always being zero, for example, expecting only three
    fractional second digits in the toString() representation. Small
    discrepancies in arithmetic due to rounding of web integers may still occur
    for extreme values, (1) microsecondsSinceEpoch outside the safe range,
    corresponding to dates with a year outside of 1685..2255, and (2) arithmetic
    (add, subtract, difference) where the Duration argument or result
    exceeds 570 years.
dart:io
  • Breaking Change #​55786: SecurityContext is now final. This means
    that SecurityContext can no longer be subclassed. SecurityContext
    subclasses were never able to interoperate with other parts of dart:io.

  • A ConnectionTask can now be created using an existing Future<Socket>.
    Fixes #​55562.

dart:typed_data
  • Breaking Change #​53785: The unmodifiable view classes for typed data
    have been removed. These classes were deprecated in Dart 3.4.

    To create an unmodifiable view of a typed-data object, use the
    asUnmodifiableView() methods added in Dart 3.3.

  • Added superinterface TypedDataList to typed data lists, implementing both
    List and TypedData. Allows abstracting over all such lists without losing
    access to either the List or the TypedData members.
    A ByteData is still only a TypedData, not a list.

dart:js_interop
  • Breaking Change #​55508: importModule now accepts a JSAny instead
    of a String to support other JS values as well, like TrustedScriptURLs.

  • Breaking Change #​55267: isTruthy and not now return JSBoolean
    instead of bool to be consistent with the other operators.

  • Breaking Change ExternalDartReference no longer implements Object.
    ExternalDartReference now accepts a type parameter T with a bound of
    Object? to capture the type of the Dart object that is externalized.
    ExternalDartReferenceToObject.toDartObject now returns a T.
    ExternalDartReferenceToObject and ObjectToExternalDartReference are now
    extensions on T and ExternalDartReference<T>, respectively, where T extends Object?. See #​55342 and #​55536 for more details.

  • Fixed some consistency issues with Function.toJS across all compilers.
    Specifically, calling Function.toJS on the same function gives you a new JS
    function (see issue #​55515), the maximum number of arguments that are
    passed to the JS function is determined by the static type of the Dart
    function, and extra arguments are dropped when passed to the JS function in
    all compilers (see #​48186).

Tools
Analyzer
  • Add the [unintended_html_in_doc_comment][unintended_html_in_doc_comment] lint rule.
  • Add the [invalid_runtime_check_with_js_interop_types][invalid_runtime_check_with_js_interop_types] lint rule.
  • Add the [document_ignores][document_ignores] lint rule.
  • Add quick fixes for more than 70 diagnostics.
  • The "Add missing switch cases" quick fix now adds multiple cases, such that
    the switch becomes exhaustive.
  • The "Remove const" quick fix now adds const keywords to child nodes, where
    appropriate.
Pub
  • New flag dart pub downgrade --tighten to restrict lower bounds of
    dependencies' constraints to the minimum that can be resolved.
Dart Runtime
  • The Dart VM only executes sound null safe code, running of unsound null
    safe code using the option --no-sound-null-safety has been removed.

  • Dart_NewListOf and Dart_IsLegacyType functions are
    removed from Dart C API.

  • Dart_DefaultCanonicalizeUrl is removed from the Dart C API.


Configuration

📅 Schedule: Branch creation - "before 10am on monday" in timezone Asia/Tokyo, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the chore-renovate-dart-3.x branch from ab60ca5 to eb30671 Compare August 16, 2024 15:19
@renovate renovate bot changed the title chore: update dependency dart to v3.5.0 chore: update dependency dart to v3.5.1 Aug 16, 2024
@renovate renovate bot force-pushed the chore-renovate-dart-3.x branch from eb30671 to ade9f06 Compare August 28, 2024 12:42
@renovate renovate bot changed the title chore: update dependency dart to v3.5.1 chore: update dependency dart to v3.5.2 Aug 28, 2024
@renovate renovate bot changed the title chore: update dependency dart to v3.5.2 chore: update dependency dart to v3.5.3 Sep 12, 2024
@renovate renovate bot force-pushed the chore-renovate-dart-3.x branch from ade9f06 to e80c589 Compare September 12, 2024 17:00
@renovate renovate bot force-pushed the chore-renovate-dart-3.x branch from e80c589 to 6152a50 Compare October 17, 2024 20:15
@renovate renovate bot changed the title chore: update dependency dart to v3.5.3 chore: update dependency dart to v3.5.4 Oct 17, 2024
@renovate renovate bot changed the title chore: update dependency dart to v3.5.4 chore: update dependency dart to v3.6.0 Dec 11, 2024
@renovate renovate bot force-pushed the chore-renovate-dart-3.x branch from 6152a50 to 0bbf332 Compare December 11, 2024 15:46
@renovate renovate bot force-pushed the chore-renovate-dart-3.x branch from 0bbf332 to 9b7f5c0 Compare January 8, 2025 16:04
@renovate renovate bot changed the title chore: update dependency dart to v3.6.0 chore: update dependency dart to v3.6.1 Jan 8, 2025
@renovate renovate bot force-pushed the chore-renovate-dart-3.x branch from 9b7f5c0 to 29ba2a9 Compare January 30, 2025 14:18
@renovate renovate bot changed the title chore: update dependency dart to v3.6.1 chore: update dependency dart to v3.6.2 Jan 30, 2025
@renovate renovate bot changed the title chore: update dependency dart to v3.6.2 chore: update dependency dart to v3.7.0 Feb 12, 2025
@renovate renovate bot force-pushed the chore-renovate-dart-3.x branch from 29ba2a9 to 66f646a Compare February 12, 2025 10:52
@renovate renovate bot force-pushed the chore-renovate-dart-3.x branch from 66f646a to 1f3cab3 Compare February 27, 2025 20:11
@renovate renovate bot changed the title chore: update dependency dart to v3.7.0 chore: update dependency dart to v3.7.1 Feb 27, 2025
@renovate renovate bot force-pushed the chore-renovate-dart-3.x branch from 1f3cab3 to d4b1674 Compare March 12, 2025 11:10
@renovate renovate bot changed the title chore: update dependency dart to v3.7.1 chore: update dependency dart to v3.7.2 Mar 12, 2025
@renovate renovate bot force-pushed the chore-renovate-dart-3.x branch from d4b1674 to 819ed1a Compare April 17, 2025 08:05
@renovate renovate bot changed the title chore: update dependency dart to v3.7.2 chore: update dependency dart to v3.7.3 Apr 17, 2025
@renovate renovate bot force-pushed the chore-renovate-dart-3.x branch from 819ed1a to 6f231b2 Compare May 20, 2025 19:54
@renovate renovate bot changed the title chore: update dependency dart to v3.7.3 chore: update dependency dart to v3.8.0 May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants