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

Do not use sorted sets for package references in Scope and PackageReferences #7010

Merged
merged 10 commits into from
May 23, 2023

Conversation

fviernau
Copy link
Member

@fviernau fviernau commented May 17, 2023

See individual commits.

Part of #6235 .

@fviernau fviernau requested a review from a team as a code owner May 17, 2023 10:37
@fviernau fviernau marked this pull request as draft May 17, 2023 10:37
model/src/main/kotlin/Scope.kt Fixed Show fixed Hide fixed
model/src/main/kotlin/Scope.kt Fixed Show fixed Hide fixed
@fviernau fviernau force-pushed the scope-no-sorted-set branch 2 times, most recently from 9ae37e2 to 1a8f2d0 Compare May 17, 2023 11:08
@codecov
Copy link

codecov bot commented May 17, 2023

Codecov Report

Patch coverage: 53.84% and project coverage change: -0.03 ⚠️

Comparison is base (f4f59dc) 64.28% compared to head (d315321) 64.26%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7010      +/-   ##
============================================
- Coverage     64.28%   64.26%   -0.03%     
+ Complexity     1976     1974       -2     
============================================
  Files           332      333       +1     
  Lines         16734    16741       +7     
  Branches       2382     2381       -1     
============================================
+ Hits          10758    10759       +1     
- Misses         4937     4943       +6     
  Partials       1039     1039              
Flag Coverage Δ
funTest-non-docker 29.58% <0.00%> (-0.02%) ⬇️
test 40.25% <53.84%> (+0.03%) ⬆️

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

Impacted Files Coverage Δ
analyzer/src/main/kotlin/managers/GoDep.kt 82.30% <0.00%> (-1.54%) ⬇️
analyzer/src/main/kotlin/managers/utils/Graph.kt 81.81% <0.00%> (-4.55%) ⬇️
model/src/main/kotlin/utils/SortedSetConverters.kt 0.00% <0.00%> (ø)
...gers/nuget/src/main/kotlin/utils/NuGetInspector.kt 75.49% <ø> (-0.17%) ⬇️
...rs/python/src/main/kotlin/utils/PythonInspector.kt 70.24% <ø> (-0.15%) ⬇️
utils/spdx/src/main/kotlin/model/SpdxDocument.kt 66.66% <ø> (ø)
utils/spdx/src/main/kotlin/model/Converters.kt 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@fviernau fviernau marked this pull request as ready for review May 17, 2023 14:32
@fviernau fviernau force-pushed the scope-no-sorted-set branch 6 times, most recently from ad38729 to ba64a24 Compare May 22, 2023 09:04
@sschuberth sschuberth enabled auto-merge (rebase) May 23, 2023 07:03
Simplify an upcoming change.

Signed-off-by: Frank Viernau <[email protected]>
The order in which the direct dependencies of each tree node are listed
does not matter. It does matter that the trees are equivalent.

Adjust `scopeDependencies()` and `dumpDependencies()` to produce a
deterministic result by using sorted order of children for the
conversion to `String`.

Signed-off-by: Frank Viernau <[email protected]>
Do not assert the order of the direct dependencies.

Signed-off-by: Frank Viernau <[email protected]>
This simplifies an upcoming change.

Signed-off-by: Frank Viernau <[email protected]>
Make the output more deterministics and independent of the ordering of
the input. This simplifies an upcoming change.

Part of #7023.

Signed-off-by: Frank Viernau <[email protected]>
The previous assertion was asserting too much, because only equality of
the JSON is required but the order of the elements does not matter.
Relax the asserting also to simplify an upcoming change.

Signed-off-by: Frank Viernau <[email protected]>
Only sort on serialization for human readability and reproducibility.

Signed-off-by: Frank Viernau <[email protected]>
@sschuberth sschuberth merged commit 622ab39 into main May 23, 2023
@sschuberth sschuberth deleted the scope-no-sorted-set branch May 23, 2023 08:03
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.

3 participants