This repository has been archived by the owner on Jun 26, 2020. It is now read-only.
[wasm] Have the WasmError::User member be a String #760
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As said on IRC, using
failure::Error
requires to have thefailure/std
feature set, which adds an old version ofbacktrace
as a crate dependency. In addition to supplementary compilation cost (the build is longer!), it also means that some platforms won't quite work: windows aarch64 in particular doesn't plain work.A few options I've considered:
backtrace
infailure
etc. This would be my preferred way to do things, but that implies a lot of reliance on external factors (failure
accepting the pull request, releasing a new version etc.) and our work (on Spidermonkey) is unfortunately blocked by this. So I've removed the one use of thefailure::Error
in the code, and thefailure/std
dependency.failure::Error
, this could be aBox<failure::Fail>
orBox<error::Error + Sync + Send>
.String
, which also works in non-std builds. I've chosen this path since our use cases don't indicate a clear preference over one way or the other (so I've concluded that the simplest would be best), but I'm open to other opinions.Anyway, I'd be happy to hear people's thoughts about this.