-
Notifications
You must be signed in to change notification settings - Fork 60
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
Update the changelog and upgrading guide in preparation for 0.8 #428
Conversation
✅ Deploy Preview for shepmaster-snafu ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
I've run my mini-crater tool using the I've also tested with upgrading some of my binary projects and asked some friends to test with their private projects that use SNAFU. The biggest issue there was the change of Anything else we should check before 0.8? |
Do we have plans to change anything in light of #425? If not, I think we are ready to launch the release rocket. |
65a870c
to
d100276
Compare
I went ahead and added those deprecation attributes as it was easy. So... good to go then? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found an unexpected problem in DICOM-rs when trying to migrate the code which depends on whatever_context
. It cannot infer the type parameters, whereas it had no issues in snafu 0.7. I put it in branch wip/snafu_0.8
, might be worth taking a look before release.
error[E0284]: type annotations needed
--> transfer-syntax-registry/src/adapters/jpeg.rs:75:18
|
75 | .with_whatever_context(|_| format!("JPEG decoding failure on frame {}", i))?;
| ^^^^^^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `E2` declared on the method `with_whatever_context`
|
= note: cannot satisfy `<_ as FromString>::Source == _`
help: consider specifying the generic arguments
|
75 | .with_whatever_context::<_, String, E2>(|_| format!("JPEG decoding failure on frame {}", i))?;
| +++++++++++++++++
error[E0283]: type annotations needed
--> transfer-syntax-registry/src/adapters/jpeg.rs:75:18
|
75 | .with_whatever_context(|_| format!("JPEG decoding failure on frame {}", i))?;
| ^^^^^^^^^^^^^^^^^^^^^ - type must be known at this point
| |
| cannot infer type of the type parameter `E2` declared on the method `with_whatever_context`
|
= note: multiple `impl`s satisfying `DecodeError: From<_>` found in the following crates: `core`, `dicom_encoding`:
- impl From<NotEncapsulatedSnafu> for DecodeError;
- impl From<dicom_encoding::adapters::decode_error::FrameRangeOutOfBoundsSnafu> for DecodeError;
- impl<T> From<!> for T;
- impl<T> From<T> for T;
- impl<__T0> From<dicom_encoding::adapters::decode_error::MissingAttributeSnafu<__T0>> for DecodeError
where __T0: Into<&'static str>;
= note: required for `Result<(), DecodeError>` to implement `FromResidual<Result<Infallible, _>>`
help: consider specifying the generic arguments
|
75 | .with_whatever_context::<_, String, E2>(|_| format!("JPEG decoding failure on frame {}", i))?;
| +++++++++++++++++
error[E0282]: type annotations needed
--> transfer-syntax-registry/src/adapters/jpeg.rs:165:14
|
165 | .whatever_context("Expected to have raw pixel data available")?;
| ^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `E` declared on the method `whatever_context`
|
help: consider specifying the generic arguments
|
165 | .whatever_context::<&str, E>("Expected to have raw pixel data available")?;
| +++++++++++
- inline comment
CHANGELOG.md
Outdated
- The default `Display` implementation no longer includes the error | ||
text of the source error. This is a **breaking change**. | ||
|
||
- `backtraces` TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're now using backtraces from the standard library by default, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops. Fixed.
Odd; I can't immediately reason out why it should / would have worked before. There's a lot of type inference going on with whatevers... Bisecting leads to d826e6a, which does add more The problem, if I get it correctly, is that I think there's still only one concrete type that satisfies all the requirements, but maybe I'm missing something. Annoyingly, you don't even really want the type conversion provided by Some choices I see...
|
d100276
to
34daf14
Compare
All that it took to hit this edge case was calling |
34daf14
to
1dc3d95
Compare
Alright; reverted and removed from the changelog. Anything else? |
So yes, the type inference errors are gone! For curiosity sake, I noticed that one of my error types |
Looks like it... use snafu::prelude::*;
#[derive(Debug, Snafu)]
struct Error {
backtrace: snafu::Backtrace,
}
fn main() {
dbg!(std::mem::size_of::<Error>());
}
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
No description provided.