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

Fix compiler concurrency issues #6843

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rablador
Copy link
Contributor

@rablador rablador commented Sep 23, 2024

Find all occurrences of types that are being shared across actor boundaries. For each type, determine if they are sendable as is or if they need to be refactored to be sendable.

The swift compiler should guide us to find the types that are being sent, when enforcing strict concurrency checks.

This ticket fixes issues reported up to checking level "targeted".


This change is Reviewable

@rablador rablador self-assigned this Sep 23, 2024
Copy link

linear bot commented Sep 23, 2024

@rablador rablador force-pushed the fix-compiler-concurrency-issues-for-level-targeted-ios-828 branch from 55c7a9e to 1777c0c Compare September 23, 2024 12:22
Copy link
Contributor Author

@rablador rablador left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 59 files reviewed, 1 unresolved discussion


ios/PacketTunnelCore/Actor/Task+Duration.swift line 64 at r2 (raw file):

            }
        } onCancel: {
            timer.cancel()

This timer actually yields a warning, but I don't know how to make DispatchSourceTimer sendable since it's a system provided protocol. sleepUsingContinuousClock() will be deprecated in next iOS version, so perhaps we can leave it as is.

@rablador rablador force-pushed the fix-compiler-concurrency-issues-for-level-targeted-ios-828 branch from 1777c0c to ebb4022 Compare September 23, 2024 12:30
@rablador rablador changed the title Fix compiler concurrency issues for level targeted ios 828 Fix compiler concurrency issues Sep 23, 2024
@rablador rablador force-pushed the fix-compiler-concurrency-issues-for-level-targeted-ios-828 branch 2 times, most recently from 54b8c2b to 7bac16e Compare September 23, 2024 13:11
Copy link
Contributor Author

@rablador rablador left a comment

Choose a reason for hiding this comment

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

Will put this PR on hold since compiler (xcode 15.0.1) on CI reports errors not on later xcode versions (16 and onwards).

Reviewable status: 0 of 59 files reviewed, 1 unresolved discussion

@rablador rablador marked this pull request as draft September 23, 2024 13:41
@rablador rablador force-pushed the fix-compiler-concurrency-issues-for-level-targeted-ios-828 branch from 7bac16e to a2007d2 Compare September 23, 2024 13:43
@rablador rablador added the iOS Issues related to iOS label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iOS Issues related to iOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant