[hooks_runner] Include offending file path in 'File modified during build' error

Open Beginner friendly
#3,852 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
dart
Domain
backend

Research direction

Read pkgs/hooks_runner/lib/src/build_runner/build_runner.dart at the two cited call sites (lines 603–613 and 919–931), then check how modifiedDuringBuild is returned by dependenciesHashes.updateHashes(...). Confirm the reported failure can be reproduced before changing anything; done means both error messages identify the offending file path.

Written by the indexing model from the issue text.

Description

needs-triage package:hooks_runner

In build_runner.dart and lines 919-931, dependenciesHashes.updateHashes(...) already returns final modifiedDuringBuild (the offending Uri), but both call sites ignore it and only log 'File modified during build. Build must be rerun.'.

Printing modifiedDuringBuild there would make it immediately obvious which file caused the rebuild failure.

Context: https://github.com/dart-lang/native/issues/3837

Note: This bug is AI generated. I've reviewed it and it makes sense, but I haven't attempted to repro. Make sure the bug repros before trying to fix it.

Dominant language
Dart
Stars
280
Forks
166
Avg merge
3d 1h
Merged PRs (30d)
35

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dart-lang/native

All issues in dart-lang/native

Similar issues

More Dart issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.