Skip to content
This repository was archived by the owner on Oct 31, 2021. It is now read-only.

Commit 5a1091e

Browse files
Merge branch 'master' into server
2 parents 81c2289 + 03c613a commit 5a1091e

File tree

232 files changed

+1791
-1711
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

232 files changed

+1791
-1711
lines changed

build.fsx

+44-49
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Target "BuildVersion" (fun _ ->
6262
// Generate assembly info files with the right version & up-to-date information
6363
Target "AssemblyInfo" (fun _ ->
6464
let shared =
65-
[ Attribute.Product project
65+
[ Attribute.Product project
6666
Attribute.Description summary
6767
Attribute.Version release.AssemblyVersion
6868
Attribute.FileVersion release.AssemblyVersion ]
@@ -85,9 +85,9 @@ Target "VsixManifest" (fun _ ->
8585
let doc = new XmlDocument(PreserveWhitespace=true) in
8686
doc.Load manifest
8787
doc.GetElementsByTagName("Identity")
88-
|> Seq.cast<XmlNode>
89-
|> Seq.head
90-
|> fun node ->
88+
|> Seq.cast<XmlNode>
89+
|> Seq.head
90+
|> fun node ->
9191
let currentVersion = node.Attributes.GetNamedItem("Version").Value
9292
node.Attributes.GetNamedItem("Version").Value <- sprintf "%s.%s" currentVersion AppVeyor.AppVeyorEnvironment.BuildNumber
9393
doc.Save manifest
@@ -124,8 +124,7 @@ Target "BuildTests" (fun _ ->
124124
let count label glob =
125125
let (fileCount, lineCount) =
126126
!! glob
127-
|> Seq.map (fun path ->
128-
File.ReadLines(path) |> Seq.length)
127+
|> Seq.map (fun path -> File.ReadLines path |> Seq.length)
129128
|> Seq.fold (fun (fileCount, lineCount) lineNum -> (fileCount+1, lineCount + lineNum)) (0, 0)
130129
printfn "%s - File Count: %i, Line Count: %i." label fileCount lineCount
131130

@@ -142,29 +141,29 @@ Target "RunStatistics" (fun _ ->
142141
Target "UnitTests" (fun _ ->
143142
[@"tests/FSharp.Editing.Tests/bin/Release/FSharp.Editing.Tests.dll"]
144143
|> NUnit3 (fun p ->
145-
let param =
146-
{ p with
147-
ShadowCopy = false
148-
TimeOut = TimeSpan.FromMinutes 20.
149-
Framework = NUnit3Runtime.Net45
150-
Domain = NUnit3DomainModel.MultipleDomainModel
151-
Workers = Some 1
152-
ResultSpecs = ["TestResults.xml"] }
153-
if isAppVeyorBuild then { param with Where = "cat != AppVeyorLongRunning" } else param)
144+
let param =
145+
{ p with
146+
ShadowCopy = false
147+
TimeOut = TimeSpan.FromMinutes 20.
148+
//Framework = NUnit3Runtime.Net45
149+
Domain = NUnit3DomainModel.MultipleDomainModel
150+
//Workers = Some 1
151+
ResultSpecs = ["TestResults.xml"] }
152+
if isAppVeyorBuild then { param with Where = "cat != AppVeyorLongRunning" } else param)
154153
)
155154

156155
Target "IntegrationTests" (fun _ ->
157156
[@"tests/FSharp.Editing.VisualStudio.Tests/bin/Release/FSharp.Editing.VisualStudio.Tests.dll"]
158157
|> NUnit3 (fun p ->
159-
let param =
160-
{ p with
161-
ShadowCopy = false
162-
TimeOut = TimeSpan.FromMinutes 20.
163-
Framework = NUnit3Runtime.Net45
164-
Domain = NUnit3DomainModel.MultipleDomainModel
165-
Workers = Some 1
166-
ResultSpecs = ["TestResults.xml"] }
167-
if isAppVeyorBuild then { param with Where = "cat != AppVeyorLongRunning" } else param)
158+
let param =
159+
{ p with
160+
ShadowCopy = false
161+
TimeOut = TimeSpan.FromMinutes 20.
162+
//Framework = NUnit3Runtime.Net45
163+
Domain = NUnit3DomainModel.MultipleDomainModel
164+
//Workers = Some 1
165+
ResultSpecs = ["TestResults.xml"] }
166+
if isAppVeyorBuild then { param with Where = "cat != AppVeyorLongRunning" } else param)
168167
)
169168

170169
// --------------------------------------------------------------------------------------
@@ -213,27 +212,23 @@ Target "ReleaseDocs" (fun _ ->
213212
open Octokit
214213

215214
let readString prompt echo : string =
216-
let rec loop cs =
217-
let key = Console.ReadKey(not echo)
218-
match key.Key with
219-
| ConsoleKey.Backspace -> match cs with
220-
| [] -> loop []
221-
| _::cs -> loop cs
222-
| ConsoleKey.Enter -> cs
223-
| _ -> loop (key.KeyChar :: cs)
224-
225-
printf "%s" prompt
226-
let input =
227-
loop []
228-
|> List.rev
229-
|> Array.ofList
230-
|> fun cs -> new String(cs)
231-
if not echo then
232-
printfn ""
233-
input
234-
235-
#I @"packages/build/Selenium.Support/lib/net40"
236-
#I @"packages/build/Selenium.WebDriver/lib/net40"
215+
let rec loop cs =
216+
let key = Console.ReadKey(not echo)
217+
match key.Key with
218+
| ConsoleKey.Backspace ->
219+
match cs with [] -> loop [] | _::cs -> loop cs
220+
| ConsoleKey.Enter -> cs
221+
| _ -> loop (key.KeyChar :: cs)
222+
223+
printf "%s" prompt
224+
let input =
225+
loop []
226+
|> List.rev
227+
|> Array.ofList
228+
|> fun cs -> String cs
229+
if not echo then printfn ""
230+
input
231+
237232
#r @"packages/build/Selenium.WebDriver/lib/net40/WebDriver.dll"
238233
#r @"packages/build/canopy/lib/canopy.dll"
239234

@@ -246,7 +241,7 @@ Target "UploadToGallery" (fun _ ->
246241
let galleryUrl = sprintf "https://visualstudiogallery.msdn.microsoft.com/%s/edit?newSession=True" vsixGuid
247242

248243
let username,password =
249-
let lines = File.ReadAllLines("gallerycredentials.txt")
244+
let lines = File.ReadAllLines "gallerycredentials.txt"
250245
lines.[0],lines.[1]
251246

252247
// log in to msdn
@@ -259,14 +254,14 @@ Target "UploadToGallery" (fun _ ->
259254
js (sprintf "$('form[action=\"/%s/edit/changeContributionUpload\"]').submit();" vsixGuid) |> ignore
260255

261256
// select "upload the vsix"
262-
let fi = System.IO.FileInfo("bin/FSharpVSPowerTools.vsix")
257+
let fi = System.IO.FileInfo "bin/FSharpVSPowerTools.vsix"
263258

264259
".uploadFileInput" << fi.FullName
265260
click "#setContributionTypeButton"
266261
sleep 15
267262
click "#uploadButton"
268263
sleep 15
269-
quit()
264+
quit ()
270265
)
271266

272267
Target "Release" (fun _ ->
@@ -332,7 +327,7 @@ Target "TravisCI" (fun _ ->
332327
==> "Build"
333328
==> "BuildTests"
334329
==> "UnitTests"
335-
==> "IntegrationTests"
330+
<=> "IntegrationTests"
336331
==> "Main"
337332

338333
"Clean"

docs/tools/templates/template.cshtml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<li><a href="@Properties["project-github"]">Source Code on GitHub</a></li>
4747
<li><a href="@Properties["project-github"]/blob/master/LICENSE.txt">License</a></li>
4848
<li><a href="@Properties["project-github"]/blob/master/RELEASE_NOTES.md">Release Notes</a></li>
49-
<li><a href="@Properties["project-github"]/blob/master/CONTRIBUTING.md">How to contribute</a></li>
49+
<li><a href="@Properties["project-github"]/blob/master/.github/CONTRIBUTING.md">How to contribute</a></li>
5050
<li><a href="@Root/faq.html">FAQ</a></li>
5151

5252
<li class="nav-header">Supported Features</li>

paket.dependencies

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ strategy: max
55
nuget Fantomas
66
nuget FSharp.Compiler.Service
77
nuget FSharp.Core
8+
nuget FSharp.Data
89
nuget FSharp.Management
910
nuget FSharp.ViewModule.Core
1011
nuget FSharpLint.Core prerelease

paket.lock

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ NUGET
88
FSharp.Compiler.Service (5.0)
99
FSharp.Compiler.Service.ProjectCracker (3.0)
1010
FSharp.Core (4.0.0.1)
11+
FSharp.Data (2.3.1)
12+
Zlib.Portable (>= 1.11) - framework: portable-net45+sl5+win8, portable-net45+win8, portable-net45+win8+wp8+wpa81
1113
FSharp.Management (0.3)
1214
FSharp.ViewModule.Core (0.9.9.3)
1315
FSharpLint.Core (0.4.1-beta)
@@ -17,6 +19,7 @@ NUGET
1719
FsPickler (2.3)
1820
FsXaml.Wpf (2.0)
1921
SourceLink.SymbolStore (0.5)
22+
Zlib.Portable (1.11) - framework: portable-net45+sl5+win8, portable-net45+win8, portable-net45+win8+wp8+wpa81
2023

2124
GROUP Build
2225
NUGET

src/FSharp.Editing.VisualStudio.v2015/FSharp.Editing.VisualStudio.v2015.fsproj

+5-8
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,22 @@
77
<SchemaVersion>2.0</SchemaVersion>
88
<ProjectGuid>bb0c6f01-5e57-4575-a498-5de850d9fa6c</ProjectGuid>
99
<OutputType>Library</OutputType>
10-
<RootNamespace>FSharpVSPowerTools.Logic.VS2015</RootNamespace>
10+
<RootNamespace>FSharp.Editing.VisualStudio.v2015</RootNamespace>
1111
<AssemblyName>FSharp.Editing.VisualStudio.v2015</AssemblyName>
1212
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
1313
<TargetFSharpCoreVersion>4.4.0.0</TargetFSharpCoreVersion>
1414
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
1515
<Name>FSharp.Editing.VisualStudio.v2015</Name>
16-
<TargetFrameworkProfile />
17-
<ReferencePath>
18-
</ReferencePath>
1916
</PropertyGroup>
2017
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
2118
<DebugSymbols>true</DebugSymbols>
2219
<DebugType>full</DebugType>
2320
<Optimize>false</Optimize>
2421
<Tailcalls>false</Tailcalls>
25-
<OutputPath>bin\Debug\</OutputPath>
22+
<OutputPath>bin\$(Configuration)</OutputPath>
2623
<DefineConstants>DEBUG;TRACE</DefineConstants>
2724
<WarningLevel>5</WarningLevel>
28-
<DocumentationFile>bin\Debug\FSharp.Editing.VisualStudio.v2015.XML</DocumentationFile>
25+
<DocumentationFile>bin\$(Configuration)\$(AssemblyName).XML</DocumentationFile>
2926
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
3027
<WarningsAsErrors />
3128
<NoWarn>52</NoWarn>
@@ -35,10 +32,10 @@
3532
<DebugType>pdbonly</DebugType>
3633
<Optimize>true</Optimize>
3734
<Tailcalls>true</Tailcalls>
38-
<OutputPath>bin\Release\</OutputPath>
35+
<OutputPath>bin\$(Configuration)</OutputPath>
3936
<DefineConstants>TRACE</DefineConstants>
4037
<WarningLevel>5</WarningLevel>
41-
<DocumentationFile>bin\Release\FSharp.Editing.VisualStudio.v2015.XML</DocumentationFile>
38+
<DocumentationFile>bin\$(Configuration)\$(AssemblyName).XML</DocumentationFile>
4239
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
4340
<WarningsAsErrors />
4441
</PropertyGroup>

src/FSharp.Editing.VisualStudio/FSharp.Editing.VisualStudio.fsproj

+6-5
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77
<SchemaVersion>2.0</SchemaVersion>
88
<ProjectGuid>70456b75-f623-41b4-8044-ed02c265f0ff</ProjectGuid>
99
<OutputType>Library</OutputType>
10-
<RootNamespace>FSharpVSPowerTools.Logic</RootNamespace>
10+
<RootNamespace>>FSharp.Editing.VisualStudio</RootNamespace>
1111
<AssemblyName>FSharp.Editing.VisualStudio</AssemblyName>
1212
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
1313
<TargetFSharpCoreVersion>4.4.0.0</TargetFSharpCoreVersion>
14+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
1415
<Name>FSharp.Editing.VisualStudio</Name>
1516
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
1617
<TargetFrameworkProfile />
@@ -20,10 +21,10 @@
2021
<DebugType>full</DebugType>
2122
<Optimize>false</Optimize>
2223
<Tailcalls>false</Tailcalls>
23-
<OutputPath>bin\Debug\</OutputPath>
24+
<OutputPath>bin\$(Configuration)</OutputPath>
2425
<DefineConstants>TRACE;DEBUG; </DefineConstants>
2526
<WarningLevel>5</WarningLevel>
26-
<DocumentationFile>bin\Debug\FSharp.Editing.VisualStudio.XML</DocumentationFile>
27+
<DocumentationFile>bin\$(Configuration)\$(AssemblyName).XML</DocumentationFile>
2728
<OtherFlags>--warnon:1182</OtherFlags>
2829
<NoWarn>52,44</NoWarn>
2930
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
@@ -33,10 +34,10 @@
3334
<DebugType>pdbonly</DebugType>
3435
<Optimize>true</Optimize>
3536
<Tailcalls>true</Tailcalls>
36-
<OutputPath>bin\Release\</OutputPath>
37+
<OutputPath>bin\$(Configuration)</OutputPath>
3738
<DefineConstants>TRACE</DefineConstants>
3839
<WarningLevel>5</WarningLevel>
39-
<DocumentationFile>bin\Release\FSharp.Editing.VisualStudio.XML</DocumentationFile>
40+
<DocumentationFile>bin\$(Configuration)\$(AssemblyName).XML</DocumentationFile>
4041
<OtherFlags>--warnon:1182</OtherFlags>
4142
<NoWarn>52,44</NoWarn>
4243
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

src/FSharp.Editing.VisualStudio/Gui/FolderNameDialog.xaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<Window.Resources>
1717
<ResourceDictionary>
1818
<ResourceDictionary.MergedDictionaries>
19-
<ResourceDictionary Source="pack://application:,,,/FSharp.Editing.VisualStudio;component/CommonResources.xaml" />
19+
<ResourceDictionary Source="pack://application:,,,/FSharp.Editing.VisualStudio;component/Gui/CommonResources.xaml" />
2020
</ResourceDictionary.MergedDictionaries>
2121
<Style TargetType="HeaderedContentControl">
2222
<Setter Property="Focusable" Value="False"/>

src/FSharp.Editing.VisualStudio/Gui/MoveToFolderDialog.xaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<Window.Resources>
1717
<ResourceDictionary>
1818
<ResourceDictionary.MergedDictionaries>
19-
<ResourceDictionary Source="pack://application:,,,/FSharp.Editing.VisualStudio;component/CommonResources.xaml" />
19+
<ResourceDictionary Source="pack://application:,,,/FSharp.Editing.VisualStudio;component/Gui/CommonResources.xaml" />
2020
</ResourceDictionary.MergedDictionaries>
2121
<Style TargetType="HeaderedContentControl">
2222
<Setter Property="Focusable" Value="False"/>

src/FSharp.Editing.VisualStudio/Gui/RenameDialog.xaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<Window.Resources>
2121
<ResourceDictionary>
2222
<ResourceDictionary.MergedDictionaries>
23-
<ResourceDictionary Source="pack://application:,,,/FSharp.Editing.VisualStudio;component/CommonResources.xaml" />
23+
<ResourceDictionary Source="pack://application:,,,/FSharp.Editing.VisualStudio;component/Gui/CommonResources.xaml" />
2424
</ResourceDictionary.MergedDictionaries>
2525

2626
<fsxaml:BooleanToVisibilityConverter x:Key="BoolToVis" />

src/FSharp.Editing.VisualStudio/Navigation/GoToDefinitionFilter.fs

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
open System
44
open System.IO
55
open System.Threading
6-
open System.Diagnostics
76
open System.Text.RegularExpressions
87
open Microsoft.Win32
98
open Microsoft.VisualStudio
@@ -46,7 +45,8 @@ type GoToDefinitionFilter
4645
referenceSourceProvider: ReferenceSourceProvider,
4746
metadataService: NavigateToMetadataService,
4847
navigationPreference: NavigationPreference,
49-
fireNavigationEvent: bool
48+
fireNavigationEvent: bool,
49+
processStart: System.Action<string>
5050
) =
5151

5252
let urlChanged = if fireNavigationEvent then Some (Event<UrlChangeEventArgs>()) else None
@@ -127,7 +127,7 @@ type GoToDefinitionFilter
127127
if fireNavigationEvent then
128128
currentUrl <- Some url
129129
urlChanged |> Option.iter (fun event -> event.Trigger(UrlChangeEventArgs(url)))
130-
Process.Start(browserUrl) |> ignore)
130+
processStart.Invoke(browserUrl) |> ignore)
131131

132132
let tryFindSourceUrl (fsSymbol: FSharpSymbol) =
133133
let changeExt ext path = Path.ChangeExtension(path, ext)
@@ -194,7 +194,7 @@ type GoToDefinitionFilter
194194
if fireNavigationEvent then
195195
currentUrl <- Some url
196196
urlChanged |> Option.iter (fun event -> event.Trigger(UrlChangeEventArgs(url)))
197-
Process.Start url |> ignore
197+
processStart.Invoke(url) |> ignore
198198
| None ->
199199
Logging.logWarning (fun _ -> sprintf "Can't find navigation information for %s." symbol.FullName)
200200
else

src/FSharp.Editing/Common/Utils.fs

+6
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ module Prelude =
5252
let inline isNotNull v = not (isNull v)
5353
let inline dispose (disposable:#IDisposable) = disposable.Dispose ()
5454

55+
let inline Ok a = Choice1Of2 a
56+
let inline Fail a = Choice2Of2 a
57+
let inline (|Ok|Fail|) a = a
58+
59+
60+
5561
[<RequireQualifiedAccess>]
5662
[<CompilationRepresentation (CompilationRepresentationFlags.ModuleSuffix)>]
5763
module Seq =

src/FSharp.Editing/FSharp.Editing.fsproj

+4-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
<AssemblyName>FSharp.Editing</AssemblyName>
1212
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
1313
<TargetFSharpCoreVersion>4.4.0.0</TargetFSharpCoreVersion>
14-
<Name>FSharpVSPowerTools.Core</Name>
14+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
15+
<Name>FSharp.Editing</Name>
1516
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
1617
<TargetFrameworkProfile />
1718
</PropertyGroup>
@@ -23,7 +24,7 @@
2324
<OutputPath>bin\Debug\</OutputPath>
2425
<DefineConstants>DEBUG;TRACE</DefineConstants>
2526
<WarningLevel>5</WarningLevel>
26-
<DocumentationFile>bin\Debug\FSharp.Editing.XML</DocumentationFile>
27+
<DocumentationFile>bin\$(Configuration)\$(AssemblyName).XML</DocumentationFile>
2728
<OtherFlags>--warnon:1182</OtherFlags>
2829
<NoWarn>52</NoWarn>
2930
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
@@ -36,7 +37,7 @@
3637
<OutputPath>bin\Release\</OutputPath>
3738
<DefineConstants>TRACE</DefineConstants>
3839
<WarningLevel>5</WarningLevel>
39-
<DocumentationFile>bin\Release\FSharp.Editing.XML</DocumentationFile>
40+
<DocumentationFile>bin\$(Configuration)\$(AssemblyName).XML</DocumentationFile>
4041
<OtherFlags>--warnon:1182</OtherFlags>
4142
<NoWarn>52</NoWarn>
4243
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

0 commit comments

Comments
 (0)