Skip to content

Commit 3bf3049

Browse files
committed
fix: Adapt to Flutter 3.47 (#3995)
Flutter 3.47.0 broke the CI pipeline (`analyze-latest` and `test`), this adapts the code to it without bumping the minimum supported Flutter or Dart SDK versions: - Rewrites the `flame_3d` flutter_gpu backend for the new flutter_gpu API: `ShaderLibrary.fromAsset` is now async, so shader bundles are preloaded from the `AssetManifest` during `GpuBackend.initialize()` (mirroring the WebGPU backend), and the vertex/index counts moved from `bindVertexBuffer`/`bindIndexBuffer` to `draw`/`drawIndexed`, so the render pass now records the counts at bind time and picks the right draw call. The committed shader bundles are also regenerated with the new SDK. - Since flame_3d now requires the latest stable again, the `analyze` job (lowest supported version) skips `flame_3d*` and it is instead only covered by `analyze-latest`, like we have done before when flutter_gpu has had breaking changes. - Converts pass-through constructor parameters to super parameters in the `flame` effects and `ColorTexture`, and avoids a parameter assignment in `FlameAudio`, fixing the new `use_super_parameters` and `parameter_assignments` diagnostics. - Commits the `analyzer.exclude` blocks that the Flutter 3.47 tool now generates into every package's `analysis_options.yaml` on each run (see flutter/flutter#191056), placed after the `include:` so the shared config stays first. Without committing them, every `flutter pub get`/`run`/`build` dirties the working tree. Verified locally on Flutter 3.47.0: repo-wide `dart analyze --fatal-infos`, `melos exec dart format . --set-exit-if-changed`, `dcm analyze .`, and `melos run test:select --no-select` (2854 passed, 0 failed) are all green, and `flutter pub get` no longer rewrites any `analysis_options.yaml`. (cherry picked from commit 0453bad)
1 parent 6b8223b commit 3bf3049

81 files changed

Lines changed: 748 additions & 47 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/cicd.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ jobs:
2929
with:
3030
flutter-version: ${{env.FLUTTER_MIN_VERSION}}
3131
- uses: bluefireteam/melos-action@v3
32+
# flame_3d always requires the latest stable, since flutter_gpu is still
33+
# unstable, so it is only analyzed in the analyze-latest job.
3234
- name: "Analyze with lowest supported version"
33-
uses: invertase/github-action-dart-analyzer@v3
34-
with:
35-
fatal-infos: true
35+
run: melos exec --ignore="flame_3d*" -- dart analyze --fatal-infos .
3636

3737
analyze-latest:
3838
runs-on: ubuntu-latest

‎doc/flame/examples/analysis_options.yaml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,13 @@ include: package:flame_lint/analysis_options_with_dcm.yaml
33
linter:
44
rules:
55
avoid_web_libraries_in_flutter: false
6+
7+
analyzer:
8+
exclude:
9+
- build/**
10+
- android/**
11+
- ios/**
12+
- web/**
13+
- windows/**
14+
- macos/**
15+
- linux/**

‎doc/tutorials/klondike/app/analysis_options.yaml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,13 @@ linter:
44
rules:
55
always_use_package_imports: false
66
prefer_relative_imports: true
7+
8+
analyzer:
9+
exclude:
10+
- build/**
11+
- android/**
12+
- ios/**
13+
- web/**
14+
- windows/**
15+
- macos/**
16+
- linux/**

‎doc/tutorials/platformer/app/analysis_options.yaml‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,14 @@ linter:
44
rules:
55
always_use_package_imports: false
66
prefer_relative_imports: true
7-
7+
8+
9+
analyzer:
10+
exclude:
11+
- build/**
12+
- android/**
13+
- ios/**
14+
- web/**
15+
- windows/**
16+
- macos/**
17+
- linux/**
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
11
include: package:flame_lint/analysis_options_with_dcm.yaml
2+
3+
analyzer:
4+
exclude:
5+
- build/**
6+
- android/**
7+
- ios/**
8+
- web/**
9+
- windows/**
10+
- macos/**
11+
- linux/**

‎examples/analysis_options.yaml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
11
include: package:flame_lint/analysis_options_with_dcm.yaml
2+
3+
analyzer:
4+
exclude:
5+
- build/**
6+
- android/**
7+
- ios/**
8+
- web/**
9+
- windows/**
10+
- macos/**
11+
- linux/**
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
11
include: package:flame_lint/analysis_options_with_dcm.yaml
2+
3+
analyzer:
4+
exclude:
5+
- build/**
6+
- android/**
7+
- ios/**
8+
- web/**
9+
- windows/**
10+
- macos/**
11+
- linux/**
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
11
include: package:flame_lint/analysis_options_with_dcm.yaml
2+
3+
analyzer:
4+
exclude:
5+
- build/**
6+
- android/**
7+
- ios/**
8+
- web/**
9+
- windows/**
10+
- macos/**
11+
- linux/**
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
11
include: package:flame_lint/analysis_options_with_dcm.yaml
2+
3+
analyzer:
4+
exclude:
5+
- build/**
6+
- android/**
7+
- ios/**
8+
- web/**
9+
- windows/**
10+
- macos/**
11+
- linux/**
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
11
include: package:flame_lint/analysis_options_with_dcm.yaml
2+
3+
analyzer:
4+
exclude:
5+
- build/**
6+
- android/**
7+
- ios/**
8+
- web/**
9+
- windows/**
10+
- macos/**
11+
- linux/**

0 commit comments

Comments
 (0)