-
Notifications
You must be signed in to change notification settings - Fork 844
Emit (+flatten) import scope tables #12817
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
Conversation
|
Will add some pdb dumper + baseline tests. |
|
Huh, some curious fsi tests failures... [xUnit.net 00:00:20.17] FSharp.Compiler.UnitTests.FsiTests.Seven bound values are ordered and have their correct name [FAIL]
Failed FSharp.Compiler.UnitTests.FsiTests.Able to find a bound value by the identifier and has valid info [237 ms]
Error Message:
FSharp.Compiler.Interactive.Shell+FsiCompilationException : Operation failed. The error text has been printed in the error stream. To return the corresponding FSharpDiagnostic use the EvalInteractionNonThrowing, EvalScriptNonThrowing or EvalExpressionNonThrowing
Stack Trace:
at FSharp.Compiler.Interactive.Shell.FsiEvaluationSession.commitResult[a,b](FSharpChoice`2 res) in /home/vsts/work/1/s/src/fsharp/fsi/fsi.fs:line 3322
at FSharp.Compiler.Interactive.Shell.FsiEvaluationSession.EvalInteraction(String code, FSharpOption`1 cancellationToken) in /home/vsts/work/1/s/src/fsharp/fsi/fsi.fs:line 3472
at FSharp.Compiler.UnitTests.FsiTests.Able to find a bound value by the identifier and has valid info() in /home/vsts/work/1/s/tests/FSharp.Compiler.UnitTests/FsiTests.fs:line 131
Failed FSharp.Compiler.UnitTests.FsiTests.Seven bound values are ordered and have their correct name [237 ms]
Error Message:
FSharp.Compiler.Interactive.Shell+FsiCompilationException : Operation failed. The error text has been printed in the error stream. To return the corresponding FSharpDiagnostic use the EvalInteractionNonThrowing, EvalScriptNonThrowing or EvalExpressionNonThrowing
Stack Trace:
at FSharp.Compiler.Interactive.Shell.FsiEvaluationSession.commitResult[a,b](FSharpChoice`2 res) in /home/vsts/work/1/s/src/fsharp/fsi/fsi.fs:line 3322
at FSharp.Compiler.Interactive.Shell.FsiEvaluationSession.EvalInteraction(String code, FSharpOption`1 cancellationToken) in /home/vsts/work/1/s/src/fsharp/fsi/fsi.fs:line 3472
at FSharp.Compiler.UnitTests.FsiTests.Seven bound values are ordered and have their correct name() in /home/vsts/work/1/s/tests/FSharp.Compiler.UnitTests/FsiTests.fs:line 67
|
dsyme
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great
KevinRansom
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments, otherwise looks good.
|
So good to have this fixed at last! |
Summary
This fixes import scope tables in the portabl PDB files for F#.
Currently, for the following code:
F# compiler will not emit additional import scope tables (i.e. only "empty" default one) :
The current behaviour in the expression evaluator (before the change):

For comparison, the following C# code:
will emit the following portable PDB:
Behaviour when debugging C# project:

This PR adds emitting of import scope tables: we will always flatten imports and emit only one table (same as C# compiler does).
Emitted PDB after change:
Behaviour after the change: