Petevdp/resolve mock dependencies #8951
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
fixes #8907
DependencyResolver.resolve resolves the functional dependencies for a given file, but it doesn't include potential mock dependencies. This means that, as the issue lays out, updates to mocks won't register as an affecting change for tests.
The changes I made will include mocks with names matching any functional dependency during the resolution process. Note this won't take into account any in-code dependency declarations, but it solves the problem in an unobtrusive way.
Test plan
I added a unit test describing this new requirement, and it passes along with all previously passing tests. There are some failing tests when running the full test suite, but they appear to be pre-existing.
Here's the output of running the dependency resolver tests:
This is my first pull request, so apologies in advance for any miss-steps. I'll do my best to correct them quickly!