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

"Internal error or badly formatted metadata" #5608

Closed
matthid opened this issue Sep 7, 2018 · 2 comments
Closed

"Internal error or badly formatted metadata" #5608

matthid opened this issue Sep 7, 2018 · 2 comments
Labels
Bug Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone

Comments

@matthid
Copy link
Contributor

matthid commented Sep 7, 2018

Continuation of ionide/ionide-vscode-fsharp#912

Ionide:
image

VS 2017:
image

open Microsoft.Extensions.Logging
open System

let provider =
    { new ILoggerProvider with
        member x.Dispose() = ()
        member x.CreateLogger name =
            { new ILogger with
                member x.Log<'TState>(logLevel: LogLevel, eventId : EventId, state: 'TState, exception: exn, formatter: Func<'TState, exn, string>) =
                    ()
                member x.IsEnabled (logLevel:LogLevel ) = true
                member x.BeginScope<'TState> (State: 'TState) =
                    { new IDisposable with
                        member x.Dispose() = () } } }

Repro steps

Paste the above code into your project and install the Microsoft.Extensions.Logging NuGet package

Expected behavior

Only "exception" should be underlined and the error message should be:

image

Actual behavior

"Internal error" is shown to the user

Known workarounds

None. Notice that you used an keyword.

Related information

Provide any related information

  • Operating system: Windows 10
  • .NET Runtime, CoreCLR or Mono Version: Would assume all?
  • Editing Tools (e.g. Visual Studio Version): Ionide + VS 15.7.5
  • Indications of severity: Annoyance & Adoption (Problem for beginners)
@cartermp
Copy link
Contributor

cartermp commented Sep 7, 2018

Thanks, agreed on what the error should be.

Hey @TIHan
image

@cartermp cartermp added this to the 16.0 milestone Sep 7, 2018
@TIHan TIHan self-assigned this Sep 8, 2018
@dsyme dsyme added the Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code. label Sep 13, 2018
@cartermp cartermp modified the milestones: 16.0, 16.1 Feb 21, 2019
@cartermp cartermp modified the milestones: 16.1, 16.2 Apr 23, 2019
@cartermp cartermp modified the milestones: 16.2, Backlog Apr 30, 2019
@dsyme
Copy link
Contributor

dsyme commented Mar 31, 2022

This is niche enough that I'm going to close this - exception is rarely used and the awkward diagnostic hasn't been seen in other cases.

@dsyme dsyme closed this as completed Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code.
Projects
None yet
Development

No branches or pull requests

4 participants