rhx/SwiftGtk

Ubuntu gtk4 missing `@escaping` annotation

MasterBel2 opened this issue · 2 comments

/home/masterbel2/Documents/Dev/LinuxLobby/.build/plugins/outputs/swiftgio/GIO/gir2swift-plugin/gir2swift-generated/GIO/Gio-2.0-L.swift:1794:94: error: passing non-escaping parameter 'equalFunc' to function expecting an @escaping closure
        let result = g_list_store_find_with_equal_func_full(list_store_ptr, item.object_ptr, equalFunc, userData, position)
                                                                                             ^
/home/masterbel2/Documents/Dev/LinuxLobby/.build/plugins/outputs/swiftgio/GIO/gir2swift-plugin/gir2swift-generated/GIO/Gio-2.0-L.swift:1793:108: note: parameter 'equalFunc' is implicitly non-escaping
    @inlinable func findWithEqualFuncFull<GObjectObjectT: GLibObject.ObjectProtocol>(item: GObjectObjectT, equalFunc: GEqualFuncFull, userData: gpointer? = nil, position: UnsafeMutablePointer<guint>! = nil) -> Bool {
                                                                                                           ^
                                                                                                                      @escaping

Branch: gtk4
Ubuntu 22.10
GTK version: 4.8.1+ds-1ubuntu1

rhx commented

I have been trying to reproduce this problem, but this works fine for me. The only thing I noticed was that there were some libraries missing in the README.md that needed to be installed. I have updated the documentation now, so maybe try the updated apt get that's in the README file now and see if this changes anything (don't forget to rm -rf .build first).

Which branch did you try this on? Both gtk4 and gtk4-monorepo (as well as gtk4-development) work fine for me. Also, which version of Swift did you try this with?

Sorry for taking so long to get back to this. I've just tried to reproduce this issue from my end too, and everything's working fine (?!). Makes me wonder if a simple machine restart would have fixed it? I'll try that next time I get something like this.