Skip to content

Unregister app bundles from LaunchServices during clean#1385

Merged
rjmansfield merged 1 commit into
swiftlang:mainfrom
rjmansfield:clean-unregister-launchservices
May 22, 2026
Merged

Unregister app bundles from LaunchServices during clean#1385
rjmansfield merged 1 commit into
swiftlang:mainfrom
rjmansfield:clean-unregister-launchservices

Conversation

@rjmansfield

Copy link
Copy Markdown
Contributor

During builds, record app bundles registered with LaunchServices to a registered-launchservices.txt file. During clean, read the file and call lsregister -u to unregister them.

rdar://142580463

@rjmansfield

Copy link
Copy Markdown
Contributor Author

@swift-ci test

let paths = content.split(separator: "\n", omittingEmptySubsequences: true).map(String.init)
guard !paths.isEmpty else { return }

_Concurrency.Task.detached {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Let's please stick these in a task group instead of using detached tasks, we really want to maintain structured concurrency, and this as it is is subject to race conditions

Comment thread Sources/SWBBuildSystem/BuildOperation.swift Outdated
During builds, record app bundles registered with LaunchServices to a
registered-launchservices.txt file. During clean, read the file and
call lsregister -u to unregister them.

rdar://142580463
@rjmansfield rjmansfield force-pushed the clean-unregister-launchservices branch from 694c872 to 1238345 Compare May 20, 2026 18:33
@rjmansfield rjmansfield requested a review from jakepetroules May 21, 2026 18:24
@rjmansfield

Copy link
Copy Markdown
Contributor Author

@swift-ci test

@rjmansfield rjmansfield merged commit b2433e7 into swiftlang:main May 22, 2026
118 of 126 checks passed
@rjmansfield rjmansfield deleted the clean-unregister-launchservices branch May 22, 2026 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants