Partial v1.1.0
Release Notes
- Add support for
builder(for:)
function to aid with building complex type (thanks to @randomeizer) - Support for Xcode 12.1
Pull request Potential fix for invalidation crashes on composed-swift/ComposedUI
As mentioned in https://github.com/composed-swift/ComposedUI/issues/13 and https://github.com/composed-swift/ComposedUI/issues/8 there are some scenarios where the collection view’s data is out-of-sync with the data in composed.
As mentioned in https://github.com/composed-swift/ComposedUI/issues/13 calling layoutIfNeeded
can trigger the data to be in sync again. In this I have added it to mappingWillBeginUpdating(_:)
which appears to solve the problem.
It might be needed in replace(sectionProvider:)
(because reloadData
is called) and/or mappingDidInvalidate(_:)
(for the same reason) but I’m still investigating.
I have validated this fix against https://github.com/composed-swift/ComposedUI/issues/8 and it fixes the crash.
https://github.com/composed-swift/ComposedUI/issues/13 still needs to be investigated and may require layoutIfNeeded
to be called in mappingDidInvalidate
. Marking as a draft until this is checked.
Supporting Multiple Swift Package Versions Without Breaking Compatibility
The Xcode 12 beta includes Swift 5.3 but drops support for iOS 8.x. This means that Swift packages that support iOS 8 will cause a warning:
The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99.
It's not possible to remove this warning within a project that depends on a Swift package with a deployment target of iOS 8, but it is possible to fix this in the dependency without removing support for iOS 8 for older versions of Swift. There are multiple way this can be accomplished.
Pull request Set iOS deployment target to 9 for Swift >= 5.3 on cx-org/CombineX
Xcode 12 ships with 5.3 but also drops iOS 8 support. This causes a warning ("The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99.")
Pull request Rewrite delegates to take perform update closures on composed-swift/Composed
This is a major API change so is in a v2 branch. If we agree on a direction we could start adding PRs in to this branch.
This change would enable multiple changes to be applied at once, e.g. by requiring balanced calls to mappingWillBeginUpdating
and mappingDidEndUpdating
and only performing the updates when an equal number of mappingDidEndUpdating
calls have been made. This could be a small performance improvement but would also improve animations.
By adding the performUpdate
closure the changes to the model layer can be applied only when the consumer is expecting them, e.g. for UICollectionView
this would be inside performBatchUpdates
and would fix the existing crashes that occur when performing a change when there are pending layout changes.
Some tests and types have been commented out since this is more of a starting point for a discussion around the API than it is a solid implementation.
This is the closest I can see the API being (although it's still a breaking change) but maybe a bigger change would be better.
The biggest PITA is that the sections need to keep track of "current" data (e.g. what's being displayed by a collection view) and the "pending" data (e.g. what's about to be applied). I don't think this adds any memory overhead but it does add much more to the knowledge required when implementing a section.
Pull request Sort symlinks in order required for unzip on weichsel/ZIPFoundation
- Tags:
- open-source
- swift
- zip
Changes proposed in this PR
- Fix extraction order of symlinks
Tests performed
- Existing tests
- Extracting the AltServer download from https://altstore.io/
Further info for the reviewer
This needs more tests to ensure full coverage, but also to prove that this was previously broken and is now fixed.
The added function is public because I'm using it to extract a subset of the entries in the archive that contains symlinks.
Open Issues
#185, possibly #62.
Pull request ComposedSectionProvider fixes on composed-swift/Composed
These were quite hard to track down since the errors that would occur would often be visual and not a crash, although in some scenarios it did seem to trigger a crash.
I think this highlights the need for a much larger test suite.
Sidebar
It also made me question the insert(_:at:)
functions because it's not really clear what the index
is. Should it insert it at the index in the context of the sections and providers (as it does now), or just sections?
For example, with:
- Section A
- Section Provider
- Section B
- Section C
- Section D
- Section E
If I insert a section at index 3 should it look like:
- Section A
- Section Provider
- Section B
- Section C
- New Section
- Section D
- Section E
or
- Section A
- Section Provider
- Section B
- Section C
- Section D
- New Section
- Section E
Pull request Add GitHub actions on composed-swift/ComposedUI
The tests are currently essentially empty but at a minimum this makes sure things compile on Xcode 11.7 and 12.0.
@shaps80 I think this will need updates to the repo settings to enable GitHub Actions.
Pull request Fix swift 5.2 compiling on composed-swift/ComposedUI
Introduced in #9. #12 adds GitHub actions to ensure this doesn't occur again.