Skip to content

use thiserror prevents re-use in piggy-back proc-macros #167

Closed
@drahnr

Description

@drahnr

First of all, ❤ thank you for all your work!

I recently started to create a proc-macro to piggy-back on thiserror to determine the fatality and convenient splitting of those error types ( https://github.com/drahnr/fatality ). Under the hood it generates #[derive(fatality::thiserror::Error)] annotated types, and as long as thiserror is part of the manifest in a compatible version with the re-export of fatality, everything works just fine.
As a matter of fact, I don't want the user to have to deal with this, thiserror is an impl detail that they should not be concerned with drahnr/fatality#3 .

The root cause is the assumption of having an import of thiserror in a few places in the code that generates statements like use thiserror::private::AsDynError; which are the root of the issue at hand.

Would you accept a patch to make the base of that use statement adjustable?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions