You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You shouldn't document those (at least from an API point of view) because you are not supposed to directly expose them. You should wrap them with Crystal constructs, and document those.
I would be fine with this if macros worked for lib but they don't. Why should someone have to write out potentially hundreds of functions to wrap them? lib methods need a special "LibMethod" type in Macros that has the Crystal method name, C function name, args, and return type.
Inside methods doesn't help for creating an API wrapper automatically 🤷
I believe it might be possible to pull up the availability of reflection data for lib types. The interfaces are fixed. There is no impact from type inference.
I believe this can be done, but it will be tricky. A fun is different from a def in that it always have types, and these are eagerly checked, and they produce an External node.
I tried moving that logic to an earlier phase a few times in the past, and I always failed. But maybe someone finds a way to do it! 😄
I would be fine with this if macros worked for
lib
but they don't. Why should someone have to write out potentially hundreds of functions to wrap them?lib
methods need a special "LibMethod" type in Macros that has the Crystal method name, C function name, args, and return type.Originally posted by @sol-vin in #6721 (comment)
The text was updated successfully, but these errors were encountered: