-
Notifications
You must be signed in to change notification settings - Fork 789
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
[WIP] fix for #4956 (TP error reporting) #4978
[WIP] fix for #4956 (TP error reporting) #4978
Conversation
… provider fail at design / compile time.
I'm checking the test output, the issue is that now the output contains the file path where the code was compiled from in the stacktrace, it looks like the tests are comparing the output for exact match. For example:
notice How should I go about adjusting the tests with baseline? |
@smoothdeveloper I suppose you'll need to modify the code that compares the output of the test andd the baseline |
Somewhere around here I suppose: https://github.com/Microsoft/visualfsharp/blob/master/tests/fsharp/test-framework.fs#L448 So you should first update the baselines:
There is already code these to diff out the current directory so perhaps you might not need to change anything The actual call to the diffing routing is made here: https://github.com/Microsoft/visualfsharp/blob/master/tests/fsharp/single-test.fs#L215 Note you can run the tests from F# interactive
|
* add readme.md file to start accreting some useful information for the maintenance of the tests, gathered some of the tips that @dsyme mentioned
…ct a full stack trace * added a substitution for <REPOSITORYROOT> for the filename in the stacktrace, baseline test relying on those have their .bsl files renamed to .bslpp * add a readme.md in test folder
This is now passing, one drawback I see is for maintaining the tests in the future:
I've gathered some information into a readme.md file that we should improve with more description and tips. This comment gives an example of actual stacktrace: #4956 (comment) it will help type provider developers to set break points in the type provider SDK and figure out what is the problem they are facing. |
This shouldn't be merged for now: #4956 (comment) |
@KevinRansom @cartermp I'd like some advice on this one In general we don't want to show stack traces in error messages. But we do need to improve the diagnostics form TP developers and TP early adopters so they can see stack traces if they want. So we should really have some kind of mechanism to "turn on stack traces for TP diagnostics". But what should it be? A VS IDE switch and command line flag seems too heavy but maybe it's what we need. thanks |
Can I get back to you on this ... |
Yes, absolutely no rush |
Something along these lines would be amazing. For TPs I work on I usually end up having a debug function that spams logs and catches/dumps stacktraces before rethrowing while I'm doing active development. Anything we can do to surface TP errors to TP developers would help demystify the whole process. |
this is impacting fsprojects/FSharp.Data.SqlClient#262 I tend to agree that surfacing the whole stack trace is too crude and will freak out end users while this is, in essence, a library bug. Anybody has idea how we could still get the full trace in DEBUG builds of provider? maybe a specifc define symbol that the compiler uses for TP design time assemblies, and make fsc/fsi pick the verbose message (corresponding to my PR)? This will definitely help TP authoring, but we want to avoid kilometer long error by any means in release builds for TP consumers. |
Can we ease such decision by enabling the compiler to show stacktraces behind a flag like this won't change anything for existing use of the compiler but provide easy escape hatch when this would really help diagnosis in various circumstances (mainly TP, compiler and tooling internal errors). |
@dsyme , @smoothdeveloper , hey guys, is this PR going anywhere, I am trying to reduce the orphaned PR's in our repo. Kevin |
@KevinRansom I'm still in favor of having full stack trace to appear. This is @dsyme comment:
|
@dsyme , @smoothdeveloper , hey guys, is this PR going anywhere, I am trying to reduce the orphaned PR's in our repo. Kevin |
I discussed this with @cartermp and we decided to close it, we should address stack merging of inner exceptions somehow, but probably not this way. |
issue #4956: Make Type Provider troubleshooting easier with better error reporting
Let the full exception details surface when a type provider fail at design / compile time.
Looking at the CI to get an idea of tests that need adjusting.