diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 16a54880..349e285b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,11 +42,6 @@ jobs: with: melos-version: 7.8.1 - - uses: invertase/github-action-dart-analyzer@v1 - with: - fatal-infos: false - fatal-warnings: false - - name: Install dependencies run: fvm flutter pub get @@ -54,6 +49,13 @@ jobs: run: melos run build_runner:build --no-select timeout-minutes: 5 + # Runs what maintainers run: `dart analyze --fatal-infos` over every + # package, after code generation so generated files exist. DCM is the + # other half of `melos run analyze` and is not run here yet; see + # docs/maintainers/analysis-parity.md. + - name: Analyze + run: melos run analyze:dart --no-select + - name: Check Contract Schemas run: melos run contracts:check --no-select diff --git a/docs/maintainers/adr/0001-runtime-mermaid-rendering.md b/docs/maintainers/adr/0001-runtime-mermaid-rendering.md index 9ae3f230..f235fc0a 100644 --- a/docs/maintainers/adr/0001-runtime-mermaid-rendering.md +++ b/docs/maintainers/adr/0001-runtime-mermaid-rendering.md @@ -303,8 +303,20 @@ Implemented on `feat/superdeck-mermaid-core`, not as a spike: - **No Node or mermaid.js in the product.** mermaid.js 12.0.0 was used once, locally, to record the reference behaviour in §4.2. The export-time JavaScript fallback (option 3) is closed for this delivery. -- **No web payload measurement yet.** The release web bundle delta is still - unmeasured; see the blockers list in the delivery report. +- **Web payload, measured.** Demo release web build, same machine and SDK, + before and after the swap: + + | | before | after | delta | + | --- | --- | --- | --- | + | `main.dart.js` | 3.36 MB | 5.10 MB | **+1.74 MB** | + | `main.dart.js` gzipped | 1.01 MB | 1.63 MB | **+0.62 MB** | + | whole `build/web` | 47.7 MB | 49.5 MB | +1.7 MB | + + The tree shaker cannot drop unused diagram families, because + `Mermaid.render()` switches over all 28 — as predicted in §4.5. At + **+0.62 MB compressed** this is inside the 1.5 MB exit criterion agreed + below, so the decision stands; it is the price of the restored families and + it is worth re-measuring on every `mermaid_core` bump. ## 7. Reconsideration triggers @@ -337,8 +349,9 @@ Implemented on `feat/superdeck-mermaid-core`, not as a spike: ## 9. Still open -- The release web bundle delta from retaining 28 diagram implementations is - unmeasured. Measure before the next web release; the exit threshold agreed - above was 1.5 MB compressed. - The vendored parser is a fork of one file. Re-check it on every `mermaid_core` bump, and delete it when upstream rejects both inputs. +- Web payload is +0.62 MB compressed (§6). Inside the agreed threshold, but + re-measure on every bump; if a future release pushes it past 1.5 MB, the + options are deferred loading of the diagram code or dropping the dependency + for web only. diff --git a/docs/maintainers/analysis-parity.md b/docs/maintainers/analysis-parity.md new file mode 100644 index 00000000..369fd8cc --- /dev/null +++ b/docs/maintainers/analysis-parity.md @@ -0,0 +1,75 @@ +# Static analysis: what runs where + +Maintainer notes, current as of 2026-09-21. + +## The commands + +| Command | What it runs | +| --- | --- | +| `melos run analyze` | `analyze:dart` then `analyze:dcm` | +| `melos run analyze:dart` | `dart analyze --fatal-infos` in every package | +| `melos run analyze:dcm` | `dcm analyze . --fatal-style --fatal-warnings` in every package that depends on `dart_code_metrics_presets` | +| `melos run analyze:all` | the above plus `dcm check-unused-files` and `dcm check-unused-code` | + +Run `melos run