Skip to content

Fix flatMap key path type inference for Package@swift-5.9.swift#2689

Open
CAMOBAP wants to merge 1 commit intoReactiveX:mainfrom
CAMOBAP:main
Open

Fix flatMap key path type inference for Package@swift-5.9.swift#2689
CAMOBAP wants to merge 1 commit intoReactiveX:mainfrom
CAMOBAP:main

Conversation

@CAMOBAP
Copy link

@CAMOBAP CAMOBAP commented Jan 28, 2026

It seems like #2684 not fully fixed compilation issues for Swift 5.9 (Xcode 15.4)

/Package@swift-5.9.swift:113:31: error: cannot convert value of type 'WritableKeyPath<_, _>' to expected argument type '([Product]) throws -> Product?'
    ] as [[Product]]).flatMap(\.self),
                              ^
/Package@swift-5.9.swift:113:31: error: cannot infer key path type from context; consider explicitly specifying a root type
    ] as [[Product]]).flatMap(\.self),
                              ^
                               <#Root#>
/Package@swift-5.9.swift:126:30: error: cannot convert value of type 'WritableKeyPath<_, _>' to expected argument type '([Target]) throws -> Target?'
    ] as [[Target]]).flatMap(\.self),
                             ^
/Package@swift-5.9.swift:126:30: error: cannot infer key path type from context; consider explicitly specifying a root type
    ] as [[Target]]).flatMap(\.self),
                             ^
                              <#Root#> in https://github.com/ReactiveX/RxSwift
Full CLI call
Invalid manifest (compiled with: [
  "/Applications/Xcode_15.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc",
  "-vfsoverlay", "<TMP_DIR>/vfs.yaml",
  "-L", "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/SwiftPM.framework/SharedSupport/ManifestAPI",
  "-lPackageDescription",
  "-Xlinker", "-rpath",
  "-Xlinker", "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/SwiftPM.framework/SharedSupport/ManifestAPI",
  "-target", "arm64-apple-macos13.0",
  "-sdk", "/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk",
  "-swift-version", "5",
  "-I", "/Applications/Xcode_15.4.app/Contents/SharedFrameworks/SwiftPM.framework/SharedSupport/ManifestAPI",
  "-sdk", "/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk",
  "-package-description-version", "5.9.0",
  "-Xfrontend", "-serialize-diagnostics-path",
  "-Xfrontend", "<USER_CACHE>/org.swift.swiftpm/manifests/ManifestLoading/rxswift.dia",
  "/Package@swift-5.9.swift",
  "-disallow-use-new-driver",
  "-o", "<TMP_DIR>/rxswift-manifest"
])

@CAMOBAP
Copy link
Author

CAMOBAP commented Jan 29, 2026

@mitschlagel just wondering if you observe the issues mentioned in top comment

@freak4pc may I ask you to have a look

Thanks in advance

@mitschlagel
Copy link
Contributor

Will take a look in the morning, cheers!

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.

2 participants