Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions Development.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Pod::Spec.new do |s|
s.dependency 'WorkflowRxSwift'
# s.dependency 'WorkflowCombine' # TODO: Disabled because app specs cannot increase the deployment target of the root
Copy link
Contributor

Choose a reason for hiding this comment

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

Unrelated, but I bet we can turn these on globally now cc @jamieQ

Copy link
Collaborator Author

@n8chur n8chur Jan 31, 2023

Choose a reason for hiding this comment

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

I don't believe we can if this is to work around a bug in pod gen unless we're bumping all podspecs to iOS 13.

The project attempts to generate with an iOS 11 deployment target and fails to resolve all targets as a result (since these commented ones require iOS 14). I just reported the bug in #cocoapods here.

Copy link
Contributor

Choose a reason for hiding this comment

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

I figured we could bump stuff in the whole repo to 14 as well. Anyway, not important for this PR!

Copy link
Collaborator Author

@n8chur n8chur Jan 31, 2023

Choose a reason for hiding this comment

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

I'd expect that you'd be able generate a project with pod gen which ends up just using the highest deployment target found in your development podspecs, but it doesn't appear to work this way (it's either an order thing or choosing the lowest version I think).

Copy link
Contributor

Choose a reason for hiding this comment

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

looking into bumping the versions here. can do that after this is merged though & will update the values in the new podspec.

# s.dependency 'WorkflowConcurrency' # TODO: Disabled because app specs cannot increase the deployment target of the root
s.dependency 'ViewEnvironment'

s.source_files = 'Samples/Dummy.swift'

Expand Down
16 changes: 15 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ let package = Package(
name: "WorkflowConcurrencyTesting",
targets: ["WorkflowConcurrencyTesting"]
),

// MARK: ViewEnvironment

.library(
name: "ViewEnvironment",
targets: ["ViewEnvironment"]
),
],
dependencies: [
.package(url: "https://github.com/ReactiveCocoa/ReactiveSwift.git", from: "7.1.1"),
Expand Down Expand Up @@ -109,7 +116,7 @@ let package = Package(

.target(
name: "WorkflowUI",
dependencies: ["Workflow"],
dependencies: ["Workflow", "ViewEnvironment"],
path: "WorkflowUI/Sources"
),
.testTarget(
Expand Down Expand Up @@ -214,6 +221,13 @@ let package = Package(
dependencies: ["WorkflowConcurrencyTesting"],
path: "WorkflowConcurrency/TestingTests"
),

// MARK: ViewEnvironment

.target(
name: "ViewEnvironment",
path: "ViewEnvironment/Sources"
),
],
swiftLanguageVersions: [.v5]
)
3 changes: 2 additions & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ For Squares, membership is managed through the `Workflow Swift Owners` registry

> ⚠️ [Optional] To avoid possible headaches when publishing podspecs, validation can be performed before updating the Workflow version number(s). To do this, run the following in the root directory of this repo:
> ```bash
> bundle exec pod lib lint Workflow.podspec WorkflowTesting.podspec WorkflowReactiveSwift.podspec WorkflowUI.podspec WorkflowRxSwift.podspec WorkflowReactiveSwiftTesting.podspec WorkflowRxSwiftTesting.podspec WorkflowSwiftUI.podspec WorkflowCombine.podspec WorkflowCombineTesting.podspec
> bundle exec pod lib lint Workflow.podspec WorkflowTesting.podspec WorkflowReactiveSwift.podspec WorkflowUI.podspec WorkflowRxSwift.podspec WorkflowReactiveSwiftTesting.podspec WorkflowRxSwiftTesting.podspec WorkflowSwiftUI.podspec WorkflowCombine.podspec WorkflowCombineTesting.podspec ViewEnvironment.podspec
> ```
> And then run a similar command to check the `WorkflowConcurrency*` libraries. These specs will fail default validation as their version differs from the git tag used, so run the command with the `--allow-warnings` option, and check that only that warning is produced.
> ```bash
Expand All @@ -40,6 +40,7 @@ For Squares, membership is managed through the `Workflow Swift Owners` registry
bundle exec pod trunk push Workflow.podspec --synchronous
bundle exec pod trunk push WorkflowTesting.podspec --synchronous
bundle exec pod trunk push WorkflowReactiveSwift.podspec --synchronous
bundle exec pod trunk push ViewEnvironment.podspec --synchronous
bundle exec pod trunk push WorkflowUI.podspec --synchronous
bundle exec pod trunk push WorkflowRxSwift.podspec --synchronous
bundle exec pod trunk push WorkflowReactiveSwiftTesting.podspec --synchronous
Expand Down
1 change: 1 addition & 0 deletions Samples/Tutorial/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ platform :ios, '11.0'
target 'Tutorial' do
pod 'Workflow', path: '../../Workflow.podspec', :testspecs => ['Tests']
pod 'WorkflowUI', path: '../../WorkflowUI.podspec', :testspecs => ['Tests']
pod 'ViewEnvironment', path: '../../ViewEnvironment.podspec'
pod 'WorkflowReactiveSwift', path: '../../WorkflowReactiveSwift.podspec', :testspecs => ['Tests']
pod 'BackStackContainer', path: '../BackStackContainer/BackStackContainer.podspec'

Expand Down
22 changes: 22 additions & 0 deletions ViewEnvironment.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
require_relative('version')

Pod::Spec.new do |s|
Copy link
Contributor

Choose a reason for hiding this comment

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

Any tests to move too?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I didn't see any but I thought about adding a simple .empty initialization test.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Not necessary here, but there is logical surface area to cover in the subscript and setting methods.

s.name = 'ViewEnvironment'
s.version = WORKFLOW_VERSION
s.summary = 'A collection of environment values propagated through a view hierarchy.'
s.homepage = 'https://www.github.com/square/workflow-swift'
s.license = 'Apache License, Version 2.0'
s.author = 'Square'
s.source = { :git => 'https://github.com/square/workflow-swift.git', :tag => "v#{s.version}" }

# 1.7 is needed for `swift_versions` support
s.cocoapods_version = '>= 1.7.0'

s.swift_versions = ['5.0']
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: move these things into version.rb ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Seems reasonable to me—but I'm going to leave it as for this PR to avoid conflating that change here.

s.ios.deployment_target = '11.0'
s.osx.deployment_target = '10.13'

s.source_files = 'ViewEnvironment/Sources/**/*.swift'

s.pod_target_xcconfig = { 'APPLICATION_EXTENSION_API_ONLY' => 'YES' }
end
1 change: 1 addition & 0 deletions WorkflowUI.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Pod::Spec.new do |s|
s.source_files = 'WorkflowUI/Sources/**/*.swift'

s.dependency 'Workflow', "#{s.version}"
s.dependency 'ViewEnvironment', "#{s.version}"

s.pod_target_xcconfig = { 'APPLICATION_EXTENSION_API_ONLY' => 'YES' }

Expand Down
1 change: 1 addition & 0 deletions WorkflowUI/Sources/ModuleExports.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@_exported import ViewEnvironment
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a compatibility gesture, right? Assuming that Foo refers to the same module, can two modules call export Foo without conflict?

My hunch is that it's fine, and that there's probably a lot of @_exported Foundation lurking around, for example, but I figured it worth asking.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a compatibility gesture, right?

Yup!

can two modules call export Foo without conflict?

I believe so