-
Notifications
You must be signed in to change notification settings - Fork 123
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
Q: Debug/Diagnostics Mode #762
Comments
To make it easier for people to get access to a debug build we could make a package for it that's only published on an appveyor feed. But apart from that I think we could do a lot to improve the logging and diagnostic outputs of FCS |
@matthid I almost exclusively rely on either
|
@dsyme yes I agree that's the best approach when you can reproduce the problem on your windows developer machine. This discussion is what we do in the other cases (which apparently I hit quite often for some reason) |
For FCS out in the wild we're up a creek without a paddle, failing CI servers, as mono is want to do, build tools failing on devs using unfamiliar setups, and if you wanted to embed F# in an app to use as a scripting language it's not particularly easy to get back useful information if things start failing. |
Just a collection of issues where this issue kept ME (others possibly just resigned already, its just too hard) on my toes and would have helped me to at least produce better bug reports or find workarounds faster:
Note that some of those bug reports took me hours or days to create (often with specially customized FCS builds involved). Just because I know that reporting "I get Two out of those 4 are still open ... |
Maybe it's enough to upload a debug build on some nuget (appveyor?) feed and document Debug.AutoFlush <- true
Debug.Listeners.Add(new TextWriterTraceListener(System.Console.Out)) |> ignore That would already improve the situation dramatically (IMHO). However it would only improve the situation for FCS and not the rest of the ecosystem (like Visual Studio). I'd propose that whenever we upload a version X.Y.Z we upload a debug build X.Y.(Z+1)-alpha001 to AppVeyor (/cc @forki for the versioning suggestion). This way we don't mess with nuget cache and stuff... |
That totally makes sense. Please just add the debug builds to the AppVeyor build process? |
Even just a debug version of FSharp.Compiler.Serrvice and nothing else, along with PDBs. |
Closing as fixed |
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:
failwithf
is really a bad choice in propagating errors)To be more concrete:
Maybe there is already a way I was missing?
/cc @dsyme @cloudRoutine
The text was updated successfully, but these errors were encountered: