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

Swift6 #144

Closed
wants to merge 9 commits into from
Closed
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
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ on:
workflow_dispatch:

env:
DEVELOPER_DIR: /Applications/Xcode_15.2.app
DEVELOPER_DIR: /Applications/Xcode_16.0.app

jobs:
publish-docs:
name: Publish Documentation
runs-on: macos-13
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Build docs
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ on:
workflow_dispatch:

env:
DEVELOPER_DIR: /Applications/Xcode_15.2.app
DEVELOPER_DIR: /Applications/Xcode_16.0.app

jobs:
test:
name: Test
runs-on: macos-13
runs-on: macos-14
strategy:
matrix:
platform:
Expand All @@ -33,23 +33,23 @@ jobs:

test_examples:
name: Test iOS examples
runs-on: macos-13
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Test example iOS
run: scripts/test.sh example-ios ios

benchmark:
name: Benchmark
runs-on: macos-13
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Run benchmark test
run: scripts/test.sh benchmark ios

validation:
name: Validation
runs-on: macos-13
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Show environments
Expand Down
14 changes: 12 additions & 2 deletions Benchmarks/Test.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@
en,
);
mainGroup = 5071FF1E3D9776144CA101D1;
packageReferences = (
BF2795A13208F1083E80780C /* XCLocalSwiftPackageReference ".." */,
);
projectDirPath = "";
projectRoot = "";
targets = (
Expand Down Expand Up @@ -248,7 +251,7 @@
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6;
};
name = Release;
};
Expand Down Expand Up @@ -363,7 +366,7 @@
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6;
};
name = Debug;
};
Expand Down Expand Up @@ -415,6 +418,13 @@
};
/* End XCConfigurationList section */

/* Begin XCLocalSwiftPackageReference section */
BF2795A13208F1083E80780C /* XCLocalSwiftPackageReference ".." */ = {
isa = XCLocalSwiftPackageReference;
relativePath = ..;
};
/* End XCLocalSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
8FA28D81FB67542B978C77EC /* Atoms */ = {
isa = XCSwiftPackageProductDependency;
Expand Down
9 changes: 6 additions & 3 deletions Benchmarks/Tests/BenchmarkTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ final class RenderingPerformanceTests: XCTestCase {
test.perform {
measure {
for _ in 0..<100 {
test.sendTouchSequence([
(location: CGPoint(x: size.width / 2, y: size.height - 30), globalLocation: nil, timestamp: Date())
])
test.sendTouchSequence(
Array(
repeating: (location: CGPoint(x: size.width / 2, y: size.height - 30), globalLocation: nil, timestamp: Date()),
count: 2
)
)
test.turnRunloop(times: 1)
}
}
Expand Down
12 changes: 8 additions & 4 deletions Benchmarks/Tests/ViewTest.swift
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import SwiftUI

struct ViewTest<Content: View>: _ViewTest {
let rootView: () -> Content
struct ViewTest<Content: View & Sendable>: _ViewTest {
let rootView: @MainActor () -> Content

func initRootView() -> some View {
rootView()
MainActor.assumeIsolated {
rootView()
}
}

func initSize() -> CGSize {
UIScreen.main.bounds.size
MainActor.assumeIsolated {
UIScreen.main.bounds.size
}
}

func perform(_ body: () -> Void) {
Expand Down
1 change: 1 addition & 0 deletions Benchmarks/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ options:
createIntermediateGroups: true

settings:
SWIFT_VERSION: 6
CODE_SIGNING_REQUIRED: NO
CODE_SIGN_IDENTITY: "-"
CODE_SIGN_STYLE: Manual
Expand Down
19 changes: 17 additions & 2 deletions Examples/App.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@
en,
);
mainGroup = 4102E3E068508DD683953C7D;
packageReferences = (
263B59300A73460F3EC004F2 /* XCLocalSwiftPackageReference "Packages/CrossPlatform" */,
B5EB40B15A9876E9D1761363 /* XCLocalSwiftPackageReference "Packages/iOS" */,
);
projectDirPath = "";
projectRoot = "";
targets = (
Expand Down Expand Up @@ -320,7 +324,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6;
TVOS_DEPLOYMENT_TARGET = 16.0;
};
name = Release;
Expand Down Expand Up @@ -437,7 +441,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6;
TVOS_DEPLOYMENT_TARGET = 16.0;
};
name = Debug;
Expand Down Expand Up @@ -483,6 +487,17 @@
};
/* End XCConfigurationList section */

/* Begin XCLocalSwiftPackageReference section */
263B59300A73460F3EC004F2 /* XCLocalSwiftPackageReference "Packages/CrossPlatform" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = Packages/CrossPlatform;
};
B5EB40B15A9876E9D1761363 /* XCLocalSwiftPackageReference "Packages/iOS" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = Packages/iOS;
};
/* End XCLocalSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
A708E16BF51AE12E22A59212 /* CrossPlatformApp */ = {
isa = XCSwiftPackageProductDependency;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
runPostActionsOnFailure = "NO">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0B9FD0BB6D9928064433FF9B"
BuildableName = "CrossPlatform.app"
BlueprintName = "CrossPlatform_macOS"
ReferencedContainer = "container:App.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
onlyGenerateCoverageForSpecifiedTargets = "NO">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0B9FD0BB6D9928064433FF9B"
BuildableName = "CrossPlatform.app"
BlueprintName = "CrossPlatform_macOS"
ReferencedContainer = "container:App.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0B9FD0BB6D9928064433FF9B"
BuildableName = "CrossPlatform.app"
BlueprintName = "CrossPlatform_macOS"
ReferencedContainer = "container:App.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0B9FD0BB6D9928064433FF9B"
BuildableName = "CrossPlatform.app"
BlueprintName = "CrossPlatform_macOS"
ReferencedContainer = "container:App.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
runPostActionsOnFailure = "NO">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BCC0364CCD17BA05FD5B35BD"
BuildableName = "CrossPlatform.app"
BlueprintName = "CrossPlatform_tvOS"
ReferencedContainer = "container:App.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
onlyGenerateCoverageForSpecifiedTargets = "NO">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BCC0364CCD17BA05FD5B35BD"
BuildableName = "CrossPlatform.app"
BlueprintName = "CrossPlatform_tvOS"
ReferencedContainer = "container:App.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BCC0364CCD17BA05FD5B35BD"
BuildableName = "CrossPlatform.app"
BlueprintName = "CrossPlatform_tvOS"
ReferencedContainer = "container:App.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BCC0364CCD17BA05FD5B35BD"
BuildableName = "CrossPlatform.app"
BlueprintName = "CrossPlatform_tvOS"
ReferencedContainer = "container:App.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Loading