Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FED-3254 Officially support Dart 3 #958

Merged
merged 25 commits into from
Oct 18, 2024
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
4b7627b
Start running CI on Dart 3
greglittlefield-wf Oct 10, 2024
b57ea35
Fix permissions
greglittlefield-wf Oct 10, 2024
b9788c2
Fix formatting check
greglittlefield-wf Oct 10, 2024
36fc646
Fix warnings in Dart 3 (except for in generated files)
greglittlefield-wf Oct 10, 2024
78a3004
Remove test cases that produce warnings in Dart 3
greglittlefield-wf Oct 10, 2024
c1ad5da
Remove unused dependencies
greglittlefield-wf Oct 10, 2024
50abd3f
Widen build_web_compilers range to fix DDC compilation on Dart 3
greglittlefield-wf Oct 10, 2024
ff88b62
Fix Dart-2-specific import
greglittlefield-wf Oct 10, 2024
d754ed8
Exclude non-null-safe builder test cases in Dart 3
greglittlefield-wf Oct 10, 2024
105f01b
Fix test args not being passed
greglittlefield-wf Oct 10, 2024
32c5b36
Suppress analysis_options include warning in Dart 3
greglittlefield-wf Oct 10, 2024
9f53995
Fix empty string being passed as test arg
greglittlefield-wf Oct 10, 2024
5412fef
Remove Dart-2-only lint config causing warning in Dart 3
greglittlefield-wf Oct 10, 2024
922d535
Work around presets ignoring excluded tag args
greglittlefield-wf Oct 10, 2024
3a6933a
Suppress comment references info
greglittlefield-wf Oct 10, 2024
25622a5
Use Dart stable (main used by mistake)
greglittlefield-wf Oct 10, 2024
0331324
Add timeouts, helpful for when test process hangs at end of run
greglittlefield-wf Oct 10, 2024
f6719b2
Work around test hanging issue
greglittlefield-wf Oct 15, 2024
9d1cdd2
Fix Dart 3 CI trying to run unsound test file
greglittlefield-wf Oct 16, 2024
35e8c9c
Only run SBOM action once
greglittlefield-wf Oct 16, 2024
bfa632a
Dial back matrix to only run on latest Dart 3 version
greglittlefield-wf Oct 16, 2024
bcbb6ea
Fix typo
greglittlefield-wf Oct 16, 2024
375848e
Clean up temporary file
greglittlefield-wf Oct 16, 2024
d64668c
Officially support Dart 3 in SDK constraint
greglittlefield-wf Oct 16, 2024
8df1dc0
Fix error message assertion in Dart 3
greglittlefield-wf Oct 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Start running CI on Dart 3
greglittlefield-wf committed Oct 10, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 4b7627b05f47fe5cca1ce38a890d09fabe7625f4
39 changes: 30 additions & 9 deletions .github/workflows/dart_ci.yml
Original file line number Diff line number Diff line change
@@ -22,17 +22,24 @@ jobs:
strategy:
fail-fast: false
matrix:
# Can't run on `dev` (Dart 3) until we're fully null-safe.
sdk: [ 2.19.6 ]
sdk: [ 2.19.6, 3.4.4, main ]
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
- id: setup-dart
uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.sdk }}

- name: Print Dart SDK version
run: dart --version

- name: Delete Dart-2-only files when running on Dart 3
run: |
DART_VERSION="${{ steps.setup-dart.outputs.dart-version }}"
if [[ "$DART_VERSION" =~ ^3 ]]; then
./tool/delete_dart_2_only_files.sh
fi
- id: install
name: Install dependencies
run: dart pub get
@@ -102,21 +109,28 @@ jobs:
strategy:
fail-fast: false
matrix:
# Can't run on `dev` (Dart 3) until we're fully null-safe.
sdk: [ 2.19.6 ]
sdk: [ 2.19.6, 3.4.4, main ]
analyzer:
# We only have one version currently, but we'll leave this CI step in place
# for the next time we need to support multiple analyzer versions.
- ^5.1.0
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
- id: setup-dart
uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.sdk }}

- name: Print Dart SDK version
run: dart --version

- name: Delete Dart-2-only files when running on Dart 3
run: |
DART_VERSION="${{ steps.setup-dart.outputs.dart-version }}"
if [[ "$DART_VERSION" =~ ^3 ]]; then
./tool/delete_dart_2_only_files.sh
fi
- name: Update analyzer constraint to ${{ matrix.analyzer }} and validate `dart pub get` can resolve
id: resolve
run: |
@@ -142,17 +156,24 @@ jobs:
strategy:
fail-fast: false
matrix:
# Can't run on `stable` (Dart 3) until we're fully null-safe.
sdk: [ 2.19.6 ]
sdk: [ 2.19.6, 3.4.4, main ]
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
- id: setup-dart
uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.sdk }}

- name: Print Dart SDK version
run: dart --version

- name: Delete Dart-2-only files when running on Dart 3
run: |
DART_VERSION="${{ steps.setup-dart.outputs.dart-version }}"
if [[ "$DART_VERSION" =~ ^3 ]]; then
(cd ../.. && ./tool/delete_dart_2_only_files.sh)
fi
- id: link
name: Override over_react dependency with local path
run: cd ../.. && dart pub get && dart tool/travis_link_plugin_deps.dart
17 changes: 17 additions & 0 deletions tool/delete_dart_2_only_files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

#
# This script deletes files that can only be run in Dart 2 (ones not using null-safety),
# and need to be deleted for analysis and compilation to work in Dart 3.
#

set -e

rm -rf test/over_react/component_declaration/non_null_safe_builder_integration_tests
rm test/over_react/component_declaration/flux_component_test/component2/unsound_flux_component_test.dart
rm test/over_react/component_declaration/flux_component_test/unsound_flux_component_test.dart
rm test/over_react_component_declaration_non_null_safe_test.dart

rm -rf tools/analyzer_plugin/test/unit/util/non_null_safe
rm -rf tools/analyzer_plugin/test/integration/assists/non_null_safe
rm -rf tools/analyzer_plugin/test/integration/diagnostics/non_null_safe