Skip to content

Commit bbcac70

Browse files
cartermpbaronfel
authored andcommitted
No IVTs for CodeLenses (#6906)
* Don't expose Legacy MSBuildReferenceResolver * Move the files boss hoss * Remove unused opens * Fix tests * Remove IVT dependency for CodeLens and put logging behind a flag * oopsie doopsie * meep morp * blub glub * heepers jeepers * Update fsi.fs * Update service.fs * Update service.fsi * Update FSharpCheckerProvider.fs * Update FSharpLanguageServiceTestable.fs * Update TestLib.LanguageService.fs * Updates for build in release * I'm not touching MSBuildReferenceResolver I'm not touching MSBuildReferenceResolver I'm not touching MSBuildReferenceResolver * Different ignore and adjust ifdefs
1 parent b3e6ee1 commit bbcac70

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/fsharp/service/service.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2103,12 +2103,12 @@ type FSharpCheckFileResults(filename: string, errors: FSharpErrorInfo[], scopeOp
21032103
RequireCompilationThread ctok
21042104
scope.IsRelativeNameResolvableFromSymbol(pos, plid, symbol))
21052105

2106-
member info.GetDisplayEnvForPos(pos: pos) : Async<DisplayEnv option> =
2106+
member info.GetDisplayContextForPos(pos: pos) : Async<FSharpDisplayContext option> =
21072107
let userOpName = "CodeLens"
21082108
reactorOp userOpName "GetDisplayContextAtPos" None (fun ctok scope ->
21092109
DoesNotRequireCompilerThreadTokenAndCouldPossiblyBeMadeConcurrent ctok
21102110
let (nenv, _), _ = scope.GetBestDisplayEnvForPos pos
2111-
Some nenv.DisplayEnv)
2111+
Some(FSharpDisplayContext(fun _ -> nenv.DisplayEnv)))
21122112

21132113
member info.ImplementationFile =
21142114
if not keepAssemblyContents then invalidOp "The 'keepAssemblyContents' flag must be set to true on the FSharpChecker in order to access the checked contents of assemblies"

src/fsharp/service/service.fsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,8 @@ type public FSharpCheckFileResults =
244244

245245
member internal GetVisibleNamespacesAndModulesAtPoint : pos -> Async<Tast.ModuleOrNamespaceRef[]>
246246

247-
/// Find the most precise display environment for the given line and column.
248-
member internal GetDisplayEnvForPos : pos : pos -> Async<DisplayEnv option>
247+
/// Find the most precise display context for the given line and column.
248+
member GetDisplayContextForPos : pos : pos -> Async<FSharpDisplayContext option>
249249

250250
/// Determines if a long ident is resolvable at a specific point.
251251
/// <param name="userOpName">An optional string used for tracing compiler operations associated with this request.</param>

0 commit comments

Comments
 (0)