-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Issue Description
Multiple types are declared in multiple files, causing "Invalid redeclaration" compilation errors. This creates ambiguity for the Swift compiler.
Affected Types and Files
Infrastructure-Network Module
APIConfiguration: Declared in bothAPI/APIModels.swiftandConfiguration/APIConfiguration.swiftNetworkError: Declared in bothModels/NetworkModels.swiftandErrors/NetworkError.swiftHTTPMethod: Declared in bothModels/NetworkModels.swiftandProtocols/APIEndpoint.swiftAPIEndpoint: Declared in bothProtocols/APIEndpoint.swiftandAPI/APIModels.swiftRetryPolicy: Declared in bothConfiguration/APIConfiguration.swiftandModels/NetworkModels.swiftAuthenticationProvider: Declared in bothProtocols/APIEndpoint.swiftandProtocols/NetworkProtocols.swift
Infrastructure-Storage Module
StorageConfiguration: Declared in bothConfiguration/StorageConfiguration.swiftandProtocols/StorageProtocols.swiftRepositoryError: Declared in bothRepositories/DefaultCollectionRepository.swiftandRepositories/Insurance/DefaultInsurancePolicyRepository.swift
UI-Components Module
EnhancedSearchBarproperties:searchText,isVoiceSearchActive,showFiltersdeclared multiple times within the same struct
Root Cause
- Types were accidentally defined in multiple files during refactoring
- Inconsistent organization of types across modules
- Missing centralized type definitions
Solution Plan
-
Choose canonical locations for each type:
APIConfiguration→Infrastructure-Network/Configuration/APIConfiguration.swiftNetworkError→Infrastructure-Network/Errors/NetworkError.swiftHTTPMethod→Infrastructure-Network/Models/NetworkModels.swiftAPIEndpoint→Infrastructure-Network/Protocols/APIEndpoint.swift(as protocol)RetryPolicy→Infrastructure-Network/Configuration/APIConfiguration.swiftAuthenticationProvider→Infrastructure-Network/Protocols/NetworkProtocols.swift(as protocol)StorageConfiguration→Infrastructure-Storage/Configuration/StorageConfiguration.swiftRepositoryError→Infrastructure-Storage/Errors/RepositoryError.swift(new centralized location)
-
Remove duplicate definitions from non-canonical locations
-
Update imports in files that reference these types
-
Ensure proper access control (public/internal) for shared types
Priority
High - These errors prevent successful compilation after import issues are resolved.
Acceptance Criteria
- All "Invalid redeclaration" errors are resolved
- Each type has a single, canonical definition
- All references to types use proper imports
- Module builds successfully without redeclaration errors
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working