GithubHelp home page GithubHelp logo

Comments (3)

Mythra avatar Mythra commented on July 24, 2024 1

Sounds great @yaahc , thanks for the quick, and helpful response ❤️ !

from color-eyre.

yaahc avatar yaahc commented on July 24, 2024

This is caused by the separation between eyre and color-eyre and the way its currently designed. The eyre! macro is exported by the eyre crate, which knows nothing about color-eyre or its notion of sections. The type that is returned from eyre! is a Report<H> where H hasn't been resolved. And then, to make this all worse the note function and other section modifying functions are similarly defined outside of eyre via an extension trait. It might be possible for me to add an identical trait to SectionExt that works directly on Report rather than being a combinator that applies to Reports inside of Results, so it might be possible to fix this but ultimately it doesn't matter.

All of this boils down to the fact that eyre's 0.4 release depends on generics to specify the handler type. The next release of eyre, which I'm aiming to get out today, removes the generic parameter and instead uses a globally installed hook to construct handler trait objects which can be boxed and stored by eyre!. On the next release this should "just work".

from color-eyre.

yaahc avatar yaahc commented on July 24, 2024

My pleasure, ty for the helpful suggestions!

side note, if you're interested in trialing the new release and helping me catch any issues I may have missed pre release now is the time. The only thing left to do is to update the documentation to reflect the new reality of how everything works and possibly tweek a few of the interfaces to be easier to use.

Here's the relevant include if you're interested

color-eyre = { git = "https://github.com/yaahc/color-eyre.git", branch = "hooked" }

from color-eyre.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.