-
Notifications
You must be signed in to change notification settings - Fork 830
Fixing #4967 #4968
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
Fixing #4967 #4968
Conversation
… overloaded method implementation - fixes dotnet#4967
|
So this didn't break anything, so I guess I only have to add the test |
|
Ready. |
|
Well ... it turns out that this is a breaking change, go figure ... no good deed goes unpunished. If we compile and run your repro, it runs fine, Of course that is because the type is not used at all, however, There is a non-zero chance that a developer has code with this error, but because the code isn't actually used their project compiles and works fine. We have plenty of customers who are reluctant to upgrade their compiler if they think they will have to crack open and fix perfectly good changes like this. So I would like us to consider:
|
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.
Please note: I said "Consider", which should see if we believe the change is only "breaking sorta"
|
@KevinRansom I don't understand. Which case does it break? We had compile error before for the given repro and compile error now. Nothing changed in that regards |
|
As can be seen below: A program that exhibits the error can compile and run. Now we could make the argument, that: the current behaviour is clearly wrong ... and the app only works, because the broken bit isn't touched. I think the winning argument for taking the change is that the built binary is not verifiable: Our goal is to document the reasons for taking the change, so that when someone complains that their code was broken we can say why making them fix their broken code is the correct outcome. I imagine this change would even meet the C# breaking change bar, and their bar is way higher than ours. |
|
@KevinRansom my point is: it did not compile for me and not for @smoothdeveloper in #4967, right? we got internal error. |
|
Mmh, actually my code hasn't left FSI, while in the issue I said compile, it was evaluate instead. I'll try to make it more precise in future. @KevinRansom what happens when referencing that assembly from C# and issuing typeof(Foo): Better the compiler reports an error because the interface is not implemented and I risk runtime error (like above), but I understand the breaking change argument. That being said the chance for someone to get upset because compiler reports malformed code where previous version didn't feel slim, more chance to be grateful or being in wrong profession. In FSI, I'd the error to not be "internal" and report the actual issue, at least in the way I get runtime exception above. |
|
I am pretty sure that the CLR will fail to load the type due to the missing method. So any method that needs jitting that references the type will likely fail. I am fairly confident that the break only occurs when the type is unused. I.e dead code, or a rarely used codepath. Ngen on the exe will fail too: It is most definitely a bug, and the fix looks good, and works. We just need to understand how likely a developer's project is to be affected by this change. I think the likelyhood of encountering this warning in an existing project, is probably non zero, but likely very low, for that reason, I am okay with taking this change as is, correctness in this case is preferable to compatability. |
|
@forki, thanks for this mate. |
* Fixing #4967 (#4968) * Fix internal error when compiling interface implementation lacking an overloaded method implementation - fixes #4967 * Adding a test * Update E_OverloadMismatch.fs * Remove a setify + isSingleton combo (#4980) * remove a setify * Remove intermediate collection * Improve async stack traces (#4867) * very early prototype * async stack traces * async cleanup * minor fix * async cleanup * more async cleanup * integrate async-cleanup * async cleanup * fix build * more cleanup * minor fixes * minor fixes * full exception stacktraces * fix test * fix test * code review * cleanup naming * fix build * undo rethrow and integrate cleanup * apply renamings * Further cleanup in control.fs * add tests and add filtering TryWith, plus other cleanup * integrate cleanup * fix tests * test only runs on .net framework * slightly tweak primitives to be more suitable for later optimization * slightly tweak primitives to be more suitable for later optimization * update baselines * add check that no line 0 appear in stack * update baseline * use struct wrapper for async activation * simplify code * simplify code * update baselines * update baselines * fix baseline * remove dead code * simplify code * apply DebuggerHidden in a couple more places * [ RFC FS-1039] implementation of value options (#4837) * posible implementation of value options * fix surface area test * fix test * VNone --> ValueNone * fix surface area * fix build * update baselines * fix baselines * fix baselines * fix baselines * fix baselines * fix build
| @@ -0,0 +1,14 @@ | |||
| //<Expects id="FS0366" status="error">No implementation was given for</Expects> | |||
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.
this should be at the end of the file.
internal error when compiling interface implementation lacking an overloaded method implementation - fixes #4967