Swift compiler error for nonexistent file

Hi fellow Saplings,


I am running into a (seemingly benign) group of Swift compiler errors.


The errors are "Unterminated '/*' comment" and "Expected '}' at end of brace statement"


They are occuring in a named file,"50FBC2A9..." , yet this file doesn't seem to exist.

When I click through the error, an empty window opens up (not even an empty file!).


These errors are not preventing my app from compiling, so what are they possibly affecting?


Spooky, huh?

Accepted Reply

It looks like the error disappeared when I updated my MBP to High Sierra Beta 4, I was originally on Sierra 10.12.6 beta... Spooky

Replies

Did you perform a clean build (option clean in Product menu.

Hi Claude31,


Yes I tried clean multiple times, I'm wondering if I should delete all of my derived data or something like that?

Yes, I would try.


But before, did you search for all the /*, to see if one is unbalanced ; this could mislead the compiler to search for something that does not exist ?

It looks like the error disappeared when I updated my MBP to High Sierra Beta 4, I was originally on Sierra 10.12.6 beta... Spooky

Great. Don't forget to close the thread.

Had the same problem with Xcode 9.1. Did not get desperate enough to install a new OS, however. The problem was not resolved by cleaning or deleting derived data. The only way I was able to fix the issue was to create a new file matching the name of the file Xcode claims to error to be in. Once the file is created, Xcode realises the errors of its ways and compiles fine, provided there are no remaining comile errors.


I know this issue is old and tagged as solved, but it was incredibly frustrating. Hopefully this saves somebody some time.

Thank you, this did help me. Found no other way to remove the errors.