Skip to content

Commit

Permalink
Merge branch 'main' into nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
baronfel committed Oct 29, 2023
2 parents cb61a45 + 84a3e47 commit d570459
Show file tree
Hide file tree
Showing 54 changed files with 844 additions and 648 deletions.
16 changes: 2 additions & 14 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,20 @@
"version": 1,
"isRoot": true,
"tools": {
"fake-cli": {
"version": "5.23.0",
"commands": [
"fake"
]
},
"paket": {
"version": "7.2.1",
"version": "8.0.0-alpha002",
"commands": [
"paket"
]
},
"octonav": {
"version": "0.0.1",
"commands": [
"octonav"
]
},
"dotnet-reportgenerator-globaltool": {
"version": "5.0.2",
"commands": [
"reportgenerator"
]
},
"fantomas": {
"version": "6.2.0",
"version": "6.2.2",
"commands": [
"fantomas"
]
Expand Down
28 changes: 22 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ jobs:
env:
TEST_TIMEOUT_MINUTES: 40
FSAC_TEST_DEFAULT_TIMEOUT : 120000 #ms, individual test timeouts
DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1 # needed to allow .NET 8 RCs to participate in rollforward as expected.
timeout-minutes: 40 # we have a locking issue, so cap the runs at ~20m to account for varying build times, etc
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
dotnet-version: ["", "6.0.x", "7.0.x"]
dotnet-version: ["", "6.0.x", "7.0.x", "8.0.x"]
# these entries will mesh with the above combinations
include:
# just use what's in the repo
Expand All @@ -32,20 +33,27 @@ jobs:
label: "repo global.json"
build_net7: false
test_tfm: net6.0
# latest 6.0 stable
# latest 6.0
- global-json-file: "global.json"
dotnet-version: "6.0.x"
include-prerelease: false
label: "6.0 stable"
label: "6.0"
build_net7: false
test_tfm: net6.0
# latest 7.0 preview
# latest 7.0
- global-json-file: "global.json"
dotnet-version: "7.0.x"
include-prerelease: true
label: "7.0 preview"
label: "7.0"
build_net7: true
test_tfm: net7.0
# latest 8.0
- global-json-file: "global.json"
dotnet-version: "8.0.x"
include-prerelease: true
label: "8.0"
build_net8: true
test_tfm: net8.0
fail-fast: false # we have timing issues on some OS, so we want them all to run

runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -76,18 +84,26 @@ jobs:
run: dotnet --info

- name: Restore tools
run: dotnet tool restore
run: |
# can't do a tool restore here due to an 8.0.100 rc2 bug - this is fixed in GA so can go back to
# dotnet tool restore then.
dotnet tool install paket --version 8.0.0-alpha002 && dotnet tool install fantomas --version 6.2.2 && dotnet paket restore
- name: Check format
run: dotnet build -t:CheckFormat
env:
DOTNET_ROLL_FORWARD: LatestMajor
DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1

- name: Run Build
run: dotnet run --project build -t Build
env:
BuildNet7: ${{ matrix.build_net7 }}
BuildNet8: ${{ matrix.build_net8 }}

- name: Run and report tests
run: dotnet test -c Release -f ${{ matrix.test_tfm }} --no-restore --no-build --no-build --logger GitHubActions /p:AltCover=true /p:AltCoverAssemblyExcludeFilter="System.Reactive|FSharp.Compiler.Service|Ionide.ProjInfo|FSharp.Analyzers|Analyzer|Humanizer|FSharp.Core|FSharp.DependencyManager" -- Expecto.fail-on-focused-tests=true --blame-hang --blame-hang-timeout 1m
working-directory: test/FsAutoComplete.Tests.Lsp
env:
BuildNet7: ${{ matrix.build_net7 }}
BuildNet8: ${{ matrix.build_net8 }}
153 changes: 149 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,161 @@
//otherwise take a lot of time to load proj inside
//the test directories
"omnisharp.autoStart": false,
"FSharp.minimizeBackgroundParsing": true,
"FSharp.trace.server": "off",
"yaml.schemas": {
"https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json": ".github/workflows/*"
},
"editor.inlayHints.enabled": "offUnlessPressed",
"FSharp.enableAdaptiveLspServer": true,
"files.associations": {
"*.*proj": "msbuild",
"*.props": "msbuild",
"*.targets": "msbuild"
}
}
},
"cSpell.words": [
"abrv",
"Additionals",
"ancestorly",
"apos",
"Argu",
"aset",
"asyncaval",
"attachdebugger",
"autocompletions",
"aval",
"avals",
"baaaaaaaaaz",
"baaaaz",
"Backticked",
"BCL's",
"bimap",
"binlog",
"bitflags",
"bprintf",
"ccont",
"cdma",
"cexpr",
"Childs",
"classlib",
"Cloneable",
"cmap",
"codefix",
"colu",
"compilerlocation",
"compilertool",
"crefs",
"cset",
"cval",
"Debouncer",
"decompile",
"Decompiler",
"decompiling",
"Dont",
"dotm",
"dotnetaddproject",
"dotnetaddsln",
"dotnetnew",
"dotnetnewget",
"dotnetnewlist",
"dotnetnewrun",
"dotnetremoveproject",
"econt",
"ehrpd",
"enduser",
"eprintfn",
"evdo",
"Expecto",
"expl",
"failtest",
"Fantomas",
"fantomasignore",
"foldi",
"FSAC",
"fsautocomplete",
"Fsdn",
"Fsprojs",
"fsym",
"ftest",
"Funcs",
"GITSHA",
"gprs",
"Handleable",
"hsdpa",
"hspap",
"hsupa",
"iden",
"iface",
"ifaces",
"IFSAC",
"infinityf",
"Informations",
"inproc",
"insts",
"interoperating",
"ints",
"Ionide",
"iwlan",
"kprintf",
"langversion",
"linebreak",
"linebreaks",
"listheader",
"logfile",
"lpat",
"Msbuild",
"nanf",
"Neatherway",
"NETCORE",
"Newtonsoft",
"nlpos",
"nmax",
"normalised",
"nrnsa",
"nunit",
"objs",
"opentelemetry",
"otel",
"Otlp",
"Overriden",
"paket",
"parently",
"parms",
"Petricek",
"projs",
"promptable",
"ptest",
"quals",
"quickfix",
"Recalc",
"retn",
"Retrigger",
"revd",
"RPAREN",
"rpat",
"scdma",
"seealso",
"Sequentials",
"Serilog",
"Simplifiable",
"sketchfs",
"skiptest",
"Sourcelink",
"sourcelinked",
"SRTP",
"streamjsonrpc",
"subidx",
"Supertypes",
"Syms",
"Tablered",
"targetprofile",
"tbody",
"thead",
"threadpool",
"tracecontext",
"typeparamref",
"typesig",
"umts",
"whitespaces",
"xrtt",
"xunit"
]
}
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## [0.67.0] - 2023-10-28

### Changed

* [Better Completion for ExternalAutocomplete functions](https://github.com/fsharp/FsAutoComplete/pull/1178) (Thanks @Tangent-90!)
* LSP Refactoring [1179](https://github.com/fsharp/FsAutoComplete/pull/1179) [1188](https://github.com/fsharp/FsAutoComplete/pull/1188) (Thanks @TheAngryByrd)
* [Fix Spelling](https://github.com/fsharp/FsAutoComplete/pull/1182) (Thanks @TheAngryByrd)

### Fixed
* [Json serializer error can cause server crash ](https://github.com/fsharp/FsAutoComplete/pull/1189) (Thanks @TheAngryByrd)
* [Fixes a race condition with ProgressListener.End](https://github.com/fsharp/FsAutoComplete/pull/1183) (Thanks @TheAngryByrd)

## [0.66.1] - 2023-10-15

### Changed
Expand Down
14 changes: 7 additions & 7 deletions build/ScaffoldCodeFix.fs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ open Fantomas.Core.SyntaxOak

let repositoryRoot = __SOURCE_DIRECTORY__ </> ".."

let AdaptiveFSharpLspServerPath =
let AdaptiveServerStatePath =
repositoryRoot
</> "src"
</> "FsAutoComplete"
</> "LspServers"
</> "AdaptiveFSharpLspServer.fs"
</> "AdaptiveServerState.fs"


let TestsPath =
Expand Down Expand Up @@ -248,15 +248,15 @@ let findTypeWithNameOfFail (typeName: string) (mn: ModuleOrNamespaceNode) : ITyp
| _ -> None)

let findArrayInAdaptiveFSharpLspServer () : ExprArrayOrListNode =
let oak = getOakFor AdaptiveFSharpLspServerPath
let oak = getOakFor AdaptiveServerStatePath

// namespace FsAutoComplete.Lsp
let ns =
oak.ModulesOrNamespaces
|> List.exactlyOneOrFail "Expected a single namespace in Oak."

// type AdaptiveFSharpLspServer
let t = findTypeWithNameOfFail "AdaptiveFSharpLspServer" ns
// type AdaptiveState
let t = findTypeWithNameOfFail "AdaptiveState" ns

// let codefixes =
let codefixesValue =
Expand Down Expand Up @@ -299,12 +299,12 @@ let wireCodeFixInAdaptiveFSharpLspServer codeFixName =
try
let array = findArrayInAdaptiveFSharpLspServer ()

appendItemToArrayOrList $"%s{codeFixName}.fix tryGetParseResultsForFile" AdaptiveFSharpLspServerPath array
appendItemToArrayOrList $"%s{codeFixName}.fix tryGetParseResultsForFile" AdaptiveServerStatePath array
with ex ->
Trace.traceException ex

Trace.traceError
$"Unable to find array of codefixes in %s{AdaptiveFSharpLspServerPath}.\nDid the code structure change?"
$"Unable to find array of codefixes in %s{AdaptiveServerStatePath}.\nDid the code structure change?"


let mkCodeFixTests codeFixName =
Expand Down
2 changes: 1 addition & 1 deletion docs/Creating a new code fix.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The above command accomplishes the following tasks:

Furthermore, this command updates the following files to properly register the new code fix:

- `src/FsAutoComplete/LspServers/AdaptiveFSharpLspServer.fs`
- `src/FsAutoComplete/LspServers/AdaptiveState.fs`
- `test/FsAutoComplete.Tests.Lsp/CodeFixTests/Tests.fs`

The unit test file contains a [single focused test](https://github.com/haf/expecto#focusing-tests), allowing you to promptly verify the functionality. To run this initial test, you have two options:
Expand Down
13 changes: 10 additions & 3 deletions paket.dependencies
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version 7.2.1

framework: netstandard2.0, netstandard2.1, net6.0, net7.0
framework: netstandard2.0, netstandard2.1, net6.0, net7.0, net8.0

source https://api.nuget.org/v3/index.json
# this is the FCS nightly feed, re-enable at your own risk!
Expand Down Expand Up @@ -37,7 +37,7 @@ nuget Serilog.Sinks.Async >= 1.5
nuget Destructurama.FSharp
nuget FSharp.UMX >= 1.1
nuget FSharp.Formatting >= 14.0
nuget FsToolkit.ErrorHandling.TaskResult >= 4.4 framework: netstandard2.1 ,net6.0, net7.0
nuget FsToolkit.ErrorHandling.TaskResult >= 4.4 framework: netstandard2.1 ,net6.0, net7.0, net8.0
nuget IcedTasks >= 0.5
nuget FSharpx.Async >= 1.14
nuget CliWrap >= 3.0
Expand All @@ -53,12 +53,14 @@ nuget Expecto.Diff
nuget YoloDev.Expecto.TestSdk
nuget AltCover
nuget GitHubActionsTestLogger
nuget Ionide.LanguageServerProtocol >= 0.4.16
nuget Ionide.LanguageServerProtocol >= 0.4.19
nuget Microsoft.Extensions.Caching.Memory
nuget OpenTelemetry.Api >= 1.3.2
nuget OpenTelemetry.Exporter.OpenTelemetryProtocol >= 1.3.2 # 1.4 bumps to 7.0 versions of System.Diagnostics libs, so can't use it
nuget LinkDotNet.StringBuilder 1.18.0
nuget CommunityToolkit.HighPerformance
nuget System.Security.Cryptography.Pkcs 6.0.4


group Build
source https://api.nuget.org/v3/index.json
Expand All @@ -83,3 +85,8 @@ group Build
nuget MSBuild.StructuredLogger
nuget Octokit 0.48 // there's an API break in 0.50, so we need to pin this to prevent errors
nuget Fantomas.Core 6.2.0

nuget NuGet.Versioning 6.7.0
nuget NuGet.Common 6.7.0
nuget NuGet.Protocol 6.7.0

Loading

0 comments on commit d570459

Please sign in to comment.