Emit (+flatten) import scope tables#12817
Merged
vzarytovskii merged 9 commits intodotnet:mainfrom Mar 28, 2022
Merged
Conversation
Member
Author
|
Will add some pdb dumper + baseline tests. |
Member
Author
|
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
|
KevinRansom
reviewed
Mar 21, 2022
Contributor
KevinRansom
left a comment
There was a problem hiding this comment.
Minor comments, otherwise looks good.
dsyme
approved these changes
Mar 28, 2022
Contributor
|
So good to have this fixed at last! |
charlesroddie
pushed a commit
to charlesroddie/fsharp
that referenced
this pull request
May 2, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: