-
Notifications
You must be signed in to change notification settings - Fork 201
de-public fn finalize_definitions
#1353
Comments
This is true for So maybe a better fix is to revert #1290 and handle the Also, I thought you were using |
I think re. |
Could that logic you added in |
I don't see a reason why not. Pretty sure I picked |
Since there's a valid use case for calling |
Right, so what I'm proposing is keep them both public, and move |
Ok, in that case I think there should be more documentation about what it means to 'finish' a module vs 'finalize_definitions'. I know it's meant to be independent of the backend, but you could give examples that |
…elift change the cranelift change will likely be reverted, and this will again become necessary. see bytecodealliance/cranelift#1353
As a random thought, it would be good to rename both "finish" and "finalize_definitions" into some things that are more self-explanatory and help distinguishing between the twos, if we could. |
@iximeow I can work on fixing this if you haven't already. |
@philipc go for it, i'm pretty sure i have my week cut out for me already |
Now that
finalize_definitions
is called by default when finalizing a module (since #1290), calling it in an application using Cranelift is likely either an unintentional second call tofinalize_definitions
, or an outright error. If the lifecycle of finalization is entirely internal toModule
(as it seems it ought to be), we ought to make this non-public and avoid some misuse.I happened to trip across this when revisiting some code written before this change was made, where this might have more clearly signalled what changed in the mean time.
The text was updated successfully, but these errors were encountered: