-
Notifications
You must be signed in to change notification settings - Fork 352
Remove ReporterInput.packageConfigurationProvider
#8039
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5555871
to
f296f2a
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #8039 +/- ##
=========================================
Coverage 67.16% 67.16%
+ Complexity 2054 2052 -2
=========================================
Files 358 358
Lines 17171 17166 -5
Branches 2462 2462
=========================================
- Hits 11533 11530 -3
+ Misses 4615 4613 -2
Partials 1023 1023
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
bdb13a2
to
87cd546
Compare
ReporterInput.packageConfigurationProvider
FYI, the SPM test update is part of my #8119. |
sschuberth
requested changes
Jan 16, 2024
87cd546
to
c116b18
Compare
c116b18
to
7a9fb30
Compare
Prepare for making use of it in a following change. While at it make `OrtResult` implement `PackageConfigurationProvider` to document that the added API is identical with the interface. Signed-off-by: Frank Viernau <frank_viernau@epam.com>
Include the package configurations into the `OrtResult` and adjust `processAllCopyrightStatements()` to consume them from the `OrtResult`. This prepares for only passing on `OrtResult`s instead of `OrtResult` `PackageConfigurationProvider` tuples. Signed-off-by: Frank Viernau <frank_viernau@epam.com>
Retrieve all package configurations from the provider earlier and only once instead of twice, and integrate them into the input `OrtResult` before passing the `OrtResult` to the evaluator. This obviously makes it unnecessary to pass the `PackageConfigurationProvider` to the evaluator and prepares for removing the corresponding parameters. Until then, just pass the `OrtResult` as package configuration provider, to avoid resolving the package configurations again. Signed-off-by: Frank Viernau <frank_viernau@epam.com>
Retrieve all package configurations from the provider earlier, and integrate them into the `OrtResult` before passing the `OrtResult` to the reporters. This obviously makes it unnecessary to pass the `PackageConfigurationProvider` to the reporters and prepares for removing the corresponding property from `ReporterInput`, so that it does not get passed around anymore. Until then, just pass the `OrtResult` as package configuration provider, to avoid resolving the package configurations again. Signed-off-by: Frank Viernau <frank_viernau@epam.com>
All callers have been changed to include the package configuration from the provider into the `OrtResult` before passing it to that constructor. So, the parameter `packageConfigurationProvider` has become redundant and can be removed. Signed-off-by: Frank Viernau <frank_viernau@epam.com>
The reporter command has been changed to include all package configurations into the provided `OrtResult`. So, `ReporterInput.packageConfigurationProvider` has become redundant. Stop using it to prepare for its removal. Signed-off-by: Frank Viernau <frank_viernau@epam.com>
The reporter command ensures that all package configurations are contained in the ORT result. So, the resolution provider is not necessary anymore. Signed-off-by: Frank Viernau <frank_viernau@epam.com>
7a9fb30
to
3e54e5e
Compare
sschuberth
approved these changes
Jan 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
This PR first of all ensures that the
evaluator
andreporter
andlist-copyrights
commands add all package configurations to theOrtResult
before passing it around, and applies resulting simplifications.This prepares for changing
OrtResult.getIssues()
to filter the issues by path excludes in a following PR.As a I nice side effect, package configurations are now only resolved once per CLI command run instead of multiple times.
Part of #7921.