-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge generic enum tags #785
base: master
Are you sure you want to change the base?
Merge generic enum tags #785
Conversation
Looks good to me as a total outsider. @emilio, are you the right person to ping these days? You have the most commits last year. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the lag here, I haven't been able to take a look lately at cbindgen stuff.
In general the feature makes sense, but instead of the Rc<Cell<>>
shenanigans and having to keep the unmangled paths around, it seems it could be implemented more cleanly and efficiently in instantiate_monomorph
. At that point, you know you have a generic, and you're going to monomorphize it. It should be feasible to synthesize a tag enum there, and just carry an is_monomorphic: bool
or so to avoid generating the tag if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks much better. Some final requests, and also can you add the new option to the docs?
With that it looks good.
Thanks, if CI is green this looks good. Can you squash your commits in the way you best see fit so that we don't have "Tidy up" commits? Or would you be fine with me squashing before merging? |
a9518c2
to
e8373f1
Compare
hi all, i am interested in getting this PR merged as it would greatly help me in my project 🙂 Is there something I can do to make this happen? |
generated code is ugly until we get mozilla/cbindgen#785 merged. when this is done, type aliases can be used and it will look okay
hi @emilio |
See attached issue.
Resolves #784