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

Conversation

4brunu
Copy link
Contributor

@4brunu 4brunu commented Oct 11, 2022

With Xcode 14, the minimum OS supported versions changed and some OS versions are not supported anymore.

The new minimum OS supported versions by Xcode 14 are:

  • iOS 11 and later
  • macOS 10.13 and latter
  • tvOS 11 and later
  • watchOS 4 and later

https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes

So with this update, those are the new minimum OS supported versions in the Swift generator

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh
    ./bin/utils/export_docs_generators.sh
    
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master (6.1.0) (minor release - breaking changes with fallbacks), 7.0.x (breaking changes without fallbacks)
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

@jgavris (2017/07) @ehyche (2017/08) @Edubits (2017/09) @jaz-ah (2017/09) @4brunu (2019/11)

@4brunu 4brunu closed this Oct 11, 2022
@4brunu 4brunu reopened this Oct 11, 2022
{{#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 :)

@4brunu 4brunu closed this Oct 11, 2022
@4brunu 4brunu reopened this Oct 11, 2022
@4brunu
Copy link
Contributor Author

4brunu commented Oct 12, 2022

CI failure is not related to this PR.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.2.0:shade (process-resources) on project openapi-generator-cli: Execution process-resources of goal org.apache.maven.plugins:maven-shade-plugin:3.2.0:shade failed: Plugin org.apache.maven.plugins:maven-shade-plugin:3.2.0 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-shade-plugin:jar:3.2.0 -> org.apache.maven.shared:maven-artifact-transfer:jar:0.10.0: Failed to read artifact descriptor for org.apache.maven.shared:maven-artifact-transfer:jar:0.10.0: Could not transfer artifact org.apache.maven.shared:maven-artifact-transfer:pom:0.10.0 from/to central (https://repo.maven.apache.org/maven2): transfer failed for https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-artifact-transfer/0.10.0/maven-artifact-transfer-0.10.0.pom: Connection reset -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :openapi-generator-cli

@4brunu 4brunu merged commit 6ba9732 into OpenAPITools:7.0.x Oct 12, 2022
@4brunu 4brunu deleted the feature/drop-old-apple-platforms-7.0.x branch October 12, 2022 08:07
@wing328 wing328 added this to the 6.2.1 milestone Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants