Skip to content

Commit

Permalink
Main to nightly (#1279)
Browse files Browse the repository at this point in the history
* Shift multiline paren contents less aggressively (#1242)

* Shift multiline paren contents less aggressively

* Make it actually work

* Disambiguate AsSpan overload

* Add some code fixes for type mismatch. (#1250)

* Migrate FAKE to Fun.Build (#1256)

* Migrate FAKE to Fun.Build

* Add default Build pipeline.

* Purge it with fire (#1255)

* Bump analyzers and Fantomas (#1257)

* Add empty, disabled tests for go-to-def on C# symbol scenario

* fix unicode characters in F# compiler diagnostic messages (#1265)

* fix unicode chars in F# compiler diagnostic messages

* fix typo in ShadowedTimeouts focused tests

* fixup! fix unicode chars in F# compiler diagnostic messages

* remove focused tests...

* remove debug prints

Co-authored-by: Jimmy Byrd <[email protected]>

---------

Co-authored-by: Jimmy Byrd <[email protected]>

* - remove an ignored call to protocolRangeToRange (#1266)

- remove an ignored instance of StreamJsonRpcTracingStrategy

* Place XML doc lines before any attribute lists (#1267)

* Don't generate params for explicit getters/setters as they are flagged invalid by the compiler (#1268)

* bump ProjInfo to the next version to get support for loading broken projects and loading traversal projects (#1270)

* only allow one GetProjectOptionsFromScript at a time (#1275)

ionide/ionide-vscode-fsharp#2005

* changelog for v0.72.0

* changelog for v0.72.1

* Use actualRootPath instead of p.RootPath when peeking workspaces. (#1278)

This fix the issue where rootUri was ignored when using AutomaticWorkspaceInit.

* changelog for v0.72.2

---------

Co-authored-by: Brian Rourke Boll <[email protected]>
Co-authored-by: Florian Verdonck <[email protected]>
Co-authored-by: Krzysztof Cieślak <[email protected]>
Co-authored-by: MrLuje <[email protected]>
Co-authored-by: dawe <[email protected]>
Co-authored-by: Chet Husk <[email protected]>
Co-authored-by: oupson <[email protected]>
  • Loading branch information
8 people authored Apr 30, 2024
1 parent 0299d62 commit 20b67ad
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 14 deletions.
28 changes: 27 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
# Changelog

## Unreleased
## [0.72.2] - 2024-04-30

### Fixed

* [Use actualRootPath instead of p.RootPath when peeking workspaces](https://github.com/ionide/FsAutoComplete/pull/1278) (thanks @oupson)

## [0.72.1] - 2024-04-25

### Added

* [Show additional diagnostics specific to script files](https://github.com/ionide/FsAutoComplete/pull/1248) (thanks @TheAngryByrd)
* [Add some code fixes for type mismatch](https://github.com/ionide/FsAutoComplete/pull/1250) (thanks @nojaf)

### Fixed

* [Shift multiline paren contents less aggressively](https://github.com/ionide/FsAutoComplete/pull/1242) (thanks @brianrourkeboll)
* [fix unicode characters in F# compiler diagnostic messages](https://github.com/ionide/FsAutoComplete/pull/1265) (thanks @MrLuje)
* [Place XML doc lines before any attribute lists](https://github.com/ionide/FsAutoComplete/pull/1267) (thanks @dawedawe)
* [Don't generate params for explicit getters/setters](https://github.com/ionide/FsAutoComplete/pull/1268) (thanks @dawedawe)
* [Fix Nuget Script Restores when doing them in parallel](https://github.com/ionide/FsAutoComplete/pull/1275) (thanks @TheAngryByrd)

### Changed

* [Migrate Codefix Scaffolding](https://github.com/ionide/FsAutoComplete/pull/1256) (thanks @nojaf)
* [Bump ProjInfo to 0.64.0](https://github.com/ionide/FsAutoComplete/pull/1270) Check out the [release notes](https://github.com/ionide/proj-info/releases/tag/v0.64.0) for more details (thanks @baronfel)
* Fixes Loading Projects in some cases
* Adds Traversal Project support

## [0.71.0] - 2024-03-07

Expand Down
31 changes: 24 additions & 7 deletions src/FsAutoComplete.Core/CompilerServiceInterface.fs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ open Microsoft.Extensions.Caching.Memory
open System
open FsToolkit.ErrorHandling
open FSharp.Compiler.CodeAnalysis.ProjectSnapshot

open System.Threading

type Version = int

Expand Down Expand Up @@ -97,6 +97,10 @@ type FSharpCompilerServiceChecker(hasAnalyzers, typecheckCacheSize, parallelRefe

let entityCache = EntityCache()

// FCS can't seem to handle parallel project restores for script files
// https://github.com/ionide/ionide-vscode-fsharp/issues/2005
let scriptLocker = new SemaphoreSlim(1, 1)

// This is used to hold previous check results for autocompletion.
// We can't seem to rely on the checker for previous cached versions
let memoryCache () =
Expand Down Expand Up @@ -319,10 +323,16 @@ type FSharpCompilerServiceChecker(hasAnalyzers, typecheckCacheSize, parallelRefe
}

member self.GetProjectSnapshotsFromScript(file: string<LocalPath>, source, tfm: FSIRefs.TFM) =
match tfm with
| FSIRefs.TFM.NetFx -> self.GetNetFxScriptSnapshot(file, source)
| FSIRefs.TFM.NetCore -> self.GetNetCoreScriptSnapshot(file, source)
async {
try
do! scriptLocker.WaitAsync() |> Async.AwaitTask

match tfm with
| FSIRefs.TFM.NetFx -> return! self.GetNetFxScriptSnapshot(file, source)
| FSIRefs.TFM.NetCore -> return! self.GetNetCoreScriptSnapshot(file, source)
finally
scriptLocker.Release() |> ignore<int>
}


member private __.GetNetFxScriptOptions(file: string<LocalPath>, source) =
Expand Down Expand Up @@ -394,9 +404,16 @@ type FSharpCompilerServiceChecker(hasAnalyzers, typecheckCacheSize, parallelRefe
}

member self.GetProjectOptionsFromScript(file: string<LocalPath>, source, tfm) =
match tfm with
| FSIRefs.TFM.NetFx -> self.GetNetFxScriptOptions(file, source)
| FSIRefs.TFM.NetCore -> self.GetNetCoreScriptOptions(file, source)
async {
try
do! scriptLocker.WaitAsync() |> Async.AwaitTask

match tfm with
| FSIRefs.TFM.NetFx -> return! self.GetNetFxScriptOptions(file, source)
| FSIRefs.TFM.NetCore -> return! self.GetNetCoreScriptOptions(file, source)
finally
scriptLocker.Release() |> ignore<int>
}



Expand Down
9 changes: 3 additions & 6 deletions src/FsAutoComplete/LspServers/AdaptiveFSharpLspServer.fs
Original file line number Diff line number Diff line change
Expand Up @@ -319,15 +319,12 @@ type AdaptiveFSharpLspServer
| None -> p.RootPath

let projs =
match p.RootPath, c.AutomaticWorkspaceInit with
match actualRootPath, c.AutomaticWorkspaceInit with
| None, _
| _, false -> state.WorkspacePaths
| Some actualRootPath, true ->
| Some rootPath, true ->
let peeks =
WorkspacePeek.peek
actualRootPath
c.WorkspaceModePeekDeepLevel
(c.ExcludeProjectDirectories |> List.ofArray)
WorkspacePeek.peek rootPath c.WorkspaceModePeekDeepLevel (c.ExcludeProjectDirectories |> List.ofArray)
|> List.map Workspace.mapInteresting
|> List.sortByDescending (fun x ->
match x with
Expand Down

0 comments on commit 20b67ad

Please sign in to comment.