Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat!: Update
strum
andordered-float
dependencies and change From<LogProb> into TryFrom<LogProb> for NotNan<f64>. #491feat!: Update
strum
andordered-float
dependencies and change From<LogProb> into TryFrom<LogProb> for NotNan<f64>. #491Changes from 6 commits
2f1b29e
dd2db90
a42e59d
c30ce2f
080b9f7
096e156
aaffd64
0ad0658
c52604d
aa90c4e
99f2ba8
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Once we're updating this... would it be possible to make this
There were breaking changes in 3.0.0, but if they don't break this crate then it would be preferable to allow users to decide which version they want.
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.
Sounds reasonable to me. @adam-azarchs are you sure that the breaking changes don't affect us here?
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.
Not 100%. They don't look like behavior changes, just some dropped implementations, so it should be easy enough to just try it and see if it compiles. I know for our internal purposes we're not going to be updating to 3.0 particularly soon but future proofing is good.
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 think a PR changing the signature of a public method like this (which, granted, in most cases won't actually affect most users because the type will just be inferred, but will affect anyone who needs to specify any of the generic parameters) should probably not be labeled "chore", since "chore" PRs don't show up in the changelog.
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.
Would you classify it at a
build:
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 think it should be feat: actually, since the API is extended with a new feature here (allowing to have a fallible conversion from f64)
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.
Sorry I was unclear but I would actually probably recommend leaving the (potentially-panicing)
From
implementation for now in order to avoid breaking compatibility, but mark it as deprecated.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.
unfortunately you don't seem to be able to implement a deprecated
From
and a non-deprecatedTryFrom
, as the blanket implementation (https://github.com/rust-lang/rust/blob/3e525e3f6d9e85d54fa4c49b52df85aa0c990100/src/libcore/convert.rs#L580) leads to the compiler thinking you've implementedTryFrom
already and so it won't compile.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 prefer the tryfrom here, let's make this a breaking change (feat!:), then.