I have the same issue. I am using Xcode (Version 12.0 beta 2 (12A6163b)).
Added a resources: [.copy("something.json")] in Package.swift as well. And that referenced file on the same level as the Readme.
Type 'Bundle' has no member 'module'
PS: There is no failure if I reference a file in the Package.swift file that is actually not added. Like resources: [.copy("file/that/does/not/exist")]. Is it supposed to be like this?
Post
Replies
Boosts
Views
Activity
Add a second View in the body of
NavigationView {
MasterList()
DefaultDetailView()
}
Thank you for your help.
Yes I was referring to that code that was posted to https://developer.apple.com/forums/thread/682032 (which was taken from the code section from the video of the "Developer" app where I was seeing it)
You say "There's no suspension points between reading the current state and writing something based on that state."
But:
Reading state: if let cached = cache[url] { … }
Suspension Point
let handle = async { try await downloadImage(from: url) }
Writing state: cache[url] = .inProgress(handle)
Suspension Point: let image = try await handle.get()
Writing state: Either cache[url] = .ready(image) or cache[url] = nil
What if task 2 enters while task 1 is at the first suspension point, and therefore reads the cache still as nil?
Is this some wrong thinking on my part? (Sorry)
Does the task handle not count as suspension point?
Yes, thank you for clearing that confusion. I think I get it now.
ps: async/await makes concurrency less complicated but it is still not trivial. 😢
also thank you for your remark about that adding a delete cache function requires a check.