Skip to content

chore(deps): update dependency dart to v3.9.0 #9

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: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 24, 2025

This PR contains the following updates:

Package Update Change
dart (source) minor 3.7.3 -> 3.9.0

Release Notes

dart-lang/sdk (dart)

v3.9.0

Compare Source

Released on: 2025-08-13

Language

Dart 3.9 assumes null safety when computing type promotion, reachability, and
definite assignment. This makes these features produce more accurate results for
modern Dart programs. As a result of this change, more dead_code warnings may be
produced. To take advantage of these improvements, set your package's SDK
constraint
lower bound to 3.9 or greater (sdk: '^3.9.0').

Tools
Analyzer
  • The dart command-line tool commands that use the analysis server now run
    the AOT-compiled analysis server snapshot. These include dart analyze,
    dart fix, and dart language-server.

    There is no functional difference when using the AOT-compiled analysis server
    snapshot. But various tests indicate that there is a significant speedup in
    the time to analyze a project.

    In case of an incompatibility with the AOT-compiled snapshot, a
    --no-use-aot-snapshot flag may be passed to these commands. (Please file an
    issue with the appropriate project if you find that you need to use this
    flag! It will be removed in the future.) This flag directs the tool to revert
    to the old behavior, using the JIT-compiled analysis server snapshot. To
    direct the Dart Code plugin for VS Code to pass this flag, use the
    dart.analyzerAdditionalArgs setting. To direct the Dart
    IntelliJ plugin to pass this flag, use the dart.server.additional.arguments
    registry property, similar to these steps.

  • Add the switch_on_type lint rule.

  • Add the unnecessary_unawaited lint rule.

  • Add an assist to convert a field formal parameter to a normal parameter.

Dart build
  • Breaking change of feature in preview: dart build -f exe <target> is now
    dart build cli --target=<target>. See dart build cli --help for more info.
Dart Development Compiler (dartdevc)
  • Outstanding async code now checks and cancels itself after a hot restart if
    it was started in a different generation of the application before the
    restart. This includes outstanding Futures created by calling
    JSPromise.toDart from thedart:js_interop and the underlying the
    dart:js_util helper promiseToFuture. Dart callbacks will not be run, but
    callbacks on the JavaScript side will still be executed.

  • Fixed a soundness issue that allowed direct invocation of the value returned
    from a getter without any runtime checks when the getter's return type was a
    generic type argument instantiated as dynamic or Function.

    A getter defined as:

    class Container<T> {
      T get value => _value;
      ...
    }

    Could trigger the issue with a direct invocation:

    Container<dynamic>().value('Invocation with missing runtime checks!');
Dart native compiler

Added cross-compilation support for
target architectures of arm (ARM32) and riscv64 (RV64GC)
when the target OS is Linux.

Pub
  • Git dependencies can now be version-solved based on git tags.

    Use a tag_pattern in the descriptor and a version constraint, and all
    commits matching the pattern will be considered during resolution. For
    example:

    dependencies:
      my_dependency:
        git:
          url: https://github.com/example/my_dependency
          tag_pattern: v{{version}}
        version: ^2.0.1
  • Starting from language version 3.9 the flutter constraint upper bound is now
    respected in your root package. For example:

    name: my_app
    environment:
      sdk: ^3.9.0
      flutter: 3.33.0

    Results in dart pub get failing if invoked with a version of
    the Flutter SDK different from 3.33.0.

    The upper bound of the flutter constraint is still ignored in
    packages used as dependencies.
    https://github.com/flutter/flutter/issues/954725472 for details.

v3.8.3

Compare Source

Released on: 2025-07-31

This is a patch release that:

  • Fixes an issue with the DevTools Network screen and Hot Restart (issue flutter/devtools#9203)
  • Fixes an issue when clearing the DevTools network screen (issue #​61187)

v3.8.2

Compare Source

Released on: 2025-07-16

This is a patch release that:

  • Fixes an issue with the size of cross-compiled binaries (issue #​61097)

v3.8.1

Compare Source

Released on: 2025-05-28

This is a patch release that:

  • Fixes an issue in DDC with late variables being incorrectly captured within
    async function bodies (issue #​60748).

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.
Within map literals, both null-aware keys and values are supported.
Here is an example a list literal written in both styles,
without using null-aware elements and using them:

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,
];

To learn more about null-aware collection elements,
check out the documentation
and 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 lint rule.
  • Add the experimental 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 support 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 (issue dart-lang/dart_style#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,
    );

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), 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.

Copy link

Review changes with  SemanticDiff

@renovate renovate bot force-pushed the renovate/dart-3.x branch from 37cbbac to d5ca891 Compare June 1, 2025 03:58
@renovate renovate bot changed the title chore(deps): update dependency dart to v3.8.0 chore(deps): update dependency dart to v3.8.1 Jun 1, 2025
@renovate renovate bot changed the title chore(deps): update dependency dart to v3.8.1 chore(deps): update dependency dart to v3.8.2 Jul 19, 2025
@renovate renovate bot force-pushed the renovate/dart-3.x branch from d5ca891 to d91f5ec Compare July 19, 2025 20:14
@renovate renovate bot changed the title chore(deps): update dependency dart to v3.8.2 chore(deps): update dependency dart to v3.8.3 Aug 4, 2025
@renovate renovate bot force-pushed the renovate/dart-3.x branch from d91f5ec to 21f0359 Compare August 4, 2025 23:10
Copy link

coderabbitai bot commented Aug 4, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Join our Discord community for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@renovate renovate bot changed the title chore(deps): update dependency dart to v3.8.3 chore(deps): update dependency dart to v3.9.0 Aug 15, 2025
@renovate renovate bot force-pushed the renovate/dart-3.x branch from 21f0359 to 4cb8fc3 Compare August 15, 2025 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants