Ancestors

Written by eickot on 2024-11-20 at 18:13

Hey @Migueldeicaza I think in the last version of main of swiftgodot there is an error, I just updated one of my repos to the last commit, and generates this error:

I think is the callable macro

=> View attached media

=> More informations about this toot | More toots from eickot@mastodon.social

Toot

Written by Miguel de Icaza ᯅ🍉 on 2024-11-20 at 18:21

@eickot that looks like your code, you might need to cast to see if this error supports that method perhaps?

We can discuss on Slack in a couple of hours

=> More informations about this toot | More toots from Migueldeicaza@mastodon.social

Descendants

Written by eickot on 2024-11-20 at 18:22

@Migueldeicaza the error is in the proxy function generated by the macro callable. When I remove the @Callable everything works. If I go back on the commits, it works too.

=> More informations about this toot | More toots from eickot@mastodon.social

Written by Miguel de Icaza ᯅ🍉 on 2024-11-20 at 19:22

@eickot can you paste the code for the function?

=> More informations about this toot | More toots from Migueldeicaza@mastodon.social

Written by eickot on 2024-11-20 at 18:24

@Migueldeicaza I will try now to build it with swift 6, I'm still in swift 5.10

=> More informations about this toot | More toots from eickot@mastodon.social

Written by eickot on 2024-11-20 at 18:24

@Migueldeicaza Btw, in one of my pet projects, I steal 6 lines of one of you macro to create a macro for me, I hope is not a problem :)

=> More informations about this toot | More toots from eickot@mastodon.social

Written by Miguel de Icaza ᯅ🍉 on 2024-11-20 at 19:23

@eickot you can take as much code as you want, it is all MIT licensed

=> More informations about this toot | More toots from Migueldeicaza@mastodon.social

Written by eickot on 2024-11-20 at 18:31

@Migueldeicaza testing, the problem appears when the function has parameters, an empty function with callable works. but when parameters appears, then the error appears

=> More informations about this toot | More toots from eickot@mastodon.social

Written by eickot on 2024-11-20 at 18:56

@Migueldeicaza Interesting the code that generates, in swift playground says is correct:

https://swiftfiddle.com/tyldhdthxfdenfy2tfvlv2ljee

=> More informations about this toot | More toots from eickot@mastodon.social

Written by eickot on 2024-11-20 at 19:03

@Migueldeicaza Hey, sorry for the lots of messages, I found the issue, I needed to import Foundation. Otherwise any Error doesn't have the localizedError. Is it fine if I create a P/R adding a comment on the line of the localized error?

=> More informations about this toot | More toots from eickot@mastodon.social

Written by Miguel de Icaza ᯅ🍉 on 2024-11-20 at 19:25

@eickot oh we are trying to avoid depending on Foundation for now. For people that want small deps. If you show me the code I can fix it

=> More informations about this toot | More toots from Migueldeicaza@mastodon.social

Written by eickot on 2024-11-20 at 20:09

@Migueldeicaza yes, is this line: https://github.com/migueldeicaza/SwiftGodot/blob/main/Sources/SwiftGodotMacroLibrary/MacroCallable.swift#L148

=> More informations about this toot | More toots from eickot@mastodon.social

Written by eickot on 2024-11-20 at 20:11

@Migueldeicaza I also think is not a good experience, to need any external dependencies, and also the error is really missleading

=> More informations about this toot | More toots from eickot@mastodon.social

Written by Miguel de Icaza ᯅ🍉 on 2024-11-20 at 22:00

@eickot Yup, cooking a patch now.

=> More informations about this toot | More toots from Migueldeicaza@mastodon.social

Written by eickot on 2024-11-20 at 22:14

@Migueldeicaza nice, just after finding the issue my laptop died :( i dont know when i will be able to continue

=> More informations about this toot | More toots from eickot@mastodon.social

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113516666766744388
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
339.947908 milliseconds
Gemini-to-HTML Time
2.077492 milliseconds

This content has been proxied by September (3851b).