lo48576 / fbxcel-dom

FBX DOM library for Rust. // See https://github.com/lo48576/fbx-viewer for working example application // rework (total rewrite) is planned
Apache License 2.0
25 stars 10 forks source link

Remove dependency to `failure` #1

Closed lo48576 closed 4 years ago

lo48576 commented 4 years ago

failure depends on backtrace crate when std feature is enabled, but it prevents me from testing dependencies with minimal versions (by cargo +nightly update -Z minimal-versions && cargo test --all-features). (See https://github.com/rust-lang-nursery/failure/pull/310 for detail.)

Additionally, std Error trait are being improved and it would be useful enough (see https://github.com/rust-lang/rust/issues/53487). So it would be better to use simpler error types, rather than error types with many features and extra APIs, to avoid providing unnecessary functionalities and keeping their compatibilities.

I'll use anyhow or thiserror, but it is not yet decided.

lo48576 commented 4 years ago

Closed by c99727523d9c5ffc40ff041ad02373b8168882f2.

lo48576 commented 4 years ago

Released 0.0.5.

As experiment, I created and replaced some types locally, but it seems to end up in creating struct FooError { msg: String } or something like that, and I don't feel it is better than anyhow::Error, so I abandoned that branch. Additionally, current API is not stable, so creating dedicated error type would reduce flexibility of API.

In conclusion, I don't think I should remove anyhow or should stop using anyhow::Error, at least for now.