Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use provide_any feature in error-stack #697

Merged
merged 4 commits into from
Jun 27, 2022
Merged

Use provide_any feature in error-stack #697

merged 4 commits into from
Jun 27, 2022

Conversation

TimDiekmann
Copy link
Member

🌟 What is the purpose of this PR?

When error-stack was released, the provide_any feature has not landed on nightly yet.

🔗 Related links

🚫 Blocked by

🔍 What does this change?

  • Remove provider and use core::any instead

📜 Does this require a change to the docs?

  • The documentation has been adjusted to point to core::any instead

@TimDiekmann TimDiekmann added the meta/changelog Needs to be added to a changelog label Jun 27, 2022
@github-actions github-actions bot added the area/libs > error-stack Affects the `error-stack` crate (library) label Jun 27, 2022
Base automatically changed from td/bump-toolchain to main June 27, 2022 09:44
@github-actions github-actions bot removed the area/libs > error-stack Affects the `error-stack` crate (library) label Jun 27, 2022
@TimDiekmann TimDiekmann reopened this Jun 27, 2022
@github-actions github-actions bot added the area/libs > error-stack Affects the `error-stack` crate (library) label Jun 27, 2022
Copy link
Contributor

@Alfred-Mountfield Alfred-Mountfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we generally just do a quick ctrl + f for all occurrences of provider and make sure they're not disclaimers about stuff we've included, etc. (Did we mention it in the README for example)

Then happy to approve

//! [`attach`]: Report::attach
//! [`error_stack::provider`]: crate::provider
//! [`Provider` API]: https://rust-lang.github.io/rfcs/3192-dyno.html
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was only used in the above comment. If it would have been needed, the docs-test would fail.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm on about the the [Provider API] link, not the removed line for error_stack::provider. I don't think docs-tests would fail if you add an unused link?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, sure. Yes, this is already used in the first paragraph of the section:

//! This crate uses the [`Provider` API] to provide arbitrary data. This can be done either by
//! [`attach`]ing them to a [`Report`] or by providing it directly when implementing [`Context`].
//! The blanket implementation of [`Context`] for [`Error`] will provide the [`Backtrace`] to be
//! requested later.

No, it won't complain if you add unused links (sadly) 😢

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha, GitHub wasn't letting me see the above code even when I clicked on the expand button :(

@TimDiekmann
Copy link
Member Author

Can we generally just do a quick ctrl + f for all occurrences of provider and make sure they're not disclaimers about stuff we've included, etc. (Did we mention it in the README for example)

Already did that when updating the docs

Then happy to approve

You already have approved.

@Alfred-Mountfield
Copy link
Contributor

Alfred-Mountfield commented Jun 27, 2022

You already have approved.

I changed it to comment when I clicked submit Review but GitHub decided to ignore me

Copy link
Contributor

@Alfred-Mountfield Alfred-Mountfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@TimDiekmann TimDiekmann merged commit 3effe3d into main Jun 27, 2022
@TimDiekmann TimDiekmann deleted the td/provide_any branch June 27, 2022 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/libs > error-stack Affects the `error-stack` crate (library) meta/changelog Needs to be added to a changelog
Development

Successfully merging this pull request may close these issues.

2 participants