Build failure on xcode

Here is the scenario: I cloned the SourceKit repository and worked on an issue for about one to two weeks. After completion, I switched back to the main branch, pulled the latest changes, and encountered build failures, even though I hadn't made any changes myself.

I then deleted that repository, cloned it into a different path, and the build worked fine. I proceeded to work on another issue for about two weeks, then switched back to the main branch and pulled the changes again. Now, an entirely unrelated error is appearing. What could be the problem here?

Could you check if updating your package dependencies (File -> Packages -> Update to latest Versions) fixes the issue? Seems like you need to pick up a new version of swift-tools-protocols.

Actually, this time I cleared the entire Xcode build folder, and the issue was resolved. If it happens again, I will try this method.