Skip to content

fix(ci): globally activate melos so exec subprocesses find the binary#56

Merged
fres-sudo merged 7 commits into
masterfrom
ci-melos-not-found-fix
Jul 12, 2026
Merged

fix(ci): globally activate melos so exec subprocesses find the binary#56
fres-sudo merged 7 commits into
masterfrom
ci-melos-not-found-fix

Conversation

@fres-sudo

Copy link
Copy Markdown
Owner

Description

melos run format/lint/test scripts use the exec: directive, which internally spawns child shells that call the bare melos binary. Since melos was only available as a dev dependency (invoked via dart run melos), it was never on $PATH, causing those child processes to fail with melos: not found.

This adds a step to globally activate melos and append $HOME/.pub-cache/bin to $GITHUB_PATH before bootstrapping the workspace, so the binary is resolvable in all subsequent steps.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have used fvm for all flutter commands.
  • My code follows the style guidelines of this project (fvm flutter format .).
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings (fvm flutter analyze).
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

fres-sudo and others added 7 commits July 11, 2026 15:22
…nary

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Generated mocks and a handful of non-generated test files still
referenced domain types and repository interfaces at their old
in-feature paths (e.g. feature_orders/domain/models/order.dart).
Those types have since been extracted to shared packages:
inventory_contracts, order_management, discounts, catalog,
and app_settings. Update every import to the canonical path so
dart analyze passes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ts in mocks

- Update MockOrdersRepository.voidOrder in 3 mocks files: return type
  was Result<Order> but interface now returns Result<VoidOrderResult>
  (= Record {Order order, bool wasAlreadyVoided}); parameter was int?
  but is non-nullable int
- Fix feature_products/domain/* imports in 5 products mock files and
  the orphaned products_bloc_test.dart: types were extracted to
  package:catalog (models, repositories, blocs)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ts in mocks

- Revert accidental VoidOrderResult replacement in createOrder/updateOrder/
  completeOrder mock bodies (only voidOrder should return VoidOrderResult)
- Fix order_detail_cubit_test: stub voidOrder with record literal
  {order: x, wasAlreadyVoided: false}; replace any with literal 7 for
  non-nullable int parameter in verifyNever
- Fix printer_section_test: stale feature_settings/domain and
  feature_settings/presentation/blocs imports → package:app_settings

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…peline

Branch was 2 commits behind master's formatting fixes; merging alone
reintroduced format failures because those master commits were formatted
with a different dart format version than the pinned SDK (3.38.5) uses.
Re-ran `melos run format:fix` to reconcile.

Also fixes issues verified by running the full CI pipeline locally that
were blocking `lint`/`test` from ever completing:
- products_repository_test.mocks.dart and friends were stale
  (missing MockInventoryRepository) after a repository interface change;
  regenerated via build_runner and restored the DAO .g.dart mixins that
  build_runner incorrectly empties for cross-package drift tables.
- printer_section_test.dart had a typo (_alues) that made a mocked
  field always null, causing undefined_identifier analyzer errors.
- app_shell_sidebar.dart had a dead, always-default local parameter
  shadowing the real showCollapseToggle field.
- active_order_bloc_test.dart had an unused discounts import.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@fres-sudo
fres-sudo merged commit 1f894e6 into master Jul 12, 2026
1 check failed
@fres-sudo
fres-sudo deleted the ci-melos-not-found-fix branch July 12, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant