-
Notifications
You must be signed in to change notification settings - Fork 805
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
Correct IDE diagnostics and lifetimes for editing with #r package references #10160
Conversation
Surface area needs update |
This looks good subject to CI passing. |
Note to self - tests needs adjusting
|
OK, the tests are adjusted for the diagnostics updates. |
tests/FSharp.Compiler.Private.Scripting.UnitTests/DependencyManagerInteractiveTests.fs
Show resolved
Hide resolved
OK, green and ready |
@@ -757,6 +761,9 @@ type internal FsiCommandLineOptions(fsi: FsiEvaluationSessionHostConfig, argv: s | |||
stopProcessingRecovery e range0; failwithf "Error creating evaluation session: %A" e | |||
inputFilesAcc | |||
|
|||
// We need a dependency provider with native resolution. Managed resolution is handled by generated `#r` |
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.
I think this is slightly optimistic. But I don't know a scenario where this is a wrong statement. I'm guessing we'll find them.
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 looks and feels good enough in VS as well.
…erences (dotnet#10160) Co-authored-by: Don Syme <donsyme@fastmail.com>
…erences (dotnet#10160) Co-authored-by: Don Syme <donsyme@fastmail.com>
…erences (dotnet#10160) Co-authored-by: Don Syme <donsyme@fastmail.com>
This extends #10159 with some basic improvements to correct how and when we create DependencyProvider
Only create DependencyProvider once per project, and one overall for scripts
Don't register endless chains of dynamic resolution handlers for the compiler and IDE cases
Gives diagnostics and failures in the IDE
Gives diagnostics and failures in F# compilation of scripts
Gives diagnostics and failures in F# Interactive execuation of scripts
Give tooltips (this was a feature lost on VS2017 or VS2019 for #r references in scripts, and easy to resurrect and augment to give information for package references). Note how the text shows the exact package versions and DLLs caused by the reference
Note that script editing is still always .NET Framework in this release, sadly - there are obviously many scripts where this doesn't matter but it's something to be aware of - we will be able to correct this somehow in the next release, it's too important not to.