Skip to content
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

Fix renames and reference counts by using the compiler-generated memory-mapped indexes #945

Merged
merged 30 commits into from
Jun 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
1a0c5ea
remove backgroundservice concept
baronfel May 8, 2022
87f664b
remove backgroundservice project and files
baronfel May 8, 2022
b15e171
remove symbolcache structure
baronfel May 8, 2022
3705b04
massive perf increase to rename and find references
baronfel May 8, 2022
0dfefe9
rend and tear
baronfel May 9, 2022
4a0d306
fix reference count
baronfel May 9, 2022
672e902
minimize diff
baronfel May 14, 2022
2616cd5
get reference counts working by not including declaration locations i…
baronfel May 14, 2022
3b679a5
Green up rename tests that we already had in the codebase
baronfel May 14, 2022
93a97f7
cross-project renames working and tested
baronfel May 15, 2022
c8a193e
initial dependent-file checking tests, for within the same project
baronfel May 15, 2022
b9349b3
green up some tests
baronfel May 27, 2022
35d3232
deconflict same-project rename tests
baronfel May 27, 2022
7c42b46
more deconflicting
baronfel May 27, 2022
cb9fe97
WIP yeahhhhhh
baronfel May 27, 2022
ab03fda
fix formatting
baronfel May 27, 2022
7fbcb30
parse dependent files to get cross-project checking working
baronfel May 28, 2022
a7eb791
working on cross-project checking
baronfel May 28, 2022
b73527c
unblock most tests after previous refactor
baronfel May 29, 2022
6497537
fix range comparisons for symbol based lookups
baronfel May 29, 2022
1033dc0
Add test validating cross-project renames for fully-qualified symbols
baronfel May 29, 2022
ea795cc
clean up some compensating code
baronfel May 29, 2022
61f6aea
use the normalized ranges to fetch text spans
baronfel May 30, 2022
659150d
fix expectation for FSI project options checking
baronfel May 30, 2022
ed2f7ae
really fix script options test to not error
baronfel May 30, 2022
f092d72
fix dependent checking tests
baronfel May 30, 2022
f9f69d1
bump testlogger to get nicer reports
baronfel May 31, 2022
95a1a0d
bump to newer FCS
baronfel Jun 1, 2022
cedf2fd
try to get around restore blockage
baronfel Jun 1, 2022
14dfe9b
Revert "bump to newer FCS"
baronfel Jun 1, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
]
},
"fantomas": {
"version": "5.0.0-alpha-006",
"version": "5.0.0-alpha-008",
"commands": [
"fantomas"
]
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ release.cmd
test/FsAutoComplete.Tests.Lsp/TestCases/FakeInterop/build.fsx.lock
coverage.xml
coverage
test/FsAutoComplete.Tests.Lsp/TestResults/
4 changes: 1 addition & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"name": ".NET Core mode lsp (debug)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build_debug_netcore",
"program": "${workspaceFolder}/src/FsAutoComplete/bin/Debug/net6.0/fsautocomplete.dll",
"args": [
"--mode",
Expand All @@ -23,7 +22,6 @@
"name": "LSP tests",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build_lsp_tests",
"program": "${workspaceFolder}/test/FsAutoComplete.Tests.Lsp/bin/Debug/net6.0/FsAutoComplete.Tests.Lsp.dll",
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
Expand All @@ -43,7 +41,7 @@
"args": [
"--debug",
"--filter",
"lsp.Ionide WorkspaceLoader.Completion.AutoOpen.with root module with comments and new line before open.completion"
"FSAC.lsp.Ionide WorkspaceLoader.ScriptProjectOptionsCache.tests.reopening the script file should return same project options for file"
]
},
{
Expand Down
33 changes: 13 additions & 20 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,18 @@
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"taskName": "build_debug_netcore",
"type": "shell",
"command": "dotnet build src/FsAutoComplete -f net6.0",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [
"$msCompile"
]
},
{
"taskName": "build_lsp_tests",
"type": "shell",
"command": "dotnet build test/FsAutoComplete.Tests.Lsp",
"problemMatcher": [
"$msCompile"
]
}
{
"label": "format codebase",
"command": "dotnet",
"args": [
"fake",
"build",
"-t",
"Format"
],
"detail": "Format all source code using Fantomas",
"type": "shell",
"problemMatcher": []
}
]
}
184 changes: 91 additions & 93 deletions FsAutoComplete.sln
Original file line number Diff line number Diff line change
@@ -1,93 +1,91 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28803.452
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".paket", ".paket", "{1BE8AF57-B314-4C92-82A9-64CD9B7A4990}"
ProjectSection(SolutionItems) = preProject
paket.dependencies = paket.dependencies
paket.lock = paket.lock
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{E1A34828-1EA8-44F8-8377-10DCC312EB8B}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
.travis.yml = .travis.yml
appveyor.yml = appveyor.yml
build.cmd = build.cmd
build.fsx = build.fsx
build.sh = build.sh
LICENSE.md = LICENSE.md
README.md = README.md
RELEASE_NOTES.md = RELEASE_NOTES.md
EndProjectSection
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FsAutoComplete", "src\FsAutoComplete\FsAutoComplete.fsproj", "{B6AB4EF3-8F60-41A1-AB0C-851A6DEB169E}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FsAutoComplete.Core", "src\FsAutoComplete.Core\FsAutoComplete.Core.fsproj", "{4E4786F3-4566-44E1-8787-91790007F0F6}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FsAutoComplete.BackgroundServices", "src\FsAutoComplete.BackgroundServices\FsAutoComplete.BackgroundServices.fsproj", "{775C1714-AD5F-4A4C-B613-0AE08F51E17A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{443E0B8D-9AD0-436E-A331-E8CC12965F07}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FsAutoComplete.Tests.Lsp", "test\FsAutoComplete.Tests.Lsp\FsAutoComplete.Tests.Lsp.fsproj", "{6FE2E08A-9F3F-4C7C-B190-77C46AE147D7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{BA56455D-4AEA-45FC-A569-027A68A76BA6}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsAutoComplete.Logging", "src\FsAutoComplete.Logging\FsAutoComplete.Logging.fsproj", "{38C1F619-3E1E-4784-9833-E8A2AA95CDAE}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "OptionAnalyzer", "test\OptionAnalyzer\OptionAnalyzer.fsproj", "{14C55B44-2063-4891-98BE-8184CAB1BE87}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsAutoComplete.DependencyManager.Dummy", "test\FsAutoComplete.DependencyManager.Dummy\FsAutoComplete.DependencyManager.Dummy.fsproj", "{C58701B0-D8E3-4B68-A7DE-8524C95F86C0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B6AB4EF3-8F60-41A1-AB0C-851A6DEB169E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B6AB4EF3-8F60-41A1-AB0C-851A6DEB169E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B6AB4EF3-8F60-41A1-AB0C-851A6DEB169E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B6AB4EF3-8F60-41A1-AB0C-851A6DEB169E}.Release|Any CPU.Build.0 = Release|Any CPU
{4E4786F3-4566-44E1-8787-91790007F0F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4E4786F3-4566-44E1-8787-91790007F0F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4E4786F3-4566-44E1-8787-91790007F0F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4E4786F3-4566-44E1-8787-91790007F0F6}.Release|Any CPU.Build.0 = Release|Any CPU
{775C1714-AD5F-4A4C-B613-0AE08F51E17A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{775C1714-AD5F-4A4C-B613-0AE08F51E17A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{775C1714-AD5F-4A4C-B613-0AE08F51E17A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{775C1714-AD5F-4A4C-B613-0AE08F51E17A}.Release|Any CPU.Build.0 = Release|Any CPU
{6FE2E08A-9F3F-4C7C-B190-77C46AE147D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6FE2E08A-9F3F-4C7C-B190-77C46AE147D7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6FE2E08A-9F3F-4C7C-B190-77C46AE147D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6FE2E08A-9F3F-4C7C-B190-77C46AE147D7}.Release|Any CPU.Build.0 = Release|Any CPU
{38C1F619-3E1E-4784-9833-E8A2AA95CDAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{38C1F619-3E1E-4784-9833-E8A2AA95CDAE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{38C1F619-3E1E-4784-9833-E8A2AA95CDAE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{38C1F619-3E1E-4784-9833-E8A2AA95CDAE}.Release|Any CPU.Build.0 = Release|Any CPU
{14C55B44-2063-4891-98BE-8184CAB1BE87}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{14C55B44-2063-4891-98BE-8184CAB1BE87}.Debug|Any CPU.Build.0 = Debug|Any CPU
{14C55B44-2063-4891-98BE-8184CAB1BE87}.Release|Any CPU.ActiveCfg = Release|Any CPU
{14C55B44-2063-4891-98BE-8184CAB1BE87}.Release|Any CPU.Build.0 = Release|Any CPU
{C58701B0-D8E3-4B68-A7DE-8524C95F86C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C58701B0-D8E3-4B68-A7DE-8524C95F86C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C58701B0-D8E3-4B68-A7DE-8524C95F86C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C58701B0-D8E3-4B68-A7DE-8524C95F86C0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{6FE2E08A-9F3F-4C7C-B190-77C46AE147D7} = {443E0B8D-9AD0-436E-A331-E8CC12965F07}
{38C1F619-3E1E-4784-9833-E8A2AA95CDAE} = {BA56455D-4AEA-45FC-A569-027A68A76BA6}
{14C55B44-2063-4891-98BE-8184CAB1BE87} = {443E0B8D-9AD0-436E-A331-E8CC12965F07}
{C58701B0-D8E3-4B68-A7DE-8524C95F86C0} = {443E0B8D-9AD0-436E-A331-E8CC12965F07}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1C4EE83B-632A-4929-8C96-38F14254229E}
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = FsAutoComplete\FsAutoComplete.fsproj
EndGlobalSection
EndGlobal

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28803.452
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".paket", ".paket", "{1BE8AF57-B314-4C92-82A9-64CD9B7A4990}"
ProjectSection(SolutionItems) = preProject
paket.dependencies = paket.dependencies
paket.lock = paket.lock
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{E1A34828-1EA8-44F8-8377-10DCC312EB8B}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
.travis.yml = .travis.yml
appveyor.yml = appveyor.yml
build.cmd = build.cmd
build.fsx = build.fsx
build.sh = build.sh
LICENSE.md = LICENSE.md
README.md = README.md
RELEASE_NOTES.md = RELEASE_NOTES.md
EndProjectSection
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FsAutoComplete", "src\FsAutoComplete\FsAutoComplete.fsproj", "{B6AB4EF3-8F60-41A1-AB0C-851A6DEB169E}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FsAutoComplete.Core", "src\FsAutoComplete.Core\FsAutoComplete.Core.fsproj", "{4E4786F3-4566-44E1-8787-91790007F0F6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{443E0B8D-9AD0-436E-A331-E8CC12965F07}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FsAutoComplete.Tests.Lsp", "test\FsAutoComplete.Tests.Lsp\FsAutoComplete.Tests.Lsp.fsproj", "{6FE2E08A-9F3F-4C7C-B190-77C46AE147D7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{BA56455D-4AEA-45FC-A569-027A68A76BA6}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsAutoComplete.Logging", "src\FsAutoComplete.Logging\FsAutoComplete.Logging.fsproj", "{38C1F619-3E1E-4784-9833-E8A2AA95CDAE}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "OptionAnalyzer", "test\OptionAnalyzer\OptionAnalyzer.fsproj", "{14C55B44-2063-4891-98BE-8184CAB1BE87}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsAutoComplete.DependencyManager.Dummy", "test\FsAutoComplete.DependencyManager.Dummy\FsAutoComplete.DependencyManager.Dummy.fsproj", "{C58701B0-D8E3-4B68-A7DE-8524C95F86C0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B6AB4EF3-8F60-41A1-AB0C-851A6DEB169E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B6AB4EF3-8F60-41A1-AB0C-851A6DEB169E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B6AB4EF3-8F60-41A1-AB0C-851A6DEB169E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B6AB4EF3-8F60-41A1-AB0C-851A6DEB169E}.Release|Any CPU.Build.0 = Release|Any CPU
{4E4786F3-4566-44E1-8787-91790007F0F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4E4786F3-4566-44E1-8787-91790007F0F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4E4786F3-4566-44E1-8787-91790007F0F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4E4786F3-4566-44E1-8787-91790007F0F6}.Release|Any CPU.Build.0 = Release|Any CPU
{775C1714-AD5F-4A4C-B613-0AE08F51E17A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{775C1714-AD5F-4A4C-B613-0AE08F51E17A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{775C1714-AD5F-4A4C-B613-0AE08F51E17A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{775C1714-AD5F-4A4C-B613-0AE08F51E17A}.Release|Any CPU.Build.0 = Release|Any CPU
{6FE2E08A-9F3F-4C7C-B190-77C46AE147D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6FE2E08A-9F3F-4C7C-B190-77C46AE147D7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6FE2E08A-9F3F-4C7C-B190-77C46AE147D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6FE2E08A-9F3F-4C7C-B190-77C46AE147D7}.Release|Any CPU.Build.0 = Release|Any CPU
{38C1F619-3E1E-4784-9833-E8A2AA95CDAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{38C1F619-3E1E-4784-9833-E8A2AA95CDAE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{38C1F619-3E1E-4784-9833-E8A2AA95CDAE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{38C1F619-3E1E-4784-9833-E8A2AA95CDAE}.Release|Any CPU.Build.0 = Release|Any CPU
{14C55B44-2063-4891-98BE-8184CAB1BE87}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{14C55B44-2063-4891-98BE-8184CAB1BE87}.Debug|Any CPU.Build.0 = Debug|Any CPU
{14C55B44-2063-4891-98BE-8184CAB1BE87}.Release|Any CPU.ActiveCfg = Release|Any CPU
{14C55B44-2063-4891-98BE-8184CAB1BE87}.Release|Any CPU.Build.0 = Release|Any CPU
{C58701B0-D8E3-4B68-A7DE-8524C95F86C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C58701B0-D8E3-4B68-A7DE-8524C95F86C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C58701B0-D8E3-4B68-A7DE-8524C95F86C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C58701B0-D8E3-4B68-A7DE-8524C95F86C0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{6FE2E08A-9F3F-4C7C-B190-77C46AE147D7} = {443E0B8D-9AD0-436E-A331-E8CC12965F07}
{38C1F619-3E1E-4784-9833-E8A2AA95CDAE} = {BA56455D-4AEA-45FC-A569-027A68A76BA6}
{14C55B44-2063-4891-98BE-8184CAB1BE87} = {443E0B8D-9AD0-436E-A331-E8CC12965F07}
{C58701B0-D8E3-4B68-A7DE-8524C95F86C0} = {443E0B8D-9AD0-436E-A331-E8CC12965F07}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1C4EE83B-632A-4929-8C96-38F14254229E}
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = FsAutoComplete\FsAutoComplete.fsproj
EndGlobalSection
EndGlobal
3 changes: 1 addition & 2 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ let sourceFiles =

Target.initEnvironment ()

let fsacAssemblies =
"FsAutoComplete|FsAutoComplete.Core|FsAutoComplete.BackgroundServices|LanguageServerProtocol"
let fsacAssemblies = "FsAutoComplete|FsAutoComplete.Core|LanguageServerProtocol"

let packAsToolProp = "PackAsTool", "true"

Expand Down
6 changes: 3 additions & 3 deletions paket.lock
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ NUGET
FSharp.Core (>= 4.6.2)
FsToolkit.ErrorHandling (2.13)
FSharp.Core (>= 4.7.2)
GitHubActionsTestLogger (1.3)
Microsoft.TestPlatform.ObjectModel (>= 17.0)
GitHubActionsTestLogger (2.0)
Microsoft.TestPlatform.ObjectModel (>= 17.2)
ICSharpCode.Decompiler (7.2.1.6856)
Microsoft.Win32.Registry (>= 5.0)
System.Collections.Immutable (>= 5.0)
Expand Down Expand Up @@ -209,7 +209,7 @@ NUGET
Microsoft.SourceLink.GitLab (1.1.1) - copy_local: true
Microsoft.Build.Tasks.Git (>= 1.1.1)
Microsoft.SourceLink.Common (>= 1.1.1)
Microsoft.TestPlatform.ObjectModel (17.1)
Microsoft.TestPlatform.ObjectModel (17.2)
NuGet.Frameworks (>= 5.11)
System.Reflection.Metadata (>= 1.6)
Microsoft.TestPlatform.TestHost (17.1) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp1.0))
Expand Down

This file was deleted.

Loading