moon icon indicating copy to clipboard operation
moon copied to clipboard

[feature] Improve moon ci affected project detection

Open akostylev0 opened this issue 8 months ago • 1 comments

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

Related discussion

akostylev0 avatar Mar 13 '25 18:03 akostylev0

Created an RFC that includes this: https://github.com/moonrepo/moon/issues/1985

milesj avatar May 26 '25 20:05 milesj