Conversation
marekVrican
reviewed
Jul 30, 2025
andrej-jasso
reviewed
Aug 1, 2025
There was a problem hiding this comment.
Pull Request Overview
This PR migrates GoodNetworking from version 3.x to 4.0, updating from Swift 5.x to Swift 6.2 compatibility and removing the Alamofire dependency in favor of a custom networking implementation.
- Complete rewrite of the core networking layer using native URLSession instead of Alamofire
- Introduction of a new global NetworkActor for thread-safe network operations
- Simplified error handling model with only 3 error types: local, remote, and decoding
Reviewed Changes
Copilot reviewed 82 out of 87 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/GoodNetworkingTests/Tests/*.swift | All test files removed - likely being replaced with new test suite |
| Tests/GoodNetworkingTests/Services/TestingLogger.swift | Removed GoodLogger dependency test utility |
| Tests/GoodNetworkingTests/Resources/*.json | Test resource files removed |
| Tests/GoodNetworkingTests/Models/*.swift | Test model files removed |
| Tests/GoodNetworkingTests/Endpoints/*.swift | Test endpoint definitions removed |
| Sources/Mockable/ | Mockable module completely removed |
| Sources/GoodNetworking/Session/NetworkSession.swift | Core rewrite - replaced Alamofire with URLSession-based implementation |
| Sources/GoodNetworking/Utilities/ | New utility classes: NetworkActor and AsyncLock for concurrency |
| Sources/GoodNetworking/Models/ | New model definitions for URLConvertible, JSON, HTTPHeader, HTTPMethod |
| Sources/GoodNetworking/Interception/ | New authentication and retry system replacing Alamofire interceptors |
| Sources/GoodNetworking/Logging/ | Local logging system replacing GoodLogger dependency |
Comments suppressed due to low confidence (1)
Sources/GoodNetworking/Session/NetworkSession.swift:262
- The code uses preconditionFailure for encoding raw data into query parameters, but then logs an error message. This inconsistent error handling approach could lead to unexpected crashes versus graceful error handling.
request.httpBody = try endpoint.parameters?.data()
matusklasovity
requested changes
Aug 11, 2025
GoodNetworking-Sample/GoodNetworking-Sample/Managers/SampleNetworkSessions.swift
Show resolved
Hide resolved
andrej-jasso
approved these changes
Aug 11, 2025
65087c9 to
58c4a05
Compare
This was referenced Aug 12, 2025
# Conflicts: # Package.swift # Sources/GoodNetworking/Executor/DeduplicatingRequestExecutor.swift # Sources/GoodNetworking/Executor/RequestExecuting.swift # Sources/GoodNetworking/Providers/DeduplicatingResultProvider.swift # Sources/GoodNetworking/Providers/DefaultSessionProvider.swift # Sources/GoodNetworking/Session/LoggingEventMonitor.swift # Sources/GoodNetworking/Session/NetworkSessionConfiguration.swift # Sources/GoodNetworking/Wrapper/Resource.swift
+ new Endpoint url() default implmentation
481b0f6 to
245d27d
Compare
marekVrican
approved these changes
Aug 14, 2025
matusklasovity
approved these changes
Aug 15, 2025
This was referenced Aug 21, 2025
Closed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

## Migration guide:
import Alamofireand@preconcurrency import AlamofireBaseUrlProviderwithURLConvertiblefunc resolveBaseUrl() async -> String?->func resolveUrl() async -> URL?(in URL providers)func url(on baseUrl: String) throws -> URLin Endpoints withfunc url(on baseUrl: any URLConvertible) async -> URL?or remove the function completely where default implementation is sufficient. Replacethrow-s withreturn nil.var path: String {withvar path: URLConvertible {andimport GoodNetworkingwhere required. Take care not to replace unrelated implementations.URL(string:)AuthenticatorInterceptors with new, simplerAuthenticatorprotocolNetworkError:local(network failure),remote(Invalid HTTP status code, server errors) anddecoding(decoding failures).