SQLite.swift icon indicating copy to clipboard operation
SQLite.swift copied to clipboard

Expression - name space conflict with Xcode 16/iOS 18

Open neodave opened this issue 1 year ago • 5 comments

Build Information

0.15.3 Xcode Beta 16 iOS 18/macOS 15 Using Swift Package

When updating to the latest Xcode beta 16 there is a name space conflict between the SGLite struct Expression and the new Expression found in Apple's Foundation framework. Attached are screenshots of both. I will attempt to fix this and if I do I will submit a PR

Screenshot 2024-06-13 at 10 33 24 AM Screenshot 2024-06-13 at 10 27 07 AM

neodave avatar Jun 13 '24 15:06 neodave

To anyone who is having this issue, a temporary fix would be adding SQLite namespace before the Expression to let Xcode know we are referring to SQLite's Expression instead of Foundation's.

Example:

  • Xcode 15 Expression<String>("id")
  • Xcode 16 SQLite.Expression<String>("id")

This would fix this issue

JohnnyTseng avatar Jun 14 '24 09:06 JohnnyTseng

Thank you JohnnyTseng, great info

neodave avatar Jun 24 '24 14:06 neodave

Any ideas how to solve this without refactoring our entire codebase to explicitly call SQLite?

tcollins590 avatar Jun 25 '24 14:06 tcollins590

@tcollins590 You could define a typealias at file level which makes it globally visible:

typealias Expression = SQLite.Expression

kaiwinter avatar Jun 25 '24 17:06 kaiwinter