-
-
Notifications
You must be signed in to change notification settings - Fork 644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Register synthetic targets for subsystems. #17653
Conversation
Sorry that I haven't reviewed this yet: will check it out by EOD. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting idea. How will the dependency rules be implemented?
For --changed-since
, are you trying to get changes in the subsystem to result in changes to impacted targets to show up? How would we know a subsystem has changed? We don't have access to the prior values of the options
After adding synthetic targets for config files, such as Hmm, this gets me thinking, aren't the subsystem values part of the hash value, so if there is a config change that would already invalidate the graph depending on that subsystem?
Similar here I think, rather crude that if you make any change in |
Only at runtime: that's the reasoning behind runtime graph awareness: #11206 |
Oh.. ok. Let me see if I understand this correctly. So, this would mean that if we invalidate target If so, I feel that it's less bad to have these coarse invalidations going, as it may report more targets as changed, but the actual work performed will be correct. |
The effect of what you're describing is that adding a new blank line to |
It would only invalidate for those subsystems you have configuration for in your Also, more often than not, the change you make will be relevant to some part of the project, rather than simply being just a formatting change, so to me it would make sense to invalidate a lot in order to pick up the change properly rather than not at all. This is no worse than when you regenerate your lockfile and it gives you a pretty big blast radius. |
How so? How will you know the subsystem is defined in pants.toml? Parse the TOML? |
It's in the PR description screen shot and text ;) (and further discussed in my comment here #17653 (comment) ) |
No: it would mean that we'd be able to precisely report the files that are consumed in order to run, say,
Actual cache keys would be unaffected by #11206, same as they are not affected here: the cache key is still based on what |
Closing as stale. |
This is the first step towards having proper dependencies to subsystem configurations.
Planned next step is to add a dependency on synthesized configuration targets based on option value sources per subsystem.
Can eventually be used to address things like #14724
Example config source info as available already:
This adds quite a number of targets to the root, which can easily be filtered out however: