[M] Change in dart/sdk[main]: [dyn_modules] Compile all libraries mentioned in dynamic_interface.yaml

0 views
Skip to first unread message

Alexander Markov (Gerrit)

unread,
Oct 30, 2025, 3:30:34 PM (3 days ago) Oct 30
to Alexander Markov, Johnni Winther, Nate Biggs, Sigmund Cherem, Commit Queue, dart-fe-te...@google.com, rev...@dartlang.org
Attention needed from Johnni Winther, Nate Biggs and Sigmund Cherem

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • Johnni Winther
  • Nate Biggs
  • Sigmund Cherem
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement satisfiedCommit-Message-Has-TEST
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I513a75bea76a18a3591613ecd68e7307e66a7c24
Gerrit-Change-Number: 458586
Gerrit-PatchSet: 5
Gerrit-Owner: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-Reviewer: Nate Biggs <nate...@google.com>
Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
Gerrit-Attention: Sigmund Cherem <sig...@google.com>
Gerrit-Attention: Nate Biggs <nate...@google.com>
Gerrit-Attention: Johnni Winther <johnni...@google.com>
Gerrit-Comment-Date: Thu, 30 Oct 2025 19:30:31 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
unsatisfied_requirement
satisfied_requirement
open
diffy

Nate Biggs (Gerrit)

unread,
Oct 30, 2025, 3:44:59 PM (3 days ago) Oct 30
to Alexander Markov, Johnni Winther, Sigmund Cherem, Commit Queue, dart-fe-te...@google.com, rev...@dartlang.org
Attention needed from Alexander Markov, Johnni Winther and Sigmund Cherem

Nate Biggs voted and added 1 comment

Votes added by Nate Biggs

Code-Review+1

1 comment

File pkg/dart2wasm/lib/compile.dart
Line 267, Patchset 5 (Latest): final isDynamicMainModule =
Nate Biggs . resolved

Thanks for updating this too!

Open in Gerrit

Related details

Attention is currently required from:
  • Alexander Markov
  • Johnni Winther
  • Sigmund Cherem
Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedCommit-Message-Has-TEST
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: sdk
    Gerrit-Branch: main
    Gerrit-Change-Id: I513a75bea76a18a3591613ecd68e7307e66a7c24
    Gerrit-Change-Number: 458586
    Gerrit-PatchSet: 5
    Gerrit-Owner: Alexander Markov <alexm...@google.com>
    Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
    Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
    Gerrit-Reviewer: Nate Biggs <nate...@google.com>
    Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
    Gerrit-Attention: Sigmund Cherem <sig...@google.com>
    Gerrit-Attention: Alexander Markov <alexm...@google.com>
    Gerrit-Attention: Johnni Winther <johnni...@google.com>
    Gerrit-Comment-Date: Thu, 30 Oct 2025 19:44:55 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    unsatisfied_requirement
    satisfied_requirement
    open
    diffy

    Sigmund Cherem (Gerrit)

    unread,
    Oct 30, 2025, 4:10:56 PM (3 days ago) Oct 30
    to Alexander Markov, Nate Biggs, Johnni Winther, Sigmund Cherem, Commit Queue, dart-fe-te...@google.com, rev...@dartlang.org
    Attention needed from Alexander Markov and Johnni Winther

    Sigmund Cherem added 1 comment

    Patchset-level comments
    File-level comment, Patchset 5 (Latest):
    Sigmund Cherem . resolved

    yay! this will make the wire up much cleaner, thank you!

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alexander Markov
    • Johnni Winther
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedCommit-Message-Has-TEST
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: sdk
    Gerrit-Branch: main
    Gerrit-Change-Id: I513a75bea76a18a3591613ecd68e7307e66a7c24
    Gerrit-Change-Number: 458586
    Gerrit-PatchSet: 5
    Gerrit-Owner: Alexander Markov <alexm...@google.com>
    Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
    Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
    Gerrit-Reviewer: Nate Biggs <nate...@google.com>
    Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
    Gerrit-Attention: Alexander Markov <alexm...@google.com>
    Gerrit-Attention: Johnni Winther <johnni...@google.com>
    Gerrit-Comment-Date: Thu, 30 Oct 2025 20:10:52 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    satisfied_requirement
    open
    diffy

    Sigmund Cherem (Gerrit)

    unread,
    Oct 30, 2025, 4:11:01 PM (3 days ago) Oct 30
    to Alexander Markov, Sigmund Cherem, Nate Biggs, Johnni Winther, Commit Queue, dart-fe-te...@google.com, rev...@dartlang.org
    Attention needed from Alexander Markov and Johnni Winther

    Sigmund Cherem voted Code-Review+1

    Code-Review+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alexander Markov
    • Johnni Winther
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedCommit-Message-Has-TEST
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: sdk
    Gerrit-Branch: main
    Gerrit-Change-Id: I513a75bea76a18a3591613ecd68e7307e66a7c24
    Gerrit-Change-Number: 458586
    Gerrit-PatchSet: 5
    Gerrit-Owner: Alexander Markov <alexm...@google.com>
    Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
    Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
    Gerrit-Reviewer: Nate Biggs <nate...@google.com>
    Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
    Gerrit-Attention: Alexander Markov <alexm...@google.com>
    Gerrit-Attention: Johnni Winther <johnni...@google.com>
    Gerrit-Comment-Date: Thu, 30 Oct 2025 20:10:58 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Johnni Winther (Gerrit)

    unread,
    Oct 31, 2025, 5:33:20 AM (3 days ago) Oct 31
    to Alexander Markov, Sigmund Cherem, Nate Biggs, Commit Queue, dart-fe-te...@google.com, rev...@dartlang.org
    Attention needed from Alexander Markov

    Johnni Winther voted and added 1 comment

    Votes added by Johnni Winther

    Code-Review+1

    1 comment

    File pkg/dart2wasm/lib/compile.dart
    Line 277, Patchset 5 (Latest): additionalSources = dynamicInterfaceYamlFile.libraries
    .where((String lib) => !lib.startsWith('dart:'))
    .map((String lib) => dynamicInterfaceUri.resolve(lib))
    .toList();
    Johnni Winther . unresolved

    Maybe add a method to `DynamicInterfaceYamlFile` that computes this so it can be shared with the computation in `kernel_front_end.dart`.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alexander Markov
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedCommit-Message-Has-TEST
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: sdk
    Gerrit-Branch: main
    Gerrit-Change-Id: I513a75bea76a18a3591613ecd68e7307e66a7c24
    Gerrit-Change-Number: 458586
    Gerrit-PatchSet: 5
    Gerrit-Owner: Alexander Markov <alexm...@google.com>
    Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
    Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
    Gerrit-Reviewer: Nate Biggs <nate...@google.com>
    Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
    Gerrit-Attention: Alexander Markov <alexm...@google.com>
    Gerrit-Comment-Date: Fri, 31 Oct 2025 09:33:13 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Alexander Markov (Gerrit)

    unread,
    Oct 31, 2025, 9:47:50 AM (2 days ago) Oct 31
    to Alexander Markov, Johnni Winther, Sigmund Cherem, Nate Biggs, Commit Queue, dart-fe-te...@google.com, rev...@dartlang.org

    Alexander Markov voted and added 2 comments

    Votes added by Alexander Markov

    Commit-Queue+2

    2 comments

    Patchset-level comments
    File-level comment, Patchset 6 (Latest):
    Alexander Markov . resolved

    Thank you all for taking a look!

    File pkg/dart2wasm/lib/compile.dart
    Line 277, Patchset 5: additionalSources = dynamicInterfaceYamlFile.libraries

    .where((String lib) => !lib.startsWith('dart:'))
    .map((String lib) => dynamicInterfaceUri.resolve(lib))
    .toList();
    Johnni Winther . resolved

    Maybe add a method to `DynamicInterfaceYamlFile` that computes this so it can be shared with the computation in `kernel_front_end.dart`.

    Alexander Markov

    Done

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedCommit-Message-Has-TEST
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: sdk
    Gerrit-Branch: main
    Gerrit-Change-Id: I513a75bea76a18a3591613ecd68e7307e66a7c24
    Gerrit-Change-Number: 458586
    Gerrit-PatchSet: 6
    Gerrit-Owner: Alexander Markov <alexm...@google.com>
    Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
    Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
    Gerrit-Reviewer: Nate Biggs <nate...@google.com>
    Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
    Gerrit-Comment-Date: Fri, 31 Oct 2025 13:47:46 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Johnni Winther <johnni...@google.com>
    satisfied_requirement
    open
    diffy

    Commit Queue (Gerrit)

    unread,
    Oct 31, 2025, 10:28:03 AM (2 days ago) Oct 31
    to Alexander Markov, Johnni Winther, Sigmund Cherem, Nate Biggs, dart-fe-te...@google.com, rev...@dartlang.org

    Commit Queue submitted the change with unreviewed changes

    Unreviewed changes

    5 is the latest approved patch-set.
    The change was submitted with unreviewed changes in the following files:

    ```
    The name of the file: pkg/dart2wasm/lib/compile.dart
    Insertions: 2, Deletions: 3.

    @@ -274,9 +274,8 @@
    final contents =
    File.fromUri(resolvedDynamicInterfaceUri!).readAsStringSync();
    final dynamicInterfaceYamlFile = DynamicInterfaceYamlFile(contents);
    - additionalSources = dynamicInterfaceYamlFile.libraries
    - .where((String lib) => !lib.startsWith('dart:'))
    - .map((String lib) => dynamicInterfaceUri.resolve(lib))
    + additionalSources = dynamicInterfaceYamlFile
    + .getUserLibraryUris(dynamicInterfaceUri)
    .toList();
    }
    }
    ```
    ```
    The name of the file: pkg/front_end/lib/src/kernel/dynamic_module_validator.dart
    Insertions: 5, Deletions: 0.

    @@ -94,6 +94,11 @@
    for (YamlList section in [?extendable, ?canBeOverridden, ?callable])
    for (YamlNode item in section) (item as YamlMap)['library'] as String,
    };
    +
    + // Coverage-ignore(suite): Not run.
    + Iterable<Uri> getUserLibraryUris(Uri baseUri) => libraries
    + .where((String lib) => !lib.startsWith('dart:'))
    + .map((String lib) => baseUri.resolve(lib));
    }

    /// Parsed dynamic interface specification yaml file.
    ```
    ```
    The name of the file: pkg/vm/lib/kernel_front_end.dart
    Insertions: 5, Deletions: 8.

    @@ -642,19 +642,16 @@
    args.environmentDefines,
    );

    - // Make a copy to ensure it is mutable.
    - final additionalSources = List.of(args.additionalSources);
    -
    + List<Uri> additionalSources = args.additionalSources;
    final dynamicInterface = args.dynamicInterface;
    if (dynamicInterface != null) {
    final fileUri = await asFileUri(args.options!.fileSystem, dynamicInterface);
    final contents = File(fileUri.toFilePath()).readAsStringSync();
    final dynamicInterfaceYamlFile = DynamicInterfaceYamlFile(contents);
    - additionalSources.addAll(
    - dynamicInterfaceYamlFile.libraries
    - .where((String lib) => !lib.startsWith('dart:'))
    - .map((String lib) => dynamicInterface.resolve(lib)),
    - );
    + additionalSources = [
    + ...additionalSources,
    + ...dynamicInterfaceYamlFile.getUserLibraryUris(dynamicInterface),
    + ];
    }

    CompilerResult? compilerResult;
    ```

    Change information

    Commit message:
    [dyn_modules] Compile all libraries mentioned in dynamic_interface.yaml

    All libraries exported via dynamic_interface.yaml (except 'dart:'
    libraries) are now always compiled, as if they were specified
    using --source flag on the gen_kernel / frontend_server command line.

    This makes sure that exported libraries would be available for
    dynamic modules even if they are not used in the host app.

    TEST=pkg/dynamic_modules/test
    Fixes b/452833638
    Change-Id: I513a75bea76a18a3591613ecd68e7307e66a7c24
    Commit-Queue: Alexander Markov <alexm...@google.com>
    Reviewed-by: Nate Biggs <nate...@google.com>
    Reviewed-by: Johnni Winther <johnni...@google.com>
    Reviewed-by: Sigmund Cherem <sig...@google.com>
    Files:
    • M pkg/dart2wasm/lib/compile.dart
    • M pkg/dynamic_modules/test/data/const_constructor/main.dart
    • M pkg/dynamic_modules/test/data/extend_class3/main.dart
    • M pkg/dynamic_modules/test/data/extend_class4/main.dart
    • M pkg/dynamic_modules/test/data/extension_type/main.dart
    • M pkg/dynamic_modules/test/data/extension_type2/main.dart
    • M pkg/dynamic_modules/test/data/mixin_deduplication/main.dart
    • M pkg/dynamic_modules/test/data/mixin_field/main.dart
    • M pkg/front_end/lib/src/api_prototype/dynamic_module_validator.dart
    • M pkg/front_end/lib/src/kernel/dynamic_module_validator.dart
    • M pkg/vm/lib/kernel_front_end.dart
    Change size: M
    Delta: 11 files changed, 107 insertions(+), 40 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Nate Biggs, +1 by Johnni Winther, +1 by Sigmund Cherem
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: sdk
    Gerrit-Branch: main
    Gerrit-Change-Id: I513a75bea76a18a3591613ecd68e7307e66a7c24
    Gerrit-Change-Number: 458586
    Gerrit-PatchSet: 7
    Gerrit-Owner: Alexander Markov <alexm...@google.com>
    Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages