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

Declare MSRV for error-stack #930

Closed
indietyp opened this issue Aug 14, 2022 · 0 comments · Fixed by #944
Closed

Declare MSRV for error-stack #930

indietyp opened this issue Aug 14, 2022 · 0 comments · Fixed by #944
Assignees
Labels
area/libs > error-stack Affects the `error-stack` crate (library) category/enhancement New feature or request

Comments

@indietyp
Copy link
Member

indietyp commented Aug 14, 2022

Is your feature request related to a problem? Please describe.

I am currently implementing #794. With the recent release of 1.63, I would like a clarification on the officially supported MSRV for error-stack 0.2.

This is expressed in two ways, which I'd consider blocking until a concrete ruling has been given.

1.63 stabilized explicit_generic_args_with_impl_trait, which is part of the current rework of the hook architecture.

https://github.com/indietyp/hash/blob/40e389247364eeac6cf955c60b8bbe9938da541e/packages/libs/error-stack/src/hook.rs#L54-L56

Another way would be that we would likely be able to drop the hooks feature if we set the MSRV to 1.63 and work with only std for hooks, as it currently brings in a new dependency once_cell, which we could fully replace by RwLock.

https://github.com/indietyp/hash/blob/40e389247364eeac6cf955c60b8bbe9938da541e/packages/libs/error-stack/src/hook.rs#L13-L18

The current hack that has been used to fix #873, could be rewritten to be more precise.

https://github.com/indietyp/hash/blob/40e389247364eeac6cf955c60b8bbe9938da541e/packages/libs/error-stack/src/report.rs#L246-L248

        let span_trace = if core::any::request_ref::<SpanTrace>(&provider)
            .filter(|span_trace| span_trace.status() == SpanTraceStatus::CAPTURED)
            .is_some()

(same with the Backtrace code)

This is because with the nightly version, after the stabilization of explicit_generic_args_with_impl_trait, the number of generics in request_ref was changed. We no longer need to employ the hackif we only support versions that have explicit_generic_args_with_impl_trait stabilized.

These are not necessarily deal breakers but could make the API more concise. To be able to implement them, an official MSRV is needed.

Describe the solution you'd like

README.md entry about the current MSRV and CI/CD tests for the MSRV.

Additional context

This has been discussed off GH with @TimDiekmann.

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) category/enhancement New feature or request
Development

Successfully merging a pull request may close this issue.

4 participants