From 94e5c23c62090461a32c838e20e2da4e18c3be7d Mon Sep 17 00:00:00 2001 From: Dimoshka Date: Tue, 20 Oct 2026 14:16:44 +0000 Subject: [PATCH 01/12] chore(workspace): move the melos scripts to the Melos 8 forms Melos 8 changes how scripts are declared: a plain string is handed to /bin/sh verbatim, so a nested `melos exec` call only resolves when a global melos binary happens to be on PATH. Declaring `exec` with a `command` lets Melos 8 rewrite the nested call to `dart run melos:melos`, and `packageFilters` replaces the `--dir-exists`/`--depends-on` CLI flags with their camel-cased config keys. The `ci` script becomes a `steps` list, so the same rewrite applies to each step that is a bare script name. The workspace now resolves Melos 8.9.0 from the lock file, which also drops the platform/cli_util/pub_updater/coverage constraints that Melos 7.8.2 required. Signed-off-by: Dimoshka --- pubspec.lock | 20 ++++++++++---------- pubspec.yaml | 30 +++++++++++++++++++++++------- 2 files changed, 33 insertions(+), 17 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index a09401e..5895e3b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -173,10 +173,10 @@ packages: dependency: transitive description: name: cli_util - sha256: "71e43f1976c3eae2d9468a5b4d6600bf8cae61508b87f27fa1799228935d48ab" + sha256: "89b8801ba49f8b593fbf2d3e59efd0f566c46cd4ba6837ae2610c72b52a0f899" url: "https://pub.dev" source: hosted - version: "0.5.2" + version: "0.6.0" clock: dependency: transitive description: @@ -221,10 +221,10 @@ packages: dependency: transitive description: name: coverage - sha256: "956a3de0725ca232ad353565a8290d3357592bf4250f6f298a185e2d949c5d3d" + sha256: ff89e37c19355194e279d26dafe8e4bece46c9ea63a30be4dc68214f5bc290d3 url: "https://pub.dev" source: hosted - version: "1.15.1" + version: "1.16.0" crypto: dependency: transitive description: @@ -538,10 +538,10 @@ packages: dependency: "direct dev" description: name: melos - sha256: "5fc1a858e3d90fdc42f2f423b95f901214bbc3d9e80c99125d9352f12453721d" + sha256: "140e51d7990b5134663e64b39e19d3b64ead16382e69127c205942c91e752b16" url: "https://pub.dev" source: hosted - version: "7.8.2" + version: "8.9.0" meta: dependency: transitive description: @@ -626,10 +626,10 @@ packages: dependency: transitive description: name: platform - sha256: a36d119c13416516a7b5913fbe8af8531e11633d784c550b2125f76c758524ec + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "3.1.6" pool: dependency: transitive description: @@ -674,10 +674,10 @@ packages: dependency: transitive description: name: pub_updater - sha256: "739a0161d73a6974c0675b864fb0cf5147305f7b077b7f03a58fa7a9ab3e7e7d" + sha256: "3aadeb8c68d15ef9d117b36474ddcc543b48ae1e64f7dd71407da26df66bf7c8" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.6.0" pubspec_parse: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index c5722ab..4328c70 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -20,15 +20,31 @@ workspace: - tools/* dev_dependencies: - # [VERIFY T12] Melos 8.x exists; the specification pins the 7.x line. - # See docs/spec/open-questions.md before moving to 8. - melos: ^7.0.0 + melos: ^8.0.0 melos: scripts: format: dart format --set-exit-if-changed . - analyze: melos exec -c 1 -- dart analyze --fatal-infos - gen: melos exec -c 1 --depends-on build_runner -- dart run build_runner build --delete-conflicting-outputs + analyze: + exec: + command: dart analyze --fatal-infos + concurrency: 1 + gen: + exec: + command: dart run build_runner build --delete-conflicting-outputs + concurrency: 1 + packageFilters: + dependsOn: build_runner arch: dart run tools/arch_check/bin/arch_check.dart - test: melos exec -c 4 --dir-exists=test -- dart test - ci: melos run format && melos run analyze && melos run arch && melos run test + test: + exec: + command: dart test + concurrency: 4 + packageFilters: + dirExists: test + ci: + steps: + - format + - analyze + - arch + - test From c4fd162a4c4be567ad23ba8033ea5ec97059857f Mon Sep 17 00:00:00 2001 From: Dimoshka Date: Tue, 20 Oct 2026 14:16:54 +0000 Subject: [PATCH 02/12] ci: run melos from the workspace lock instead of a global install The global install pinned Melos 7 while the workspace lock now resolves Melos 8, so the runner and the workspace disagreed about the script schema. Running `dart run melos:melos` uses the version from pubspec.lock, which keeps CI and local runs on the same tool. `flutter pub get` stays ahead of every `dart run` step because `dart run` resolves the package through the workspace `.dart_tool/package_config.json`. `flutter pub get` is required rather than `dart pub get` because the workspace contains Flutter packages. Signed-off-by: Dimoshka --- .github/workflows/ci.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6807fdd..41d2081 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,9 +20,6 @@ jobs: with: channel: stable - - name: Install Melos - run: dart global activate melos ^7.0.0 - - name: Resolve workspace run: flutter pub get @@ -30,14 +27,15 @@ jobs: # - name: Check generated code is up to date # run: dart run tools/codegen_check/bin/codegen_check.dart + # Melos comes from the workspace lock file: `dart run melos:melos`, no global install. - name: Format - run: melos run format + run: dart run melos:melos run format - name: Analyze - run: melos run analyze + run: dart run melos:melos run analyze - name: Architecture rules - run: melos run arch + run: dart run melos:melos run arch - name: Test - run: melos run test + run: dart run melos:melos run test From 01b7f0a80c2b2868eddbf697ec6b2e29d075057f Mon Sep 17 00:00:00 2001 From: Dimoshka Date: Tue, 20 Oct 2026 14:17:11 +0000 Subject: [PATCH 03/12] chore(deps): record the build_runner ceiling in the member pubspecs The pin comment only said that build 4 was needed, which left the reasoning implicit. Name the two packages that actually hold build at ^4.0.4 - injectable_generator 3.1.3 and schemantic_builder 1.0.0 - so the ceiling can be revisited when either of them moves to build 5. The constraint itself is unchanged, so the resolution is unchanged. Signed-off-by: Dimoshka --- clients/app/pubspec.yaml | 2 +- clients/site/pubspec.yaml | 2 +- packages/contracts/pubspec.yaml | 2 +- packages/design/pubspec.yaml | 2 +- runtime/core/pubspec.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/clients/app/pubspec.yaml b/clients/app/pubspec.yaml index 7e4e198..7fe8ef0 100644 --- a/clients/app/pubspec.yaml +++ b/clients/app/pubspec.yaml @@ -17,6 +17,6 @@ dependencies: flutter_bloc: ^9.1.1 injectable: ^3.0.0 dev_dependencies: - build_runner: ">=2.16.1 <2.17.0" # 2.17.0 retracted; 2.17.1 needs build 5, injectable_generator needs build 4 + build_runner: ">=2.16.1 <2.17.0" # 2.17.0 retracted; 2.17.1 needs build 5, but injectable_generator 3.1.3 and schemantic_builder 1.0.0 pin build ^4.0.4 flutter_lints: ^6.0.0 injectable_generator: ^3.0.0 diff --git a/clients/site/pubspec.yaml b/clients/site/pubspec.yaml index acca3e8..d7698f0 100644 --- a/clients/site/pubspec.yaml +++ b/clients/site/pubspec.yaml @@ -12,4 +12,4 @@ dependencies: alteri_one_design: ^0.0.1 jaspr: ^0.23.5 dev_dependencies: - build_runner: ">=2.16.1 <2.17.0" # 2.17.0 retracted; 2.17.1 needs build 5, injectable_generator needs build 4 + build_runner: ">=2.16.1 <2.17.0" # 2.17.0 retracted; 2.17.1 needs build 5, but injectable_generator 3.1.3 and schemantic_builder 1.0.0 pin build ^4.0.4 diff --git a/packages/contracts/pubspec.yaml b/packages/contracts/pubspec.yaml index 2a0b118..1e24573 100644 --- a/packages/contracts/pubspec.yaml +++ b/packages/contracts/pubspec.yaml @@ -18,5 +18,5 @@ dependencies: schemantic: ^1.0.0 meta: ^1.19.0 dev_dependencies: - build_runner: ">=2.16.1 <2.17.0" # 2.17.0 retracted; 2.17.1 needs build 5, injectable_generator needs build 4 + build_runner: ">=2.16.1 <2.17.0" # 2.17.0 retracted; 2.17.1 needs build 5, but injectable_generator 3.1.3 and schemantic_builder 1.0.0 pin build ^4.0.4 test: ^1.33.0 diff --git a/packages/design/pubspec.yaml b/packages/design/pubspec.yaml index 12cf59f..1b96e0e 100644 --- a/packages/design/pubspec.yaml +++ b/packages/design/pubspec.yaml @@ -19,5 +19,5 @@ dependencies: sdk: flutter yaml: ^3.1.4 dev_dependencies: - build_runner: ">=2.16.1 <2.17.0" # 2.17.0 retracted; 2.17.1 needs build 5, injectable_generator needs build 4 + build_runner: ">=2.16.1 <2.17.0" # 2.17.0 retracted; 2.17.1 needs build 5, but injectable_generator 3.1.3 and schemantic_builder 1.0.0 pin build ^4.0.4 flutter_lints: ^6.0.0 diff --git a/runtime/core/pubspec.yaml b/runtime/core/pubspec.yaml index ae5ed93..be6173a 100644 --- a/runtime/core/pubspec.yaml +++ b/runtime/core/pubspec.yaml @@ -22,7 +22,7 @@ dependencies: shelf: ^1.4.3 yaml: ^3.1.4 dev_dependencies: - build_runner: ">=2.16.1 <2.17.0" # 2.17.0 retracted; 2.17.1 needs build 5, injectable_generator needs build 4 + build_runner: ">=2.16.1 <2.17.0" # 2.17.0 retracted; 2.17.1 needs build 5, but injectable_generator 3.1.3 and schemantic_builder 1.0.0 pin build ^4.0.4 injectable_generator: ^3.0.0 bloc_test: ^10.0.0 mocktail: ^1.0.5 From 8a59d4c091f3af3e87ac5f42225ebdfdf6aa3c03 Mon Sep 17 00:00:00 2001 From: Dimoshka Date: Tue, 20 Oct 2026 14:20:15 +0000 Subject: [PATCH 04/12] docs(adr): record the Melos 8 tooling line The spec pinned Melos 7 while 8.9.0 was the current pub.dev release, and the question of the line was open as Q2 with the technical check T12 on the script syntax. The owner approved the Melos 8 line on 2026-10-20. The record is needed because two constraints are not visible from the pubspecs alone: Melos 8 rewrites a nested melos call to 'dart run melos:melos' only in the exec: and steps: forms, and two dependencies cannot move because the generators pin build ^4.0.4 and genkit_openai pins openai_dart ^8.1.0. Signed-off-by: Dimoshka --- docs/adr/0011-melos-8-tooling.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 docs/adr/0011-melos-8-tooling.md diff --git a/docs/adr/0011-melos-8-tooling.md b/docs/adr/0011-melos-8-tooling.md new file mode 100644 index 0000000..3faad3c --- /dev/null +++ b/docs/adr/0011-melos-8-tooling.md @@ -0,0 +1,32 @@ +# 0011. Melos 8 tooling line + +- Status: Accepted +- Date: 2026-10-20 + +## Context +The workspace was on Melos 7.8.2 while Melos 8.9.0 is the current pub.dev release, and the spec pinned the old line in several places. The question of the Melos line was open as Q2 in `docs/spec/open-questions.md`, with the technical check T12 covering the script syntax. The Dart SDK that ships with Flutter stable no longer has `dart global activate`, so a global Melos installation is no longer a practical way to run the scripts. + +Melos 8 also changed how the scripts are written. A nested Melos call is rewritten to `dart run melos:melos` only in the `exec:` and `steps:` forms. A legacy plain-string script is handed to the shell unchanged and fails with `melos: not found` when no global `melos` binary is on `PATH`. + +Two dependencies could not move to their latest versions. `build_runner` 2.17.1 requires `build >=5.0.0 <5.1.0`, while `injectable_generator` 3.1.3 and `schemantic_builder` 1.0.0 both pin `build: ^4.0.4`; `build_runner` 2.17.0 is retracted on pub.dev. `openai_dart` stays on the 8.1.x line because `genkit_openai` 1.0.0 pins `openai_dart: ^8.1.0`. + +## Decision +The owner approved the Melos 8 line on 2026-10-20. This closes Q2 and the technical check T12. + +Melos runs from the workspace lock file: `dart run melos:melos run