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

add "SQLite." prefix in Table, Expression #11

Merged
merged 1 commit into from
Sep 21, 2024
Merged

Conversation

georgeef
Copy link
Contributor

@georgeef georgeef commented Sep 21, 2024

(This PR is the same as #10, but with MMEX.xcodeproj excluded).

After update to Xcode 16.0, I cannot compile. Seems that Foundation also defines Expression and there is a name collision. I couldn't find a way to declare in Swift that Expression must be taken from SQLite.

This PR adds the prefix SQLite. in front of Table and Expression.

Note: I also tried to remove Foundation, or to import from it only the names that are needed, effectively making SQLite the only fully imported library. It works (with less changes in the code), but I think adding an SQLite. prefix is more robust and more clean.

@guanlisheng guanlisheng merged commit e112a5b into master Sep 21, 2024
1 check passed
@georgeef georgeef deleted the fix_collision-1 branch September 21, 2024 09:28
@georgeef
Copy link
Contributor Author

see also stephencelis/SQLite.swift#1269. three solutions are proposed there:

  • add prefix in each occurrence of Expression, as in this PR
  • add typealias Expression = SQLite.Expression at file level
  • add import SQLite.Expression at file level

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