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
Blog post for 1.1.0 release #135
Conversation
I haven't been able to run
I don't have time now, but I do plan on debugging this later. |
@dantoml a few questions for you:
|
So, believe it or not 1.1 contains a pretty useful feature from me too, big enough to warrant a mention.
|
Definitely! Sorry I missed It. I think I've just had Xcode 8 / extension tunnel vision the past few months. Will update the PR soon. If anyone has any other big updates I missed, please chime in! |
@orta added verbatim + a comma. |
|
pod target xcconfig won't do both? For the DevToolsCore issue, I'm happy to include a section if you write it up 😀. It could just be a sentence or two in the Xcode 8 section |
@benasher44 I don't think so, because it needs to be in the root project not just the pod targets? |
Xcode 8 is here! It brings support for iOS 10, macOS Sierra, new versions of Swift, and new challenges for CocoaPods. The first is the ability to support Swift 2.3 and 3.0 projects and communicate this in a podspec. In CocoaPods 1.1.0, setting the version of Swift that your pod uses is supported in following ways: | ||
|
||
* It defaults to Swift 2.3, if your pod uses Swift. | ||
* It uses setting from your `.swift-version` file if present (inspired by [swiftenv](https://github.com/kylef/swiftenv). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should include a reference of what this looks like.
- It uses setting from your
.swift-version
file if present (inspired by swiftenv.
This is a file that only contains the swift version as text: e.g. for Swift 3, you would have3.0
in the file.
author: nickname | ||
categories: cocoapods releases | ||
--- | ||
TL;DR: _CocoaPods 1.1.0_ has been released, and it comes with improved support for extensions and frameworks, Xcode 8 support, and error handling improvements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might want a <!-- more -->
somewhere in here
@dantoml if the project is swift version unspecified, then I think all that matters is all of the swift pods being integrated need to have the compatible swift versions |
Oh wait no that's clearly wrong because of CocoaPods/CocoaPods#5846. Hm. Maybe we should just be using the pod's build settings as a source of truth for setting the swift version for validation. Then, |
Also, I'm waiting on the resolution of CocoaPods/CocoaPods#5860. It appears I may have gotten it wrong for standalone messages applications. If that's that the case, then messages extensions are just like any other extension, and I should remove that section from the post. |
The other possibility for this swift version issue is the swift version unspecified is different than the swift version setting is not set at all. |
It doesn't feel clear to me how pod authors are supposed to set the Swift version if they support multiple. For example I have pods that support both 2.2, 2.3 and 3.0 in the same master branch. Should I create a |
It only sets the Swift version inside the linter, if your lib supports source-compatible 2.3 and 3.0 then 2.3 is fine. We keep no metadata around. |
|
||
### Xcode 8 and iOS 10 | ||
|
||
Xcode 8 is here! It brings support for iOS 10, macOS Sierra, new versions of Swift, and new challenges for CocoaPods. The first is the ability to support Swift 2.3 and 3.0 projects and communicate this in a podspec. In CocoaPods 1.1.0, setting the version of Swift that your pod uses is supported in following ways: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[…] setting the Swift version your pod is gonna be verified and linted against can be done is the following ways:
…Note that this only affect the linting. During integration of a pod, it's Swift version is set to the same version as the one used in the user's hosting project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to rework this section soon. There are still a few Swift-related PRs to come I think. I'm going to wait for Swift support to stabilize before I update.
@orta got it. Then might need some more explicit explanations fort that paragraph then (suggestion above) |
Xcode 8 is here! It brings support for iOS 10, macOS Sierra, new versions of Swift, and new challenges for CocoaPods. The first is the ability to support Swift 2.3 and 3.0 projects and communicate this in a podspec. In CocoaPods 1.1.0, setting the version of Swift that your pod uses is supported in following ways: | ||
|
||
* It defaults to Swift 2.3, if your pod uses Swift. | ||
* It uses setting from your `.swift-version` file if present (inspired by [swiftenv](https://github.com/kylef/swiftenv). This is a file that only contains the swift version as text: e.g. for Swift 3, you would have 3.0 in the file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RC3 added --swift-version=VERSION
- https://github.com/CocoaPods/CocoaPods/blob/master/CHANGELOG.md#110rc3-2016-10-11
In case anyone hits that backtrace again, it was because I hadn't added myself to _config.yml and configured the author properly (should have fully read the README). |
- Swift version section - Updated descriptions - Cleaned up messages extension/app info
Alright, this is much closer to being ready now. I think the only thing left to add is something about CocoaPods/cocoadocs.org#473 if we do something there. |
3. We could add a `swift_version_range` option to indicate the range of Swift versions the pod supports, but this suffers from the same issues as option 2. There is no way to verify that a pod pushed today that claims to support up through Swift version 4 actually supports that version. | ||
|
||
In this release of CocoaPods, you lint your pod against the version of Swift you intend to support. When integrating pods, CocoaPods generates pod targets that use the Swift version set in your project. This allows pod authors the flexibility to support multiple incompatible swift versions if they wish by using `#if swift()` checks, while keeping the pod maintenance burden light across Swift 3 versions. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be nice to mention that we will actually be baking in the version of swift into the JSON podspecs, then people wanting to create tooling around the ecosystem can use those values?
For tool authors we're making it easy for others to work use the database of pods on trunk, by baking the version of Swift that was used to pass validation into the JSON file for a Podspec. This means you reliably build tooling that works against multiple versions of Swift.
Ideally we can make the "JSON file for a Podspec" a link to an example that shows it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this around a bit, but it's now in there! Have a look at let me know if I didn't capture what you were getting at.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the plan to update this with a link once 1.1.0 is live, and we have an example from people pushing their specs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I can do that 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that the blog post explains why the podspec doesn't contain a new attribute to specify the Swift version, as this has been a recurring question asked by a lot of people and the paragraph clarifies that perfectly.
Nice writing @benasher44 👌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, although I agree that it would be nice to also include a reference to the JSON Podspec
|
||
### About Supporting Multiple Swift Versions in the Podspec | ||
|
||
Supporting the Swift language version used by a pod as part of the podspec is tricky. There are a few different options we considered, but we ultimately decided not to add any new podspec dsl for this release. Here are some examples of options we considered for this release: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m missing details on why it’s so tricky to deal with Swift versions at all. E.g. Swift doesn’t use semantic versioning?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍. Let me know if you think it's still unclear, and I'm happy to elaborate further!
I’m missing updates on all of the speed improvements done in this release, I believe there were great optimisations done, no? |
Speed improvements may have been caused by the previous 1.1.0 releases - not sure personally |
@alloy @orta @dnkoutso can probably elaborate more. |
The performance improvements were mostly done for larger projects during I think the tl;dr is that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
CocoaPods 1.1.0 release blog post. Improvements mentioned:
More?