Prepare for breaking changes in NextcloudKit 6.0#77
Conversation
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
There was a problem hiding this comment.
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 ReportAttention: Patch coverage is
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. 🚀 New features to boost your workflow:
|
No description provided.