Skip to content
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

model: Remove the remaining uses of SortedSet / SortedMap from classes which get serialized #8705

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

fviernau
Copy link
Member

See individual commits.

Fixes #6235.

@sschuberth
Copy link
Member

Fixes #6235.

I did a quick search across the code base, and I've found a use of toSortedSet() (thought not in the model) that you might want to remove as well as part of this PR:

copyrightGarbage = CopyrightGarbage(copyrightGarbage.toSortedSet()),

DependencyReference(1),
DependencyReference(2)
)
val fragments = sortedSetOf(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit message: Probably prefer style over test as the commit type.

@fviernau fviernau marked this pull request as draft May 28, 2024 07:48
auto-merge was automatically disabled May 28, 2024 07:48

Pull request was converted to draft

@fviernau
Copy link
Member Author

Note to myself: Test in AnalyzerResultBuilder now fails because the assertion now checks:
AnalyzerResult.equals() -> DependencyGraph.equals() -> scopeRoots.equals()
which return false, while previously, scopeRoots() was a SortedSet which used compareTo().

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
Improve readability, and while at it make use of the default value for
scope roots in two of the calls.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
Only sort on serialization for human readability and reproducibility.
Also, remove the now unused comparator, which was used only by tests
before.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
@fviernau fviernau force-pushed the dependency-reference-no-comparable branch from 9ece42c to a523522 Compare June 18, 2024 08:50
Copy link

codecov bot commented Jun 18, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 67.74%. Comparing base (631db0f) to head (a523522).

Files Patch % Lines
...el/src/main/kotlin/utils/DependencyGraphBuilder.kt 0.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8705      +/-   ##
============================================
- Coverage     67.79%   67.74%   -0.06%     
  Complexity     1164     1164              
============================================
  Files           243      243              
  Lines          7711     7710       -1     
  Branches        861      861              
============================================
- Hits           5228     5223       -5     
- Misses         2127     2131       +4     
  Partials        356      356              
Flag Coverage Δ
funTest-non-docker 33.96% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

model: Eliminate sorted collections
2 participants