Stream: git-wasmtime

Topic: wasmtime / Issue #1226 wasi-common error cleanup: part 1,...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 04 2020 at 14:07):

marmistrz commented on Issue #1226:

We move to std::io::Error so as to keep the number of error types as small as possible?

view this post on Zulip Wasmtime GitHub notifications bot (Mar 04 2020 at 14:09):

kubkon commented on Issue #1226:

We move to std::io::Error so as to keep the number of error types as small as possible?

Correct. Dan and I agreed to decouple concept of WASI errno (it's ABI representation in fact) from the functional code in wasi-common, and this cleanup is the first step. This will make transition to wiggle much easier in the coming days.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 04 2020 at 18:58):

kubkon commented on Issue #1226:

This generally seems fine to me, I started to try to take a look at what was specifically going on but I'm pretty lost in how all these errors are handled.

In general there's a lot of rightward-drift and a lot of tests. I feel like a lot of this code could greatly benefit from not using methods-with-closures and instead have match statements with early-returns. That's sort of out of scope for this PR it looks like though.

That's fair! I agree with you that this PR isn't about this refactoring per se, but given that the proposed changes are not in that many places, I can easily refactor them here and now.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 04 2020 at 20:49):

kubkon commented on Issue #1226:

This generally seems fine to me, I started to try to take a look at what was specifically going on but I'm pretty lost in how all these errors are handled.

In general there's a lot of rightward-drift and a lot of tests. I feel like a lot of this code could greatly benefit from not using methods-with-closures and instead have match statements with early-returns. That's sort of out of scope for this PR it looks like though.

@alexcrichton done in 686fd9d.


Last updated: Oct 23 2024 at 20:03 UTC