From 0b16c51682c8e130ab40f52dac40b00af7347263 Mon Sep 17 00:00:00 2001 From: MahdiBM Date: Mon, 27 Jan 2025 11:22:21 +0330 Subject: [PATCH] Fix nightlies --- .gitignore | 96 ++----------------- Sources/EnumeratorMacro/Enumerator.swift | 4 +- .../Types/WithNormalizedTypeName.swift | 2 +- 3 files changed, 11 insertions(+), 91 deletions(-) diff --git a/.gitignore b/.gitignore index 330d167..8b393e9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,90 +1,10 @@ -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## User settings +.DS_Store +/.build +/.index-build +/Packages +/*.xcodeproj xcuserdata/ - -## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) -*.xcscmblueprint -*.xccheckout - -## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) -build/ DerivedData/ -*.moved-aside -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 - -## Obj-C/Swift specific -*.hmap - -## App packaging -*.ipa -*.dSYM.zip -*.dSYM - -## Playgrounds -timeline.xctimeline -playground.xcworkspace - -# Swift Package Manager -# -# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. -# Packages/ -# Package.pins -# Package.resolved -# *.xcodeproj -# -# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata -# hence it is not needed unless you have added a package configuration file to your project -# .swiftpm - -.build/ - -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -# Pods/ -# -# Add this line if you want to avoid checking in source code from the Xcode workspace -# *.xcworkspace - -# Carthage -# -# Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts - -Carthage/Build/ - -# Accio dependency management -Dependencies/ -.accio/ - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. -# Instead, use fastlane to re-generate the screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://docs.fastlane.tools/best-practices/source-control/#source-control - -fastlane/report.xml -fastlane/Preview.html -fastlane/screenshots/**/*.png -fastlane/test_output - -# Code Injection -# -# After new code Injection tools there's a generated folder /iOSInjectionProject -# https://github.com/johnno1962/injectionforxcode - -iOSInjectionProject/ +.netrc +.swiftpm +Package.resolved diff --git a/Sources/EnumeratorMacro/Enumerator.swift b/Sources/EnumeratorMacro/Enumerator.swift index 42116c5..1a98e2a 100644 --- a/Sources/EnumeratorMacro/Enumerator.swift +++ b/Sources/EnumeratorMacro/Enumerator.swift @@ -124,12 +124,12 @@ private var localizationParameters: [Any] { """# ) public enum ErrorMessage { - public static let localizationServiceType: LocalizationServiceProtocol.Type? = nil + public static let localizationServiceType: (any LocalizationServiceProtocol.Type)? = nil case allergenAlreadyAdded // business_error case alreadyOngoingInventory case apiKeyWithoutEnoughPermission(integration: String, other: Bool?, Int) - case databaseError(error: Error, isConstraintViolation: Bool) // business_error; l8n_params: + case databaseError(error: any Error, isConstraintViolation: Bool) // business_error; l8n_params: public var caseName: String { self.subtype.rawValue diff --git a/Sources/EnumeratorMacroImpl/Types/WithNormalizedTypeName.swift b/Sources/EnumeratorMacroImpl/Types/WithNormalizedTypeName.swift index d3bcd26..d6bf72c 100644 --- a/Sources/EnumeratorMacroImpl/Types/WithNormalizedTypeName.swift +++ b/Sources/EnumeratorMacroImpl/Types/WithNormalizedTypeName.swift @@ -5,7 +5,7 @@ protocol WithNormalizedTypeName { func bestEffortTypeName(_ type: T.Type = T.self) -> String { switch type { - case let customType as WithNormalizedTypeName.Type: + case let customType as any WithNormalizedTypeName.Type: customType.normalizedTypeName default: Swift._typeName(type, qualified: false)