Skip to content

fix: sync LookinCore mirror — Swift optimization report on SwiftPM path#30

Merged
Lakr233 merged 1 commit into
mainfrom
fix/swift-optimization-false-positive
Jun 23, 2026
Merged

fix: sync LookinCore mirror — Swift optimization report on SwiftPM path#30
Lakr233 merged 1 commit into
mainfrom
fix/swift-optimization-false-positive

Conversation

@Mx-Iris

@Mx-Iris Mx-Iris commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Mirror of the canonical LookinCore fix in the server package: report swiftEnabledInLookinServer = 1 when the SwiftPM / XCFramework build macro SPM_LOOKIN_SERVER_ENABLED is defined (in addition to the legacy CocoaPods LOOKIN_SERVER_SWIFT_ENABLED).

This removes the false-positive "turn on Swift optimization" notification for SwiftPM/CocoaPods consumers, which always ship the Swift-aware server binary.

Scope is limited to Sources/LookinCore/LookinAppInfo.m to keep this change focused.

Copilot AI review requested due to automatic review settings June 22, 2026 14:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates LookinCore’s server-side app info reporting so SwiftPM/XCFramework builds correctly advertise that the Swift-aware LookinServer is enabled, preventing a false “enable Swift optimization” warning for SPM consumers.

Changes:

  • Treat SPM_LOOKIN_SERVER_ENABLED as equivalent to LOOKIN_SERVER_SWIFT_ENABLED when setting swiftEnabledInLookinServer.
  • Add explanatory comments documenting why both macros imply Swift support is active.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +145 to +150
// Report Swift optimization as enabled whenever the Swift-aware build is
// compiled in. The CocoaPods subspec path defines LOOKIN_SERVER_SWIFT_ENABLED;
// the SwiftPM / XCFramework path defines SPM_LOOKIN_SERVER_ENABLED (which in
// turn imports LookinServerSwift and activates LOOKIN_SERVER_SWIFT_ENABLED_SUCCESSFULLY
// in LKS_TraceManager). Both imply the optimization is active, matching the
// contract documented on -swiftEnabledInLookinServer ("SPM 或 Swift Subspec → 1").
Mirror of the canonical LookInside-Server fix: report
`swiftEnabledInLookinServer = 1` when `SPM_LOOKIN_SERVER_ENABLED` is defined,
so the host no longer shows a false-positive "turn on Swift optimization"
notification for SwiftPM/CocoaPods consumers (which always ship the Swift-aware
server binary).
@Mx-Iris Mx-Iris force-pushed the fix/swift-optimization-false-positive branch from 33a6b18 to 0cd1ba0 Compare June 23, 2026 00:20
@Lakr233 Lakr233 merged commit 0457921 into main Jun 23, 2026
5 checks passed
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