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

Quiet new warnings from Xcode 13.3 #673

Merged
merged 3 commits into from
Apr 5, 2022
Merged

Quiet new warnings from Xcode 13.3 #673

merged 3 commits into from
Apr 5, 2022

Conversation

hisaac
Copy link
Collaborator

@hisaac hisaac commented Mar 31, 2022

Resolves #672

Short description 📝

Building the project with Xcode 13.3 produces some new annoying warnings related to the naming of one of the cases on the XCWorkspaceDataElementLocationType enum. See #672 for more details.

Solution 📦

I renamed case self(path) to case _self(path), which silences the warnings. Tests still run successfully as well.

I tried using Xcode's suggestion of changing it to XCWorkspaceDataElementLocationType.self(path), but then a new compiler error is thrown.

I also tried adding backticks to the case name (XCWorkspaceDataElementLocationType.self(path), but then the same warning as above is thrown again.

@hisaac hisaac requested review from a team, RomainBoulay and andreacipriani and removed request for a team March 31, 2022 13:55
@codecov-commenter
Copy link

codecov-commenter commented Mar 31, 2022

Codecov Report

Merging #673 (8b2a7be) into main (6f2c1a7) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #673   +/-   ##
=======================================
  Coverage   84.75%   84.75%           
=======================================
  Files         157      157           
  Lines        8987     8987           
=======================================
  Hits         7617     7617           
  Misses       1370     1370           
Impacted Files Coverage Δ
Sources/XcodeProj/Workspace/XCWorkspace.swift 45.16% <100.00%> (ø)
...Workspace/XCWorkspaceDataElementLocationType.swift 79.36% <100.00%> (ø)
...codeProjTests/Workspace/XCWorkspaceDataTests.swift 89.74% <100.00%> (ø)
...ts/XcodeProjTests/Workspace/XCWorkspaceTests.swift 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6f2c1a7...8b2a7be. Read the comment docs.

Copy link
Member

@fortmarek fortmarek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting the previous usage is now discouraged. It seems the CI does not pass because _ is considered an invalid character in an enum case. Maybe we can rename it to current?

@hisaac
Copy link
Collaborator Author

hisaac commented Apr 5, 2022

Ah thanks @fortmarek, I opened this and then promptly forgot to come back to check the CI checks. I've updated it to current in b38f1cb. 👍

@hisaac
Copy link
Collaborator Author

hisaac commented Apr 5, 2022

hmm, now it's failing for a new reason:

Unable to resolve action `pepibumur/action-swiftlint@0d4afd006bb24e4525b5afcefd4ab5e2537193ac`, repository not found

🤔

@hisaac hisaac requested a review from fortmarek April 5, 2022 19:03
@hisaac
Copy link
Collaborator Author

hisaac commented Apr 5, 2022

Maybe this was using a fork of https://github.com/norio-nomura/action-swiftlint that got deleted? @pepicrft was pepibumur/action-swiftlint your fork?

@fortmarek
Copy link
Member

Maybe this was using a fork of https://github.com/norio-nomura/action-swiftlint that got deleted? @pepicrft was pepibumur/action-swiftlint your fork?

I am personally not aware why the fork was introduced. Maybe we can try with pointing to the original repository?

@hisaac
Copy link
Collaborator Author

hisaac commented Apr 5, 2022

I’ll give it a shot

@hisaac
Copy link
Collaborator Author

hisaac commented Apr 5, 2022

There we go!

@fortmarek
Copy link
Member

Thanks for the PR @hisaac 👏

@fortmarek fortmarek merged commit 6b7707c into tuist:main Apr 5, 2022
@hisaac hisaac deleted the fix-xcode-13.3-warnings branch April 5, 2022 19:54
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.

New warnings when built using Xcode 13.3
3 participants