Skip to content

Prepare for breaking changes in NextcloudKit 6.0#77

Merged
claucambra merged 3 commits into
mainfrom
feature/nckit-6
May 20, 2025
Merged

Prepare for breaking changes in NextcloudKit 6.0#77
claucambra merged 3 commits into
mainfrom
feature/nckit-6

Conversation

@claucambra
Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
@claucambra claucambra added this to the 2.1 milestone May 19, 2025
@claucambra claucambra requested a review from Copilot May 19, 2025 07:47
@claucambra claucambra self-assigned this May 19, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 prepares the codebase for breaking changes in NextcloudKit 6.0 by updating certain variable declarations and error logging practices. Key changes include:

  • Changing mutable declarations (var) to immutable ones (let) where appropriate in tests.
  • Updating error logging statements to use error.errorDescription and ensuring proper privacy handling.
  • Modifying NKFile instantiations in tests to allow property modifications.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Tests/NextcloudFileProviderKitTests/FilesDatabaseManagerTests.swift Changed rootMetadata from var to let for immutability.
Tests/Interface/MockRemoteItem.swift Updated NKFile instantiation from let to var to permit mutations.
Tests/Interface/MockRemoteInterface.swift Updated NKFile instantiation from let to var to permit mutations.
Sources/NextcloudFileProviderKit/Item/Item+Modify.swift Revised error logging to include error.errorDescription and apply privacy labels for the filename.
Sources/NextcloudFileProviderKit/Interface/NextcloudKit+RemoteInterface.swift Revised error logging with error.errorDescription and privacy attributes.
Sources/NextcloudFileProviderKit/Enumeration/Enumerator.swift Revised error logging (in two places) to use error.errorDescription with privacy attributes.
Comments suppressed due to low confidence (4)

Sources/NextcloudFileProviderKit/Item/Item+Modify.swift:720

  • Ensure that error.errorDescription provides a comprehensive description of the error; verify that no critical context is lost with this change.
Item: \(modifiedItem.filename, privacy: .public)

Sources/NextcloudFileProviderKit/Interface/NextcloudKit+RemoteInterface.swift:442

  • Confirm that error.errorDescription is correctly implemented for all error cases to maintain reliable error messaging.
.error("Error during sync capabilities fetch: \(error.errorDescription, privacy: .public)")

Sources/NextcloudFileProviderKit/Enumeration/Enumerator.swift:154

  • Verify that using error.errorDescription in place of the raw error object still delivers the intended debugging information without compromising on clarity.
Error: \(error.errorDescription, privacy: .public)

Sources/NextcloudFileProviderKit/Enumeration/Enumerator.swift:418

  • Double-check that error.errorDescription works as expected in all cases, ensuring that the detailed error context is maintained for troubleshooting.
Error: \(error.errorDescription, privacy: .public)

@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2025

Codecov Report

Attention: Patch coverage is 37.50000% with 5 lines in your changes missing coverage. Please review.

Project coverage is 81.08%. Comparing base (cdcb255) to head (b446ae7).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...tcloudFileProviderKit/Enumeration/Enumerator.swift 0.00% 2 Missing ⚠️
...es/NextcloudFileProviderKit/Item/Item+Modify.swift 0.00% 2 Missing ⚠️
...erKit/Interface/NextcloudKit+RemoteInterface.swift 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #77      +/-   ##
==========================================
- Coverage   81.10%   81.08%   -0.02%     
==========================================
  Files          62       62              
  Lines       13505    13505              
==========================================
- Hits        10953    10951       -2     
- Misses       2552     2554       +2     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@claucambra claucambra merged commit d73df81 into main May 20, 2025
1 of 3 checks passed
@claucambra claucambra deleted the feature/nckit-6 branch May 20, 2025 02:40
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.

2 participants