haf / expecto

A smooth testing lib for F#. APIs made for humans! Strong testing methodologies for everyone!
Apache License 2.0
663 stars 96 forks source link

Breaking change in 9.0.1 #388

Closed Alxandr closed 4 years ago

Alxandr commented 4 years ago

The latest release breaks YoloDev.Expecto.TestSdk (https://github.com/YoloDev/YoloDev.Expecto.TestSdk/issues/36) with the following error:

Method not found: 'Microsoft.FSharp.Core.FSharpFunc`2<System.Reflection.Assembly,Microsoft.FSharp.Core.FSharpOption`1<Expecto.Test>> Expecto.Impl.get_testFromAssembly()'.

I'm guessing it's caused by this change: https://github.com/haf/expecto/commit/2e74361f93821d70aa0f9b1a9acef51e809a1cc2#diff-a468f12438e09db0adcb1d57db8dfa64R1037

This is quite unfortunate, cause it's a patch release. Could this either be reverted or changed to a major release?

haf commented 4 years ago

🧐 Interesting;

That method gets called the same way as it’s just an eta expansion.

Can we revert this particular line?

haf commented 4 years ago

@Alxandr Can you try now with 9.0.2?

Alxandr commented 4 years ago

Hmm. I posted a response here on the mobile app an hour ago, yet I can't see it on the computer, so apologies if there turns up a double reply, but I was told that 9.0.2 works :). My guess is that the change turned it from a property with type x -> y to a method with the same type, and that broke binary compatibility (but not source compatibility). This definitely seems like a footgun with F#.