Commit graph

7 commits

Author SHA1 Message Date
Konstantin Shcheglov 36c0788137 add package:_macros (SDK vendored) and package:macros (pub published)
add sdk_packages.yaml file (describes SDK vendored package locations)

delete old macro code in _fe_analyzer_shared, move tests/benchmarks

adds a top level `pkg` directory to the Dart SDK, which is where vendored packages live

BUG: https://github.com/dart-lang/sdk/issues/54976
Change-Id: Ib3503a27fb5644fa8a39ab5a3e5b568df330cfd6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359040
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2024-03-26 18:40:00 +00:00
David Morgan e38f4fa4ac [macros] Tweaks to macro_build test.
Run on `release`, not `debug`, the release bot runs by default on PRs so it's more convenient.

Increase the test step timeout from 30s to 60s, I've seen an occasional timeout.

Change-Id: Ie7ce062b4d326763a651b8b607d1aef90e1f65f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356840
Commit-Queue: William Hesse <whesse@google.com>
Auto-Submit: Morgan :) <davidmorgan@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2024-03-12 12:46:19 +00:00
David Morgan 6f7f571989 [macros] Fix basic macro compile with DDC, add e2e test.
The e2e test is for "how DDC is used in the language tests", more
realistic setupts to follow.

R=jakemac@google.com, nshahan@google.com

Change-Id: Iece44740d2e4d91748a7deef59f4e18ad42ac853
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356241
Auto-Submit: Morgan :) <davidmorgan@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2024-03-08 11:37:46 +00:00
David Morgan ffe61b76d8 [macros] Tests find SDK out instead of hard coding it.
R=whesse@google.com

Change-Id: I0ecdf8ef53e79234f8d2957ac680e8ec103e496a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356042
Auto-Submit: Morgan :) <davidmorgan@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
2024-03-07 14:32:47 +00:00
David Morgan a85689758e [macros] Fix flake: use the SDK that was actually built.
Currently these two tests only passes by chance, if a `release` build
happens to be available.

R=whesse@google.com

Change-Id: I6048c6ed8ea2f299c88eaf9a6c6b2add8a03dfa0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356083
Auto-Submit: Morgan :) <davidmorgan@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
2024-03-07 11:50:41 +00:00
David Morgan ebcae76d0d [macros] Replace hardcoded skip with status file skip.
R=whesse@google.com

Change-Id: I50a41ebadd71b65761613e2ac2259152d1433ddd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355923
Auto-Submit: Morgan :) <davidmorgan@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
2024-03-07 10:33:08 +00:00
David Morgan c2004efd47 [macros] Add macro build tests.
These are a new type of test that runs with the SDK under test against what
looks like an external package; they start by running "pub get" then run SDK
build commands to build the package, and check that macros applied correctly.

Add tests for various builds that already pass, plus one that doesn't:
cfe_sdk_cli_test fails because it was switched to run from an AOT snapshot
and that doesn't support macros yet.

Change-Id: Ic801cb61bd414d4876566452e01dd8c8203e9013
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353100
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
2024-03-06 12:31:37 +00:00