Xcode 16 reports incorrect syntax errors on Todos sample project #3593
Replies: 3 comments 3 replies
-
Hi @sleepygarden, this is not to be expected, but unfortunately it is just an Xcode bug. I am not seeing this in 16.2, so perhaps if you update your Xcode it will work better. Since this isn't an issue with the library I am going to convert it to a discussion. Please feel free to continue the conversation over there! |
Beta Was this translation helpful? Give feedback.
-
Confirmed @mbrandonw, this appears to be a uniquely Xcode 16.0 bug. 16.2 Works perfectly |
Beta Was this translation helpful? Give feedback.
-
I'm using Xcode 16.2, but the problem still exists for me :( |
Beta Was this translation helpful? Give feedback.
-
Description
I'm trying to teach myself TCA, and referring the the Todos sample project as a point of reference. The unit tests inside the project compile and run fine, but syntax highlighting shows that most of the file is invalid code. Is this to be expected with Xcode 16.0? The issue persists after building, after cleaning the project, after rebooting, and after deleting derived data.
I think the issue stems from the fact that Xcode doesn't see
Todos
as a Reducer, and thus can't infer the base type on all of the keypaths and Action casesChecklist
main
branch of this package.Expected behavior
Unit test targets are able to correctly identify types annotated with macros for the purposes of syntax highlighting
Actual behavior
Unit test target is not able to determine that a type which has Reducer applied via macro is a Reducer for the purposes of syntax highlighting
Reproducing project
The reproducing project is just the Todos app on
main
as of 2/10/25The Composable Architecture version information
1.17.1
Destination operating system
iOS 18
Xcode version information
Version 16.0 (16A242d)
Swift Compiler version information
Beta Was this translation helpful? Give feedback.
All reactions