-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Cranelift 0.63: Breaking Unwind API #1634
Comments
Subscribe to Label Actioncc @bnjbvr
This issue or pull request has been labeled: "cranelift"
Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
This is true. Were you manually processing frame layout changes? I would expect typical use to be translating them to the appropriate platform unwind information and little else. This is still quite possible through the public Cranelift APIs, you can see an example of this in In fact, this change in interface allows straightforward generation of a single eh_frame table with shared CIEs, which before would have required users editing bytes for eh_frame FDE records after emitting them, or walking each function's FrameLayoutChange and translating to the appropriate CFA directives when assembling .eh_frame itself. This made unwind generation for Cranelift users who are not JIT engines fairly tricky - restructuring these APIs is partially to make Cranelift more amenable to non-wasmtime uses. I've looked at the Windows APIs somewhat less and my understanding is that this was less a concern before, but is largely unimpacted by this change either way?
You've linked to the I see you edited back a comment suggesting that merging repos might have yielded a Wasmtime-biased change, but I want to address it anyway: Wasmtime has no special access to Cranelift-internal functionality. Published crate versions must build from published crates, so there's no off-release shenanigans here. If unwind information were no longer available in Cranelift public APIs, this would be a showstopper for Wasmtime's usage of that functionality as well. |
Thanks for the quick reply.
Yes, in the case of SystemV, it's already possible to access the gimli struct via the
I think it will be a good practice to start documenting Cranelift changes in a CHANGELOG-style format. As for the Wasmer use case, I think there are more users just interested on the Cranelift IR itself, and it would be useful to have a list of changes (new features & breaking changes) for it, so we can keep up to date with the progress. Right now our process to keep up to date with the progress in Cranelift is very tedious: we have to scrape all commits and investigate each of the changes in a daily basis, which is really non-ideal.
Yeah, you are completely right. However, I feel some of the breaking changes in Cranelift have been taken with only wasmtime in mind and no input from external users. I didn't mean to flame the discussion, so that's why I edited the comment :) |
I will repeat what I said in that tweet: even if we wanted to, which we don't, we couldn't possibly only take Wasmtime into consideration when making changes to Cranelift, because we have other projects that are very high priority, with Firefox being one of them. As you can no doubt tell, Cranelift is undergoing significant changes right now. I appreciate that those cause work for downstream projects. Given that we're very much not making any API (or behavior) stability guarantees yet, I don't think us putting in the extra work of breaking out documentation of larger changes into a changelog would make a meaningful difference to the amount of work required to keep up, either. One way to avoid that churn is to wait it out and stick to a specific version of Cranelift until things have settled down a bit. |
You ought to be able to use I took a quick look at what I think your |
It makes me a bit sad to hear that, specially because I believe having a CHANGELOG will benefit the Cranelift project as a whole.
We are going some code changes for unwinding which are not yet published. Thanks for taking a look anyway!
Thanks! ❤️ I will ping you once is ready so we can discuss the API from a practical perspective |
Cranelift has been changing continuously at least since I started using it in July 2019. I understand that minor version bumps are semver-compliant, but since there is no plan (that I know of) to go 1.0 any time soon, waiting for 1.0 isn't really feasible. Also, I doubt Cranelift would be able to document every breaking change since 0.1 even if they did release 1.0, so we'd still have to deal with it at some point.
I agree. The difficult part of using cranelift is not the rapid change but the lack of documentation (both for the changes and for cranelift as a whole). Take for example
+1 |
To clarify, I do agree that Cranelift should eventually get a better story for documenting breaking changes. More importantly, it should get a somewhat more stable API and reduce the amount of breaking changes. That should probably happen before a 1.0 release, but we don't have firm plans for either at this time. @jyn514, in the meantime, I'm curious to hear more about how you think a change log would help. The The best I can come up with is something like "Add TLS (thread local storage) support for ELF targets to Cranelift", as the PR says, but would that have helped in figuring out what to pass for your usage of |
Try to restrict your search to the domain you are interested in: "compiler tls" or "compiler ebb". For me, this gives the correct wikipedia article as the top result. |
I think there is little value in keeping this issue open. |
We were able to adapt to newer APIs. I think it will still be useful to implement the last suggestion, but we have no exact need for it now.
Closing the issue for now |
In the latest published version of Cranelift (0.63), there has been breaking changes that are not documented anywhere, and with no alternative ways of using them.
UnwindCode
,UnwindInfo
orCallFrameInstruction
data can't be retrieved outside of Cranelift.The last point is specially sensitive, as implementors that want to access the unwind information generated by the Cranelift IR right now are unable to do it with the latest version of Cranelift.
[Edit: removed assumptions]
The text was updated successfully, but these errors were encountered: