Commit Graph

5 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 c409e77d1e Validation of dynamic modules
TEST=pkg/front_end/testcases/general/dynamic_modules


Change-Id: I591d029ed163961f5ece859233874f828d63c857
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388442
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2024-10-24 16:51:53 +00:00
Sigmund Cherem 25bc18c3b3 Add support for AOT in dynamic_modules tests
* Introduce steps to execute tests in AOT (using gen-kernel,
  dart2bytecode, and aot compiler)
* Accept using filesystem-scheme to provide dynamic_interfaces.yaml input
* Accept empty dynamic_interfaces.yaml
* Make temporary test changes to get them running:
   * include core types in dynamic_interfaces that we may want to have
     by default
   * rename entrypoint to `main`

Most existing test pass, the two tests that validate that a library
cannot be defined twice fail (expectation is to throw, bytecode ignores
the second definition).

To run locally:
```
./tool/build.py -m release --dart-dynamic-modules create_sdk
DART_CONFIGURATION=ReleaseX64 out/ReleaseX64/dart-sdk/bin/dart pkg/dynamic_modules/test/runner/main.dart -r aot
```

Tested: CL adds additional test coverage, currently ran manually, integrated in CI in child CL
Change-Id: I4868e765855d9951bff160c18b846aa628f5e0b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383928
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2024-09-10 04:09:21 +00:00
Sigmund Cherem 99cff54882 Add test framework for experimental dynamic modules API.
This CL introduces a test runner and test cases under
`pkg/dynamic_modules/test/`. These tests are end-to-end tests that
specifically target the dynamic modules semantics. This includes:
* semantics expecations on the program evolutions (e.g. libraries
  defined only once)
* individual cases around the dynamic interface (callable, extensible,
  overrides).

We should continue to add more test as we discover coner cases worth validating
(e.g. mixins, constants, etc).

The suite is not yet integrated to the test matrix, my plan is to do so
after we have some initial targets set up.

Change-Id: I2a63946c36d99baacb6fb7edc01c4ef377ce20b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379921
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2024-09-05 22:24:25 +00:00