Add ocamlmig annotations for easier migration #398
Merged
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.
@raphael-proust suggested adding https://github.com/v-gb/ocamlmig migration annotations to help users migrate to the new combinator names. After experimenting a bit, this PR therefore does just that.
Out of 102 deprecations I've come up with annotations for 91 of them.
The remaining 11 deprecated bindings don't have a direct translation and would benefit from the test author to ponder how to translate beyond pushing a button:
QCheck.Gen.big_natgenerates at most 1_000_000 without a direct translation in distributionQCheck.Gen.neg_inta non-uniform generator without a direct translation in distributionQCheck.Gen.int_pos_cornersdeprecated without a replacementQCheck.Gen.int_cornersdeprecated without a replacementQCheck.neg_inta non-uniform generator without a direct translation in distributionQCheck.small_int_cornerswithout a direct translation asint_small_cornersis signedQCheck2.Gen.big_natgenerates at most 1_000_000 without a direct translation in distributionQCheck2.Gen.neg_inta non-uniform generator without a direct translation in distributionQCheck2.Gen.small_int_cornerswithout a direct translation asint_small_cornersis signedQCheck2.Gen.int_pos_cornersdeprecated without a replacementQCheck2.Gen.int_cornersdeprecated without a replacementTo utilize the annotations I did the following:
and doing so, I could essentially port
multicoretestsautomatically to the new API! 🥳(I recommend reviewing the automatic translation rather than blindly trusting it though)
Based on this I expect the annotations can be helpful for other users too.
I may test the annotations a bit more and then roll a 0.91 release with them.