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

RUMM-1758 Fix Example app compilation in Xcode 12 #672

Merged
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
2 changes: 1 addition & 1 deletion Datadog/Datadog.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3570,7 +3570,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1250;
LastUpgradeCheck = 1250;
LastUpgradeCheck = 1310;
ORGANIZATIONNAME = Datadog;
TargetAttributes = {
61133B81242393DE00786299 = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1250"
LastUpgradeVersion = "1310"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1250"
LastUpgradeVersion = "1310"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1250"
LastUpgradeVersion = "1310"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1250"
LastUpgradeVersion = "1310"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1250"
LastUpgradeVersion = "1310"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1250"
LastUpgradeVersion = "1310"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1250"
LastUpgradeVersion = "1310"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1250"
LastUpgradeVersion = "1310"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1250"
LastUpgradeVersion = "1310"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
22 changes: 11 additions & 11 deletions Datadog/Example/Debugging/DebugRUMSessionViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,23 @@ private class DebugRUMSessionViewModel: ObservableObject {
return
}

let viewKey = viewKey
let key = viewKey
sessionItems.append(
SessionItem(
label: viewKey,
label: key,
type: .view,
isPending: true,
stopAction: { [weak self] in
self?.modifySessionItem(type: .view, label: viewKey) { mutableSessionItem in
self?.modifySessionItem(type: .view, label: key) { mutableSessionItem in
mutableSessionItem.isPending = false
mutableSessionItem.stopAction = nil
Global.rum.stopView(key: viewKey)
Global.rum.stopView(key: key)
}
}
)
)

Global.rum.startView(key: viewKey)
Global.rum.startView(key: key)
self.viewKey = ""
}

Expand Down Expand Up @@ -95,23 +95,23 @@ private class DebugRUMSessionViewModel: ObservableObject {
return
}

let resourceKey = self.resourceKey
let key = self.resourceKey
sessionItems.append(
SessionItem(
label: resourceKey,
label: key,
type: .resource,
isPending: true,
stopAction: { [weak self] in
self?.modifySessionItem(type: .resource, label: resourceKey) { mutableSessionItem in
self?.modifySessionItem(type: .resource, label: key) { mutableSessionItem in
mutableSessionItem.isPending = false
mutableSessionItem.stopAction = nil
Global.rum.stopResourceLoading(resourceKey: resourceKey, statusCode: nil, kind: .other)
Global.rum.stopResourceLoading(resourceKey: key, statusCode: nil, kind: .other)
}
}
)
)

Global.rum.startResourceLoading(resourceKey: resourceKey, url: mockURL())
Global.rum.startResourceLoading(resourceKey: key, url: mockURL())
self.resourceKey = ""
}

Expand Down Expand Up @@ -171,7 +171,7 @@ internal struct DebugRUMSessionView: View {
.listRowInsets(EdgeInsets())
.padding(4)
}
.listStyle(.plain)
.listStyle(PlainListStyle())
Copy link
Contributor

Choose a reason for hiding this comment

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

curious: is the rest of the PR necessary for the fix?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, in some CI logs from Xcode 12 I can also see:

❌  /Users/vagrant/git/Datadog/Example/Debugging/DebugRUMSessionViewController.swift:47:23: variable used within its own initial value
        let viewKey = viewKey
                      ^

Some other failed with:

▸ Running script '⚙️ Run linter'
Automatic retry reason found in log: Early unexpected exit, operation never finished bootstrapping - no restart will be attempted
isAutomaticRetryOnReason=false, no more retry, stopping the test!

and I don't yet have a clue on what's wrong, but it seems unrelated to #669 changes.

Although dismissing Xcode's "upgrade workspace to recommended changes" warning won't fix it I played a boy-scout to cleanup our logs.

}
.buttonStyle(DatadogButtonStyle())
.padding()
Expand Down