Xcode shows sendable warning that then disappears

Hi everyone,

I experience this behaviour from Xcode that I can't explain.

Xcode displays the following warning ("Capture of 'self' with non-sendable type XYZ in a 'Sendable' closure"):
Capture of 'self' with non-sendable type XYZ in a 'Sendable' closure

So, I click on the message, and indeed, I can see the warning:

However, after a second or so, the warning disappears:

When I leave the file, and do a build, the warning comes back. And the entire cycle repeats.

Now, I don't believe the warning is valid here, as I'm not capturing self in the closure. But what surprises me even more is the "when you look at it, it goes away" behaviour.

Is this a bug or in some way expected/intended behaviour? Should I file a radar?

BTW this is Xcode 15.4 / macOS 14.6.1. Strict concurrency checking is enabled.

Xcode dropping warnings — quite expected :smiling_face_with_tear: Xcode showing warnings where there is no warning — as well. Check via command line if the issue persists and if there is a warning from the compiler itself.

I see the same, but also with valid errors that disappear.

I have been tolerating it in the beta assuming there's some dependency mismatch with explicitly-built (or not) modules, or that a test build corrects errors from a target-only build by incorporating new modules -- and then leaving it for Xcode QA to sort out.

Consider also the apple developer forums when seeking support for Xcode - unless you can reproduce it on the command line using swift without Xcode.

OK, I did the test using a command line build and indeed - no message popped up.

I'll create a radar for this issue and will post the number here for future reference. (in case more people get hit with this issue)

Thanks @vns @wes1 !

KR Maarten

Then that's a caching issue that's probably persists in Xcode for a few years already :frowning:

1 Like

FWIW: I created radar message FB14943804.

1 Like