Commit Graph

3 Commits

Author SHA1 Message Date
Alexander Markov 53ecbfd999 [dyn_modules] Do not add dart:core as callable by default
Adding the whole dart:core as callable has certain size overhead and
doing this by default prevents experimentation and fine-grained
control.

Bug: b/419727041
Change-Id: I7b24b3011ca07351dddf5a9e09292b5ecc6bde34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/431580
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2025-05-28 08:43:34 -07:00
Alexander Markov 1c429e9f36 [dynamic modules] Add dart:core to dynamic interface by default
In order to simplify creating dynamic interface yaml files,
the following is added to dynamic interface by default:

callable: dart:core, pragma._
extendable: Object

TEST=pkg/dynamic_modules/test

CoreLibraryReviewExempt: no API changes, only adding pragmas
Change-Id: I925532c4c024ebbcf4972b00be0e0a080d5878fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/422024
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2025-04-25 08:09:59 -07:00
Alexander Markov 6156dd6e59 [dynamic modules] Respect dyn-module:language-impl:* pragmas during dynamic module validation
Dynamic module validation now accepts reference to classes and members
from 'dart:*' libraries if they are annotated with
dyn-module:language-impl:* pragmas. This matches the behavior of
dynamic interface annotator.

This is a follow-up to
https://dart-review.googlesource.com/c/sdk/+/418663.

Also, when checking for possible dynamic overrides in TFA,
treat _enumToString from dart:core as a public name because
front-end desugars enums into classes which override
private _enumToString method in a different library.

TEST=pkg/dynamic_modules/test/data/enum
Fixes b/395992622

Change-Id: I45ed9855f806224a510fa4e56962607de3371eb0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423820
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2025-04-23 07:43:02 -07:00