Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Q: Debug/Diagnostics Mode #762

Closed
Closed
@matthid

Description

@matthid

Is there currently only diagnostics / debug mode for the FCS component?

Time and time again I run into problems when using FCS and then I feel like I could use some logging or just more info what the compiler is doing instead of error FS0193: internal error: or whatever.

This doesn't need to be the default, it could be controlled by an undocumented environment variable for example.

This might be even a problem in the compiler code-base itself. But I mostly have this problems when using FCS therefore I opened the issue here.

In the past I have used custom builds like https://github.com/matthid/FSharp.Compiler.Service/commits/improve_error or https://github.com/matthid/FSharp.Compiler.Service/commits/improve_fcs_logging to help myself in such situations but this really is a frustrating experience for several reasons (one is that building this component time and time again frustrating in itself).

So my question basically is. Would a PR fixing the following issues be accepted:

  • Remove Exception Hiding -> Use Inner Exceptions to properly propagate underlying exception objects. (failwithf is really a bad choice in propagating errors)
  • Use existing logging infrastructure and allow users to plugin their own logging (or just enable it to print to stdout)

To be more concrete:

  • Which logging framework would be acceptable to use (you can see that I used .NetFrameworks TraceSource for this in my branch)?
  • Should this go against visualfsharp?
  • Any things I need to consider to get this accepted?
  • What would be the preferred way to enable such a debug/diagnostic mode?

Maybe there is already a way I was missing?

/cc @dsyme @cloudRoutine

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions