New warnings when built using Xcode 13.3
hisaac opened this issue Β· comments
Context π΅οΈββοΈ
I noticed that when running the project using Xcode 13.3, some new warnings are produced.
What π±
We're running XcodeProj via the command line, and two sets of warnings get printed to the console when building (file paths intentionally anonymized):
1:
/Users/<user>/path/to/project/scripts/TuistManifestProjectSwiftLint/.build/checkouts/XcodeProj/Sources/XcodeProj/Workspace/XCWorkspace.swift:31:70: warning: 'self' refers to the method 'XCWorkspace.self', which may be unexpected
let data = XCWorkspaceData(children: [.file(.init(location: .self("")))])
^
/Users/<user>/path/to/project/scripts/TuistManifestProjectSwiftLint/.build/checkouts/XcodeProj/Sources/XcodeProj/Workspace/XCWorkspace.swift:31:70: note: use 'XCWorkspace.self' to silence this warning
let data = XCWorkspaceData(children: [.file(.init(location: .self("")))])
^
XCWorkspace.
2:
/Users/<user>/path/to/project/scripts/TuistManifestProjectSwiftLint/.build/checkouts/XcodeProj/Sources/XcodeProj/Workspace/XCWorkspaceDataElementLocationType.swift:65:21: warning: 'self' refers to the method 'XCWorkspaceDataElementLocationType.self', which may be unexpected
self = .self(path)
^
/Users/<user>/path/to/project/scripts/TuistManifestProjectSwiftLint/.build/checkouts/XcodeProj/Sources/XcodeProj/Workspace/XCWorkspaceDataElementLocationType.swift:65:21: note: use 'XCWorkspaceDataElementLocationType.self' to silence this warning
self = .self(path)
^
XCWorkspaceDataElementLocationType.
And here's how the errors look in Xcode when building the project there:
Proposal π
A simple solution would be to just rename that .self
case in the XCWorkspaceDataElementLocationType
enum. I don't know enough about the project to know if that's the right solution, but after doing so, the project compiles and runs without warnings.
I'll open a PR shortly to rename that enum case, but I'm open to different solutions if there are better ideas from folks more familiar with the project here.