-
Notifications
You must be signed in to change notification settings - Fork 18
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
Calculate a partial fence difference based on git changes since a provided oid #101
Calculate a partial fence difference based on git changes since a provided oid #101
Conversation
Adds a faster file provider that discovers source and fence files with a fast asyncronous file walk rather than by relying on typescript to perform a syncronous walk + parse of the program. We still use typescript to parse compilerOptions, but since we no longer rely on the typescript program walk to identify files, we stub out file discovery so only the initial config partse happens. Also adds config options to support switching between the two providers, since it will only work when all source files you intend to check fences against fall under your rootDirs. This is the case for OWA, but I don't know what other consumers look like. Depends on u/mahuangh/faster-source-providers-2
…set files in fdir source file provider
I realized while reviewing this change that the current way this is structured mishandles the adding of empty "dependencies" or "imports" sections. It treats that as a noop when in reality is a more constraining fence. |
Added tests to the fence and import diffing logic, and covered the cases where sections are added / removed. Also updated the diffing logic to consider the removal of tags, so that when a tag is removed the whole fence is re-checked. Together these cases should handle some false-negatives from the incremental fence check that we were missing in the full fence check. |
…-source-providers-6-partial-evaluation
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.
This change got pretty big after adding tests for the utility functions. Let me know if you want me to break it up into pieces again.
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.
Lots of comments. This is a tricky change — nice work! It's frustrating that there are so many cases where we need to bail out on validation, but it should be a big win for the most common cases.
I think I updated to the latest feedback, let me know if I missed something |
Adds a CLI flag to only check fences changed since a given git OID / refname.
This diffs against the current git index to serve everything from git's object DB instead of going to disk.
The process is:
--sinceGitHash
on the command line