moon
moon copied to clipboard
[feature] Improve moon ci affected project detection
Is your feature request related to a problem? Please describe.
Currently, moon ci detects affected tasks based only on input files/env vars. This means that when dependencies update (e.g., in /Cargo.lock or /yarn.lock), tasks don’t get triggered unless the root lock file is in inputs.
But adding the lock file to inputs marks all projects as affected, even if only one dependency changed. This slows down CI unnecessarily.
Describe the solution you'd like
moon ci should be able to track which projects are actually affected when a lock file changes.
I'm not sure what the best design for this would be. The key point is that CI should rebuild only the projects that had dependency updates, rather than affecting everything or nothing.
Additional context
Created an RFC that includes this: https://github.com/moonrepo/moon/issues/1985