Skip to content
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

Added method and type info in convMethodRef exception #5416

Merged

Conversation

Horusiath
Copy link
Contributor

Recently my team experienced problems caused by convMethodRef: could not bind to method error when executing our scripts in FSI. However the issue with this error is that it isn't distinctively showing, what has gone wrong (I think usually it's the issue with referenced .dll files).

For us, the only way to actually see what was happening, was to enrich that error message using custom FSI build. Since I think, it'd be helpful for the rest of the community in the future - here's the PR. It includes method name and containing type info along with the actual error message. Example:

error FS0192: internal error: convMethodRef: could not bind to method 'QuerySelectorAll' of type 'System.HapCssExtensionMethods, HtmlAgilityPack, Version=1.0.0.0, Culture=neutral, PublicKeyToken=<token>'

/cc: fsharp/fsharp#857

@forki
Copy link
Contributor

forki commented Jul 28, 2018

While I think it's great to enrich the error message I think this showing a bigger issue. Internal errors should not surface on user code. So this is either a compiler bug or we need to promote the error to a proper compiler error.

@KevinRansom
Copy link
Member

Thank you for improving the message. It would be great to get a repro that highlighted the message shortcomings.

@KevinRansom KevinRansom closed this Sep 6, 2018
@KevinRansom KevinRansom reopened this Sep 6, 2018
@KevinRansom KevinRansom merged commit 85a4755 into dotnet:master Sep 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants