Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[swift5] update new minimum OS supported versions #13667

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
github "Flight-School/AnyCodable" ~> 0.6.1{{#useAlamofire}}
github "Alamofire/Alamofire" ~> 5.4.3{{/useAlamofire}}{{#usePromiseKit}}
github "mxcl/PromiseKit" ~> 6.15.3{{/usePromiseKit}}{{#useRxSwift}}
github "ReactiveX/RxSwift" ~> 6.2.0{{/useRxSwift}}
github "Flight-School/AnyCodable" ~> 0.6.6{{#useAlamofire}}
github "Alamofire/Alamofire" ~> 5.6.2{{/useAlamofire}}{{#usePromiseKit}}
github "mxcl/PromiseKit" ~> 6.18.1{{/usePromiseKit}}{{#useRxSwift}}
github "ReactiveX/RxSwift" ~> 6.5.0{{/useRxSwift}}
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,10 @@ let package = Package(
.macOS(.v10_15),
{{/useVapor}}
{{^useVapor}}
{{#useAlamofire}}
.iOS(.v10),
.macOS(.v10_12),
.tvOS(.v10),
{{/useAlamofire}}
{{^useAlamofire}}
.iOS(.v9),
.macOS(.v10_11),
.tvOS(.v9),
{{/useAlamofire}}
.watchOS(.v3),
.iOS(.v11),
.macOS(.v10_13),
.tvOS(.v11),
.watchOS(.v4),
{{/useVapor}}
],
products: [
Expand All @@ -31,15 +24,15 @@ let package = Package(
],
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.1"),
.package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.6"),
{{#useAlamofire}}
.package(url: "https://github.com/Alamofire/Alamofire", from: "5.4.3"),
.package(url: "https://github.com/Alamofire/Alamofire", from: "5.6.2"),
{{/useAlamofire}}
{{#usePromiseKit}}
.package(url: "https://github.com/mxcl/PromiseKit", from: "6.15.3"),
.package(url: "https://github.com/mxcl/PromiseKit", from: "6.18.1"),
{{/usePromiseKit}}
{{#useRxSwift}}
.package(url: "https://github.com/ReactiveX/RxSwift", from: "6.2.0"),
.package(url: "https://github.com/ReactiveX/RxSwift", from: "6.5.0"),
{{/useRxSwift}}
{{#useVapor}}
.package(url: "https://github.com/vapor/vapor", from: "4.0.0")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
Pod::Spec.new do |s|
s.name = '{{projectName}}'{{#projectDescription}}
s.summary = '{{.}}'{{/projectDescription}}
{{#useAlamofire}}
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.12'
s.tvos.deployment_target = '10.0'
{{/useAlamofire}}
{{^useAlamofire}}
s.ios.deployment_target = '9.0'
s.osx.deployment_target = '10.11'
s.tvos.deployment_target = '9.0'
{{/useAlamofire}}
s.watchos.deployment_target = '3.0'
s.ios.deployment_target = '11.0'
s.osx.deployment_target = '10.13'
s.tvos.deployment_target = '11.0'
s.watchos.deployment_target = '4.0'
s.version = '{{podVersion}}{{^podVersion}}{{#apiInfo}}{{version}}{{/apiInfo}}{{^apiInfo}}}0.0.1{{/apiInfo}}{{/podVersion}}'
s.source = {{#podSource}}{{& podSource}}{{/podSource}}{{^podSource}}{ :git => '[email protected]:OpenAPITools/openapi-generator.git', :tag => 'v{{#apiInfo}}{{version}}{{/apiInfo}}{{^apiInfo}}}0.0.1{{/apiInfo}}' }{{/podSource}}
{{#podAuthors}}
Expand All @@ -33,14 +26,14 @@ Pod::Spec.new do |s|
s.documentation_url = '{{.}}'
{{/podDocumentationURL}}
s.source_files = '{{swiftPackagePath}}{{^swiftPackagePath}}{{#useSPMFileStructure}}Sources/{{projectName}}{{/useSPMFileStructure}}{{^useSPMFileStructure}}{{projectName}}/Classes{{/useSPMFileStructure}}{{/swiftPackagePath}}/**/*.swift'
s.dependency 'AnyCodable-FlightSchool', '~> 0.6.1'
s.dependency 'AnyCodable-FlightSchool', '~> 0.6.6'
{{#useAlamofire}}
s.dependency 'Alamofire', '~> 5.4.3'
s.dependency 'Alamofire', '~> 5.6.2'
Copy link
Contributor

@Jonas1893 Jonas1893 Oct 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder whether we could be a bit less restrictive here and only pin major versions instead of major and minor version. With ~> 5.6.2 we only allow 5.6.2 and all following patch updates for it. This might not be a problem if there is no other dependency to Alamofire in a project but otherwise a project could never resolve Alamofire 5.7+ versions and is forced to stay on minor version 5.6* until generator is updated again. As Alamofire version policy is also based on semantic versioning this might be ok I think. Just a thought that crossed my mind

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, I agree with you.
Do you suggest keeping the 5.4.3?
Or update it?
Thanks

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey. I would probably still allow the lower AF versions as I know some dependencies still require 5.4*. That's why my suggestion would be to use ~> 5.4 modifier to not break dependency resolution for those.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done 👍

Copy link
Contributor

@Jonas1893 Jonas1893 Oct 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~> 5.4.0 will only allow up to the next minor version, so e.g. AF 5.5.0 would already not be possible to resolve anymore. I think in order to support everything from 5.4.0 until (and not including) the next major version we would need to use ~> 5.4 instead. Then we would also allow 5.5.x, 5.6.y and so on

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is failing... Maybe I will try to revert the dependencies changes and save that for another PR

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes agree its probably better to do this in a separate PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jonas1893 thanks for helping review this PR. If you want to help review more Swift Cliente PRs are you welcome 👍

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @4brunu thx will gladly do so :)

{{/useAlamofire}}
{{#usePromiseKit}}
s.dependency 'PromiseKit/CorePromise', '~> 6.15.3'
s.dependency 'PromiseKit/CorePromise', '~> 6.18.1'
{{/usePromiseKit}}
{{#useRxSwift}}
s.dependency 'RxSwift', '~> 6.2.0'
s.dependency 'RxSwift', '~> 6.5.0'
{{/useRxSwift}}
end
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ targets:
{{projectName}}:
type: framework
platform: iOS
deploymentTarget: "9.0"
deploymentTarget: "11.0"
sources: [{{swiftPackagePath}}{{^swiftPackagePath}}{{#useSPMFileStructure}}Sources{{/useSPMFileStructure}}{{^useSPMFileStructure}}{{projectName}}{{/useSPMFileStructure}}{{/swiftPackagePath}}]
info:
path: ./Info.plist
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Created by https://www.toptal.com/developers/gitignore/api/swift,xcode
# Edit at https://www.toptal.com/developers/gitignore?templates=swift,xcode
# Created by https://www.toptal.com/developers/gitignore/api/xcode,swift
# Edit at https://www.toptal.com/developers/gitignore?templates=xcode,swift

### Swift ###
# Xcode
Expand Down Expand Up @@ -64,9 +64,9 @@ playground.xcworkspace

Carthage/Build/

# Add this lines if you are using Accio dependency management (Deprecated since Xcode 12)
# Dependencies/
# .accio/
# Accio dependency management
Dependencies/
.accio/

# fastlane
# It is recommended to not store the screenshots in the git repo.
Expand All @@ -86,20 +86,15 @@ fastlane/test_output
iOSInjectionProject/

### Xcode ###
# Xcode
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore




## Gcc Patch
/*.gcno
## Xcode 8 and earlier

### Xcode Patch ###
*.xcodeproj/*
!*.xcodeproj/project.pbxproj
!*.xcodeproj/xcshareddata/
!*.xcworkspace/contents.xcworkspacedata
/*.gcno
**/xcshareddata/WorkspaceSettings.xcsettings

# End of https://www.toptal.com/developers/gitignore/api/swift,xcode
# End of https://www.toptal.com/developers/gitignore/api/xcode,swift
21 changes: 8 additions & 13 deletions samples/client/petstore/swift5/alamofireLibrary/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Created by https://www.toptal.com/developers/gitignore/api/swift,xcode
# Edit at https://www.toptal.com/developers/gitignore?templates=swift,xcode
# Created by https://www.toptal.com/developers/gitignore/api/xcode,swift
# Edit at https://www.toptal.com/developers/gitignore?templates=xcode,swift

### Swift ###
# Xcode
Expand Down Expand Up @@ -64,9 +64,9 @@ playground.xcworkspace

Carthage/Build/

# Add this lines if you are using Accio dependency management (Deprecated since Xcode 12)
# Dependencies/
# .accio/
# Accio dependency management
Dependencies/
.accio/

# fastlane
# It is recommended to not store the screenshots in the git repo.
Expand All @@ -86,20 +86,15 @@ fastlane/test_output
iOSInjectionProject/

### Xcode ###
# Xcode
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore




## Gcc Patch
/*.gcno
## Xcode 8 and earlier

### Xcode Patch ###
*.xcodeproj/*
!*.xcodeproj/project.pbxproj
!*.xcodeproj/xcshareddata/
!*.xcworkspace/contents.xcworkspacedata
/*.gcno
**/xcshareddata/WorkspaceSettings.xcsettings

# End of https://www.toptal.com/developers/gitignore/api/swift,xcode
# End of https://www.toptal.com/developers/gitignore/api/xcode,swift
4 changes: 2 additions & 2 deletions samples/client/petstore/swift5/alamofireLibrary/Cartfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "Flight-School/AnyCodable" ~> 0.6.1
github "Alamofire/Alamofire" ~> 5.4.3
github "Flight-School/AnyCodable" ~> 0.6.6
github "Alamofire/Alamofire" ~> 5.6.2
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
"repositoryURL": "https://github.com/Alamofire/Alamofire",
"state": {
"branch": null,
"revision": "f96b619bcb2383b43d898402283924b80e2c4bae",
"version": "5.4.3"
"revision": "8dd85aee02e39dd280c75eef88ffdb86eed4b07b",
"version": "5.6.2"
}
},
{
"package": "AnyCodable",
"repositoryURL": "https://github.com/Flight-School/AnyCodable",
"state": {
"branch": null,
"revision": "69261f239f0fffaf51495dadc4f8483fbfe97025",
"version": "0.6.1"
"revision": "56901f2af3625b38924d488b612e95fe8846ee9b",
"version": "0.6.6"
}
}
]
Expand Down
12 changes: 6 additions & 6 deletions samples/client/petstore/swift5/alamofireLibrary/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import PackageDescription
let package = Package(
name: "PetstoreClient",
platforms: [
.iOS(.v10),
.macOS(.v10_12),
.tvOS(.v10),
.watchOS(.v3),
.iOS(.v11),
.macOS(.v10_13),
.tvOS(.v11),
.watchOS(.v4),
],
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
Expand All @@ -19,8 +19,8 @@ let package = Package(
],
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.1"),
.package(url: "https://github.com/Alamofire/Alamofire", from: "5.4.3"),
.package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.6"),
.package(url: "https://github.com/Alamofire/Alamofire", from: "5.6.2"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
Pod::Spec.new do |s|
s.name = 'PetstoreClient'
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.12'
s.tvos.deployment_target = '10.0'
s.watchos.deployment_target = '3.0'
s.ios.deployment_target = '11.0'
s.osx.deployment_target = '10.13'
s.tvos.deployment_target = '11.0'
s.watchos.deployment_target = '4.0'
s.version = '1.0.0'
s.source = { :git => '[email protected]:OpenAPITools/openapi-generator.git', :tag => 'v1.0.0' }
s.authors = ''
s.license = 'Proprietary'
s.homepage = 'https://github.com/openapitools/openapi-generator'
s.summary = 'PetstoreClient'
s.source_files = 'PetstoreClient/Classes/**/*.swift'
s.dependency 'AnyCodable-FlightSchool', '~> 0.6.1'
s.dependency 'Alamofire', '~> 5.4.3'
s.dependency 'AnyCodable-FlightSchool', '~> 0.6.6'
s.dependency 'Alamofire', '~> 5.6.2'
end
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -377,7 +377,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
"repositoryURL": "https://github.com/Alamofire/Alamofire",
"state": {
"branch": null,
"revision": "f96b619bcb2383b43d898402283924b80e2c4bae",
"version": "5.4.3"
"revision": "8dd85aee02e39dd280c75eef88ffdb86eed4b07b",
"version": "5.6.2"
}
},
{
"package": "AnyCodable",
"repositoryURL": "https://github.com/Flight-School/AnyCodable",
"state": {
"branch": null,
"revision": "69261f239f0fffaf51495dadc4f8483fbfe97025",
"version": "0.6.1"
"revision": "56901f2af3625b38924d488b612e95fe8846ee9b",
"version": "0.6.6"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ targets:
PetstoreClient:
type: framework
platform: iOS
deploymentTarget: "9.0"
deploymentTarget: "11.0"
sources: [PetstoreClient]
info:
path: ./Info.plist
Expand Down
21 changes: 8 additions & 13 deletions samples/client/petstore/swift5/asyncAwaitLibrary/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Created by https://www.toptal.com/developers/gitignore/api/swift,xcode
# Edit at https://www.toptal.com/developers/gitignore?templates=swift,xcode
# Created by https://www.toptal.com/developers/gitignore/api/xcode,swift
# Edit at https://www.toptal.com/developers/gitignore?templates=xcode,swift

### Swift ###
# Xcode
Expand Down Expand Up @@ -64,9 +64,9 @@ playground.xcworkspace

Carthage/Build/

# Add this lines if you are using Accio dependency management (Deprecated since Xcode 12)
# Dependencies/
# .accio/
# Accio dependency management
Dependencies/
.accio/

# fastlane
# It is recommended to not store the screenshots in the git repo.
Expand All @@ -86,20 +86,15 @@ fastlane/test_output
iOSInjectionProject/

### Xcode ###
# Xcode
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore




## Gcc Patch
/*.gcno
## Xcode 8 and earlier

### Xcode Patch ###
*.xcodeproj/*
!*.xcodeproj/project.pbxproj
!*.xcodeproj/xcshareddata/
!*.xcworkspace/contents.xcworkspacedata
/*.gcno
**/xcshareddata/WorkspaceSettings.xcsettings

# End of https://www.toptal.com/developers/gitignore/api/swift,xcode
# End of https://www.toptal.com/developers/gitignore/api/xcode,swift
2 changes: 1 addition & 1 deletion samples/client/petstore/swift5/asyncAwaitLibrary/Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "Flight-School/AnyCodable" ~> 0.6.1
github "Flight-School/AnyCodable" ~> 0.6.6
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"repositoryURL": "https://github.com/Flight-School/AnyCodable",
"state": {
"branch": null,
"revision": "69261f239f0fffaf51495dadc4f8483fbfe97025",
"version": "0.6.1"
"revision": "56901f2af3625b38924d488b612e95fe8846ee9b",
"version": "0.6.6"
}
}
]
Expand Down
10 changes: 5 additions & 5 deletions samples/client/petstore/swift5/asyncAwaitLibrary/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import PackageDescription
let package = Package(
name: "PetstoreClient",
platforms: [
.iOS(.v9),
.macOS(.v10_11),
.tvOS(.v9),
.watchOS(.v3),
.iOS(.v11),
.macOS(.v10_13),
.tvOS(.v11),
.watchOS(.v4),
],
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
Expand All @@ -19,7 +19,7 @@ let package = Package(
],
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.1"),
.package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.6"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Expand Down
Loading