CommentComment

I received two types of emails in response to last weekā€™s introductory comment. The first type had phrases like ā€œNo warnings at all? Wow!ā€ and ā€œIā€™m surprised you didnā€™t get anything at all!ā€ and the things said in the other type of email were much more along the lines of ā€œYou didnā€™t switch on the checks properly.ā€ šŸ«£

Yes, itā€™s true. I made a huge mistake with last weekā€™s intro, where I used enableUpcomingFeature instead of enableExperimentalFeature. Itā€™s crystal clear in the documentation that the former is for Swift 6, and the latter is for Swift 5.9/5.10. I was running with Xcode 15.3, which includes Swift 5.10. šŸ«¢

Itā€™s much more straightforward if youā€™re switching it on for Xcode, but if you are testing this with a package, thereā€™s a subtle difference between the two.

What tripped me up was when I tried inserting some code I copied from Matt Massicotteā€™s Concurrency Recipes repository to test that I had the checks enabled correctly. I knew the code would trigger a concurrency warning, and sure enough, a warning appeared as soon as I pasted it in! What I didnā€™t realise is that that warning would have appeared before I added the strict concurrency flag, too. šŸ˜¬

Iā€™ve been making lots of silly mistakes recently, and itā€™s frustrating. I used to have such an eye for detail, and in my mind, I like to think I still do. That said, errors like this are not uncommon for me these days. I donā€™t think Iā€™m quite old enough yet for it to be age-related, so itā€™s more likely to be the constant context-switching that I put myself through. I often close a window to find a stack of windows with an embarrassingly high number of half-completed tasks. Youā€™d think I would have got the hang of it by now. šŸ˜¬

Anyway, the long and short of it is that we do not have zero strict concurrency warnings in the Swift Package Index. We have 526! There appear to be a few common root causes though, so Iā€™m sure that number will come down quickly when we start fixing them. šŸ› ļø

Dave Verwer  

News


Code




Videos

Jobs

iOS Engineer @ trivago ā€“ trivago, a metasearch engine using real-time auction and petabytes of data, enables millions of travelers compare hotel prices from hundreds of booking sites. Based in DĆ¼sseldorf, we foster a culture of learning and innovation, embracing flexibility for our talents to shape the travel industry. ā€“ On-site (Germany) with some remote work (Anywhere)

Senior iOS/macOS Developer @ Paste ā€“ Joining Paste means crafting impactful, user-focused products alongside a team that values innovation, flexibility, and a culture of collaboration. Dive into projects that push the boundaries, enjoy freedom in how you work, and help shape the future of productivity tools. ā€“ Remote (within European timezones)

 

If youā€™d like to see your job featured in iOS Dev Weekly, post it on iOS Dev Jobs and select ā€œFeatured listingā€ as you check out, and itā€™ll be in next weekā€™s newsletter. šŸŽ‰

 

And finally...

Swift puts Breakout on the Playdate. JavaScript puts it in Google Calendar! šŸ˜