Skip to content

Commit fd94172

Browse files
committed
move main app to nuget
1 parent ddda6b7 commit fd94172

22 files changed

+874
-723
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
]
2828
},
2929
"fantomas": {
30-
"version": "5.0.0",
30+
"version": "5.2.0",
3131
"commands": [
3232
"fantomas"
3333
]

.paket/Paket.Restore.targets

Lines changed: 0 additions & 557 deletions
This file was deleted.

.paket/paket.targets

Lines changed: 0 additions & 38 deletions
This file was deleted.

Directory.Build.props

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,15 @@
44
<Title>FsAutoComplete</Title>
55
<Product>FsAutoComplete</Product>
66
<PackageLicenseExpression Condition=" '$(PackAsTool)' != 'true' ">Apache-2.0</PackageLicenseExpression>
7-
<NoWarn>3186</NoWarn><!-- circumvent an error with the fake dependencymanager for paket: https://github.com/dotnet/fsharp/issues/8678 -->
7+
<NoWarn>$(NoWarn);3186</NoWarn><!-- circumvent an error with the fake dependencymanager for paket: https://github.com/dotnet/fsharp/issues/8678 -->
8+
<NoWarn>$(NoWarn);NU1608</NoWarn><!-- Ignore Nuget dependency match warnings -->
89
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
910
<ChangelogFile>$(MSBuildThisFileDirectory)CHANGELOG.md</ChangelogFile>
1011
</PropertyGroup>
1112

13+
<ItemGroup>
14+
<PackageReference Include="Ionide.KeepAChangelog.Tasks" Version="0.1.8" />
15+
<PackageReference Include="Dotnet.ReproducibleBuilds" Version="1.1.1" />
16+
</ItemGroup>
17+
1218
</Project>

FsAutoComplete.sln

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 16
44
VisualStudioVersion = 16.0.28803.452
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".paket", ".paket", "{1BE8AF57-B314-4C92-82A9-64CD9B7A4990}"
7-
ProjectSection(SolutionItems) = preProject
8-
paket.dependencies = paket.dependencies
9-
paket.lock = paket.lock
10-
EndProjectSection
11-
EndProject
126
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FsAutoComplete", "src\FsAutoComplete\FsAutoComplete.fsproj", "{B6AB4EF3-8F60-41A1-AB0C-851A6DEB169E}"
137
EndProject
148
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FsAutoComplete.Core", "src\FsAutoComplete.Core\FsAutoComplete.Core.fsproj", "{4E4786F3-4566-44E1-8787-91790007F0F6}"

build/paket.references

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/FsAutoComplete.Core/Commands.fs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ open SymbolLocation
2323
open FSharp.Compiler.Symbols
2424
open System.Collections.Immutable
2525
open System.Collections.Generic
26-
open Ionide.ProjInfo.ProjectSystem
2726

2827

2928
[<RequireQualifiedAccess>]
@@ -419,7 +418,7 @@ module Commands =
419418

420419
let formatDocument
421420
(tryGetFileCheckerOptionsWithLines: _ -> Result<NamedText, _>)
422-
(formatDocumentAsync: _ -> System.Threading.Tasks.Task<FantomasResponse>)
421+
(formatDocumentAsync: FormatDocumentRequest -> System.Threading.Tasks.Task<FantomasResponse>)
423422
(file: string<LocalPath>)
424423
: Async<Result<FormatDocumentResponse, string>> =
425424
asyncResult {
@@ -613,7 +612,7 @@ module Commands =
613612

614613
return CoreResponse.Res hints
615614
}
616-
|> Result.fold id (fun _ -> CoreResponse.InfoRes "Couldn't find file content")
615+
|> Result.bimap id (fun _ -> CoreResponse.InfoRes "Couldn't find file content")
617616

618617
let calculateNamespaceInsert
619618
currentAst
@@ -770,9 +769,9 @@ module Commands =
770769
let symbolRange = symbol.DefinitionRange.NormalizeDriveLetterCasing()
771770
let symbolFile = symbolRange.TaggedFileName
772771

773-
let symbolFileText =
772+
let! symbolFileText =
774773
tryGetFileSource (symbolFile)
775-
|> Result.fold id (fun e -> failwith $"Unable to get file source for file '{symbolFile}'")
774+
|> Result.mapError (fun e -> failwith $"Unable to get file source for file '{symbolFile}'")
776775

777776
let! symbolText = symbolFileText.[symbolRange]
778777
// |> Result.fold id (fun e -> failwith "Unable to get text for initial symbol use")
@@ -790,17 +789,17 @@ module Commands =
790789
|> List.distinctBy (fun x -> x.ProjectFileName)
791790

792791
let onFound (symbolUseRange: range) =
793-
async {
792+
asyncResult {
794793
let symbolUseRange = symbolUseRange.NormalizeDriveLetterCasing()
795794
let symbolFile = symbolUseRange.TaggedFileName
796795
let targetText = tryGetFileSource (symbolFile)
797796

798797
match targetText with
799798
| Error e -> ()
800799
| Ok sourceText ->
801-
let sourceSpan =
800+
let! sourceSpan =
802801
sourceText.[symbolUseRange]
803-
|> Result.fold id (fun e -> failwith "Unable to get text for symbol use")
802+
|> Result.mapError (fun e -> failwith "Unable to get text for symbol use")
804803

805804
// There are two kinds of ranges we get back:
806805
// * ranges that exactly match the short name of the symbol
@@ -821,6 +820,7 @@ module Commands =
821820
let actualUseRange = Range.mkRange symbolUseRange.FileName startPos endPos
822821
symbolUseRanges.Add actualUseRange
823822
}
823+
|> Async.Ignore
824824

825825
let! _ = getSymbolUsesInProjects (symbol, projects, onFound)
826826

@@ -2053,7 +2053,7 @@ type Commands(checker: FSharpCompilerServiceChecker, state: State, hasAnalyzers:
20532053
(
20542054
file: string<LocalPath>,
20552055
rangeToFormat: FormatSelectionRange
2056-
) : Async<Result<FormatDocumentResponse, string>> =
2056+
) : Async<Result<_, string>> =
20572057
let tryGetFileCheckerOptionsWithLines file =
20582058
x.TryGetFileCheckerOptionsWithLines file |> Result.map snd
20592059

src/FsAutoComplete.Core/FsAutoComplete.Core.fsproj

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,16 @@
4444
<Compile Include="SymbolLocation.fs" />
4545
<Compile Include="Commands.fs" />
4646
</ItemGroup>
47-
<Import Project="..\..\.paket\Paket.Restore.targets" />
47+
<ItemGroup>
48+
<PackageReference Include="Fantomas.Client" Version="0.7.0" />
49+
<PackageReference Include="FSharp.Analyzers.SDK" Version="0.11.0" />
50+
<PackageReference Include="FSharp.Compiler.Service" Version="41.0.5" />
51+
<PackageReference Include="FSharp.UMX" Version="1.1.0" />
52+
<PackageReference Include="FsToolkit.ErrorHandling" Version="4.3.0" />
53+
<PackageReference Include="ICSharpCode.Decompiler" Version="7.2.1.6856" />
54+
<PackageReference Include="Ionide.LanguageServerProtocol" Version="0.4.12" />
55+
<PackageReference Include="Ionide.ProjInfo.ProjectSystem" Version="0.61.1" />
56+
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
57+
</ItemGroup>
58+
4859
</Project>

src/FsAutoComplete.Core/paket.references

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/FsAutoComplete.Logging/FsAutoComplete.Logging.fsproj

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
<IsPackable>false</IsPackable>
66
</PropertyGroup>
77
<ItemGroup>
8-
<Compile Include="..\..\paket-files\TheAngryByrd\FsLibLog\src\FsLibLog\FsLibLog.fs">
9-
<Paket>True</Paket>
10-
<Link>paket-files/FsLibLog.fs</Link>
11-
</Compile>
8+
<Compile Include="FsLibLog.fs" />
129
</ItemGroup>
13-
<Import Project="..\..\.paket\Paket.Restore.targets" />
1410
</Project>

0 commit comments

Comments
 (0)