-
-
Notifications
You must be signed in to change notification settings - Fork 2
Added --use-caching flag to maintain a persisted cache to speed-up the analysis using #50
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
Conversation
Test Results42 tests +4 42 ✅ +4 33s ⏱️ +2s Results for commit 807bcec. ± Comparison against base commit 2344d84. This pull request removes 4 and adds 8 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
7bc5d20 to
c287896
Compare
99e61fd to
c590561
Compare
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.
Pull Request Overview
This PR adds a package‐level cache to the analysis process, controlled by new CLI flags and configuration properties.
- Introduce
UseCachingandCacheFilePathoptions toAnalyzeCommandSettingsand pass them through toCSharpProjectAnalyzer. - Implement
PackageInfoCollection.TryInitializeFromCacheandWriteToCacheusing MemoryPack to load/save cached package metadata. - Update projects, tests, and documentation to reference
Nameinstead ofIdonPackageInfoand bump various package versions.
Reviewed Changes
Copilot reviewed 23 out of 25 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| PackageGuard.csproj | Upgrade configuration packages and add Pathy reference |
| AnalyzeCommandSettings.cs | Add UseCaching and CacheFilePath CLI options |
| AnalyzeCommand.cs | Pass caching settings into analyzer |
| PackageInfoCollection.cs | Add cache load/save, rename constructor to take logger |
| PackageInfo.cs | Rename Id→Name, mark [MemoryPackable] |
| NuGetPackageAnalyzer.cs | Propagate source list to Find and metadata retrieval |
| CSharpProjectAnalyzer.cs | Wire up cache logic in ExecuteAnalysis |
| Multiple test/spec files | Update to use Name and add caching specs |
| README.md | Document new CLI flags and caching details |
Comments suppressed due to low confidence (3)
README.md:154
- [nitpick] This new header has no accompanying text; consider adding an explanation of the caching feature or removing the empty section to keep the docs clear.
### Speed-up the analysis using caching
README.md:172
- [nitpick] The backlog list contains duplicated and inconsistent bullet formatting; clean up or reformat the sections under “Major features”/“Minor features” for readability.
**Major features**
Src/PackageGuard.Specs/CSharpProjectAnalyzerSpecs.cs:535
- There’s no test verifying that when
UseCachingis false, no cache file is written; consider adding a negative test to ensure the cache path is untouched when caching is disabled.
public async Task Creates_a_cache_if_asked_for()
110dac2 to
b003786
Compare
Pull Request Test Coverage Report for Build 16241778058Details
💛 - Coveralls |
b449f8a to
bd404fd
Compare
bd404fd to
807bcec
Compare
Introduces a package caching mechanism to speed up future analysis in the system. It allows caching of license information and other package metadata, saving it to a default location or a user-specified path, so that subsequent runs can leverage this cached data, reducing the overhead of fetching the same information repeatedly. T
Several additions were made to configuration files, build scripts, and command-line options, such as the
--use-cachingflag for enabling caching and--cache-file-pathfor specifying the cache file location. These changes aim to optimize performance, streamline processes, and improve usability when working on multiple or repeated project analyses.PackageGuardCloses #44