Commit Graph

24 Commits

Author SHA1 Message Date
Paul Berry 7e4e0326d7 Bump web packages to language version 3.12.
This CL is part of an effort to bump the SDK requirement to `3.12.0-0`
for all the packages in `pkg` that are not published to `pub`, so that
we can get better testing of the "private named parameters" feature.

(Packages that *are* published to `pub` can't be safely bumped yet,
because SDK 3.12 hasn't been released, and I don't want to block those
packages' ability to publish useful updates to customers.)

This change covers the following packages, which are owned by
OWNERS_WEB:
- pkg/_js_interop_checks/pubspec.yaml
- pkg/compiler/pubspec.yaml
- pkg/dart2js_info/pubspec.yaml
- pkg/dart2js_runtime_metrics/pubspec.yaml
- pkg/dart2js_tools/pubspec.yaml
- pkg/dev_compiler/pubspec.yaml
- pkg/js_ast/pubspec.yaml
- pkg/js_runtime/pubspec.yaml
- pkg/js_shared/pubspec.yaml
- pkg/modular_test/pubspec.yaml
- pkg/node_preamble/pubspec.yaml
- pkg/reload_test/pubspec.yaml
- pkg/sourcemap_testing/pubspec.yaml

Changes to `pubspec.yaml` files were made manually.

Changes to `.dart` files were made automatically (with a few
exceptions), using `dart fix` to migrate to using private named
parameters where it is possible to do so without changing
semantics. Note that this migration is conservative; see
https://github.com/dart-lang/sdk/issues/58607 for details.

The exceptions are:
- pkg/compiler/test/codesize/swarm/DataSource.dart
- pkg/compiler/test/codesize/swarm/Views.dart
- pkg/compiler/test/codesize/swarm/swarm_ui_lib/layout/GridLayout.dart
- pkg/compiler/test/codesize/swarm/swarm_ui_lib/touch/ClickBuster.dart
- pkg/compiler/test/codesize/swarm/swarm_ui_lib/touch/Scrollbar.dart
- pkg/compiler/test/codesize/swarm/swarm_ui_lib/touch/Scroller.dart
- pkg/dev_compiler/test/sourcemap/testfiles/next_through_is_and_as_test.dart

For these files, there was no need to migrate to using private named
parameters, however the language version bump caused flow analysis to
improve, so some additional dead code was detected that hadn't been
detected previously. I reasoned that it's better to minimize changes
to testcases, so rather than deleting the dead code, I just added
`ignore` comments to prevent the bots from failing.

Change-Id: I04f5280d7cedef0a6f0ef718133a03d06a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/487945
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2026-03-16 09:59:07 -07:00
Mayank Patke 2c90e5dde9 [js_shared] Update pubspec to 3.8 and reformat.
Change-Id: Ifb1e56982515e9e6b5d344749357e5bfb5641bfc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/427566
Commit-Queue: Nate Biggs <natebiggs@google.com>
Auto-Submit: Mayank Patke <fishythefish@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2025-05-08 14:20:23 -07:00
Sigurd Meldgaard 2fe05bd568 Reland "Migrate to use pub workspace"
This is a reland of commit b9b77058a9

Original change's description:
> Migrate to use pub workspace
>
> Use `pub get` to generate `.dart_tool/package_config.json` on gclient sync.
>
> All pkg/ (and a few third_party) packages that are developed inside the sdk repo are included in the workspace from the root `pubspec.yaml`.
>
> All dependencies that are pulled in via DEPS are added as path dependencies via `dependency_overrides` in the root `pubspec.yaml`.
>
> Bug: https://github.com/dart-lang/sdk/issues/56220
> Change-Id: I38c12b608c68da54c57821116cf9aa6696936746
> Tested: relies on CQ of existing tests. Should have no effect on functionality
> CoreLibraryReviewExempt: only core library change is adding a `// ignore:` comment. Should have no influence on functionality
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/397164
> Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>

Bug: https://github.com/dart-lang/sdk/issues/56220
Change-Id: I29afabade2d2447dea05121cb87ff50bb21a4b76
Cq-Include-Trybots: luci.dart.try:flutter-linux-try,flutter-web-try
Tested: relies on CQ of existing tests. Should have no effect on functionality
CoreLibraryReviewExempt: only core library change is adding a `//
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415561
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-03-20 06:19:16 -07:00
Mayank Patke 549639dc6c [dart2js, ddc] Remove LEGACY support from rti.
- Remove support for `JS_GET_FLAG('LEGACY')` from backends
- Remove `kindStar` Rtis
- Remove `Recipe.wrapStar`

Bug: #60327
Change-Id: I2ec9b0afc9f3cd99fc6167600e6d908c9771af1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416101
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2025-03-18 19:09:54 -07:00
Sigurd Meldgaard 6c4de1ab7e Revert "Migrate to use pub workspace"
This reverts commit b9b77058a9.


Revert "Add missing sample pubspec to workspace"

This reverts commit 892ea15ac7.


These seem to break the engine.

Change-Id: Ieee26deb7928c3869a1b6265326c3ce568ffe731
Tested: this is a revert.
CoreLibraryReviewExempt: this is a revert
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415582
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-03-14 09:08:20 -07:00
Sigurd Meldgaard b9b77058a9 Migrate to use pub workspace
Use `pub get` to generate `.dart_tool/package_config.json` on gclient sync.

All pkg/ (and a few third_party) packages that are developed inside the sdk repo are included in the workspace from the root `pubspec.yaml`.

All dependencies that are pulled in via DEPS are added as path dependencies via `dependency_overrides` in the root `pubspec.yaml`.

Bug: https://github.com/dart-lang/sdk/issues/56220
Change-Id: I38c12b608c68da54c57821116cf9aa6696936746
Tested: relies on CQ of existing tests. Should have no effect on functionality
CoreLibraryReviewExempt: only core library change is adding a `// ignore:` comment. Should have no influence on functionality
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/397164
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-03-14 05:21:40 -07:00
Sigurd Meldgaard a9ab52bcbb Language version bumps for publish_to: none pkgs
Also a separate pubspec for the tools/ folder

Extracted from https://dart-review.googlesource.com/c/sdk/+/397164

Change-Id: If49a6ede07e4864d0c0fcb210c04c18c804849df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412041
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2025-02-27 00:48:40 -08:00
Devon Carew 98befcf281 [pkg] rev packages to have a min sdk verison of at least 3.0
Change-Id: I365abf095f0801bb8ce864f3bbaa57ff298164c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402881
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2025-01-06 14:54:35 -08:00
Robert Nystrom 73117f0576 Reformat sdk/ using the new style.
There should be no actual code changes here, just formatting.

Change-Id: Id7356fdd9a0963ec0965b92e5ca1b218085f162e
CoreLibraryReviewExempt: No behavioral changes
Tested: No meaningful changes, ran on bots
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/394000
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2024-11-08 15:46:36 +00:00
Devon Carew 89532d54ed [deps] rev package:lints to capture the unnecessary_library_name addition
Change-Id: I6ca4b0cef189248eac4d0898e8549424f2d889bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380180
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2024-08-13 17:04:13 +00:00
Nate Biggs ae34c07b94 [ddc] Move async_status_codes to shared sdk library.
This will allow DDC and dart2js to share these values for their async systems.

Change-Id: If6eef5de535cdf55e10adca3b2de11c408df4070
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/374520
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2024-07-12 16:05:19 +00:00
Kallen Tu 64584c128a [web] Move Variance to js_shared/lib/ for shared use.
Moving variance to `js_shared/lib/variance.dart` so we can use the same synced indices when marking variance in both dart2js and ddc.

This avoids needing to sync multiple data structures that all represent variance.

Bug: https://github.com/dart-lang/sdk/issues/54367

Change-Id: Ia6fda84decd43374c08ed3bd0d0b240071310d9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341840
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2023-12-22 18:16:01 +00:00
Nicholas Shahan 904972569d [dart2js][ddc] Make rti universe field names const
These names are expected to always be the same, making
them const allows DDC to recognize that more easily.

Change-Id: I80a991e1cf50b2990fd27afb4ff3793a6135cf65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/328803
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-10-09 21:12:48 +00:00
Devon Carew e2fe203adc [deps] roll package:lints to the latest
Change-Id: I582f956cd4b712203c2f6dd630b4e1384040446d
Tested: analysis clean (this is a lint only related change)
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329400
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-10-05 03:36:59 +00:00
Devon Carew e6ee09e23b [pkg/js_*] use package:lints/recommended.yaml for analysis for pkg/js_shared and pkg/js_runtime
Update the pkg/pkg.dart script to also include information about the size of the pkg/ packages (so we know ~how much code is on older analysis options sets).

Change-Id: Ief1b9a868752a01aef5dd95a4ce1c74795315bc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290615
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2023-03-24 01:10:09 +00:00
Konstantin Shcheglov 895540889e Update SDK constraints for SDK packages.
https://dart-review.googlesource.com/c/sdk/+/287660 implements it.
I want to fix pre-existing violations before enabling.

Bug: https://github.com/dart-lang/sdk/issues/34978
Change-Id: Ie7731162c643018a2312b265f444bc00534c0a51
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287664
Reviewed-by: Leon Senft <leonsenft@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-03-09 19:52:47 +00:00
Stephen Adams ef6ce1e88a [dart2js] Basic records
Records can be constructed, returned, and field accessed in non-dynamic code. Type checks don't work, so records cannot be added to generic collections like `List<(int,int>)`.

- Add runtime for base classes for records of various arities.

- Use impacts to collect record static types used.

- Create record classes for each record shape. Record classes have
  extra metadata properties on the prototype. This allows slower,
  general operations at the root of the hierarchy that can be
  overridden with specialized operations lower in the hierarchy.



Change-Id: Ic1b38a5076c2d05f2ecff0a9ed3255b43645386e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278699
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2023-01-12 04:44:16 +00:00
Nicholas Shahan 3bc3a84fd0 [ddc] Add basic support for new interface types
- Support interface types without generic parameters in type tests.
- Add '|' symbol to recipes to separate the library identifier from
  the type. This is used in the modular setting where types are not
  guaranteed to have a unique name.
- Add a runtime method to strip library identifiers when printing
  type names.
- Add a runtime method to retrieve original Dart type name from
  constructors.

Issue: https://github.com/dart-lang/sdk/issues/48585
Change-Id: Ib2a69c29177ebb7c582bff3246ee985666cd5919
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243362
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-10-28 19:26:50 +00:00
Stephen Adams edf0da2df4 [dart2js,js_runtime] Record type recipes and runtime subtype test
Change-Id: I54adb8b6184a19667a296a670fecb37d7ce9dce7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262126
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-10-05 16:48:01 +00:00
Devon Carew 93951169ba [pkg/js_shared] address a few analysis issues
Change-Id: I9ce9c66fa24bf58172b0fb2545c8bd745bc2fe68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249549
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-06-23 23:34:18 +00:00
Devon Carew f7c46f145c [pkg] prefer 'any' deps for package dev dependencies
Tested: CI validation
Change-Id: If65cc156130a65ffe00c6f1660ac320e2921afae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246053
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2022-05-27 01:34:59 +00:00
Nicholas Shahan 4fc7567c22 [web] Cleanup redundant language version comments
- Files in the SDK are already opted into null safety.
- Files in the packages are already opted into null safety via
  the pubspecs.
- in_sync_test.dart was opted out but required no changes to
  migrate.

Change-Id: Ic9334824de1b22c879e962f488e1fa8021017710
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246058
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-05-26 20:19:09 +00:00
Nicholas Shahan 444982f364 [web] Share more runtime code between ddc and dart2js
Creates a new 'dart:_js_shared_embedded_names' library for the names
accessed from the shared 'dart:_rti' library. Migrate all of the shared
symbols and uses to the new location.

Change-Id: Iaa72c4522888ad630782b921b0b70d7a2626d1b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241507
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-05-23 18:04:10 +00:00
Nicholas Shahan 58c84272bc [web] Move libraries to a shared location
These libraries will be shared between the dart2js and DDC runtimes.

Also renames the `shared` directory to `synced` to avoid confusion.
Synced directories are copied to be in sync with the compilers and
runtimes.

Change-Id: Ic36076938741d7102792f09413666de0033da3a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/238300
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2022-05-18 19:59:33 +00:00