Skip to content

Commit b7f0199

Browse files
authored
Merge pull request #8343 from dotnet/merges/master-to-feature/tasks
Merge master to feature/tasks
2 parents 42c0ed3 + 70883fb commit b7f0199

17 files changed

+29
-118
lines changed

vsintegration/src/FSharp.Editor/Diagnostics/ProjectDiagnosticAnalyzer.fs

-58
This file was deleted.

vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj

-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
<Compile Include="Debugging\BreakpointResolutionService.fs" />
6262
<Compile Include="Debugging\LanguageDebugInfoService.fs" />
6363
<Compile Include="Diagnostics\DocumentDiagnosticAnalyzer.fs" />
64-
<Compile Include="Diagnostics\ProjectDiagnosticAnalyzer.fs" />
6564
<Compile Include="Diagnostics\SimplifyNameDiagnosticAnalyzer.fs" />
6665
<Compile Include="Diagnostics\UnusedDeclarationsAnalyzer.fs" />
6766
<Compile Include="Diagnostics\UnusedOpensDiagnosticAnalyzer.fs" />

vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.cs.xlf

+1-2
Original file line numberDiff line numberDiff line change
@@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom</note>
18281828
</trans-unit>
18291829
<trans-unit id="RSE_GraphicSizeFormat">
18301830
<source>{0} x {1}</source>
1831-
<target state="needs-review-translation">{0} x {1}</target>
1831+
<target state="translated">{0} x {1}</target>
18321832
<note>Format string for showing a graphic's size
1833-
18341833
# {0} = width (as an integer)
18351834
# {1} = height (as an integer)
18361835
#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456"</note>

vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.de.xlf

+1-2
Original file line numberDiff line numberDiff line change
@@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom</note>
18281828
</trans-unit>
18291829
<trans-unit id="RSE_GraphicSizeFormat">
18301830
<source>{0} x {1}</source>
1831-
<target state="needs-review-translation">{0} x {1}</target>
1831+
<target state="translated">{0} x {1}</target>
18321832
<note>Format string for showing a graphic's size
1833-
18341833
# {0} = width (as an integer)
18351834
# {1} = height (as an integer)
18361835
#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456"</note>

vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.es.xlf

+1-2
Original file line numberDiff line numberDiff line change
@@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom</note>
18281828
</trans-unit>
18291829
<trans-unit id="RSE_GraphicSizeFormat">
18301830
<source>{0} x {1}</source>
1831-
<target state="needs-review-translation">{0} x {1}</target>
1831+
<target state="translated">{0} x {1}</target>
18321832
<note>Format string for showing a graphic's size
1833-
18341833
# {0} = width (as an integer)
18351834
# {1} = height (as an integer)
18361835
#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456"</note>

vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.fr.xlf

+1-2
Original file line numberDiff line numberDiff line change
@@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom</note>
18281828
</trans-unit>
18291829
<trans-unit id="RSE_GraphicSizeFormat">
18301830
<source>{0} x {1}</source>
1831-
<target state="needs-review-translation">{0} x {1}</target>
1831+
<target state="translated">{0} x {1}</target>
18321832
<note>Format string for showing a graphic's size
1833-
18341833
# {0} = width (as an integer)
18351834
# {1} = height (as an integer)
18361835
#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456"</note>

vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.it.xlf

+1-2
Original file line numberDiff line numberDiff line change
@@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom</note>
18281828
</trans-unit>
18291829
<trans-unit id="RSE_GraphicSizeFormat">
18301830
<source>{0} x {1}</source>
1831-
<target state="needs-review-translation">{0} x {1}</target>
1831+
<target state="translated">{0} x {1}</target>
18321832
<note>Format string for showing a graphic's size
1833-
18341833
# {0} = width (as an integer)
18351834
# {1} = height (as an integer)
18361835
#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456"</note>

vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ja.xlf

+1-2
Original file line numberDiff line numberDiff line change
@@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom</note>
18281828
</trans-unit>
18291829
<trans-unit id="RSE_GraphicSizeFormat">
18301830
<source>{0} x {1}</source>
1831-
<target state="needs-review-translation">{0} x {1}</target>
1831+
<target state="translated">{0} x {1}</target>
18321832
<note>Format string for showing a graphic's size
1833-
18341833
# {0} = width (as an integer)
18351834
# {1} = height (as an integer)
18361835
#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456"</note>

vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ko.xlf

+1-2
Original file line numberDiff line numberDiff line change
@@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom</note>
18281828
</trans-unit>
18291829
<trans-unit id="RSE_GraphicSizeFormat">
18301830
<source>{0} x {1}</source>
1831-
<target state="needs-review-translation">{0} x {1}</target>
1831+
<target state="translated">{0} x {1}</target>
18321832
<note>Format string for showing a graphic's size
1833-
18341833
# {0} = width (as an integer)
18351834
# {1} = height (as an integer)
18361835
#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456"</note>

vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pl.xlf

+1-2
Original file line numberDiff line numberDiff line change
@@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom</note>
18281828
</trans-unit>
18291829
<trans-unit id="RSE_GraphicSizeFormat">
18301830
<source>{0} x {1}</source>
1831-
<target state="needs-review-translation">{0} x {1}</target>
1831+
<target state="translated">{0} x {1}</target>
18321832
<note>Format string for showing a graphic's size
1833-
18341833
# {0} = width (as an integer)
18351834
# {1} = height (as an integer)
18361835
#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456"</note>

vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pt-BR.xlf

+1-2
Original file line numberDiff line numberDiff line change
@@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom</note>
18281828
</trans-unit>
18291829
<trans-unit id="RSE_GraphicSizeFormat">
18301830
<source>{0} x {1}</source>
1831-
<target state="needs-review-translation">{0} x {1}</target>
1831+
<target state="translated">{0} x {1}</target>
18321832
<note>Format string for showing a graphic's size
1833-
18341833
# {0} = width (as an integer)
18351834
# {1} = height (as an integer)
18361835
#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456"</note>

vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ru.xlf

+1-2
Original file line numberDiff line numberDiff line change
@@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom</note>
18281828
</trans-unit>
18291829
<trans-unit id="RSE_GraphicSizeFormat">
18301830
<source>{0} x {1}</source>
1831-
<target state="needs-review-translation">{0} x {1}</target>
1831+
<target state="translated">{0} x {1}</target>
18321832
<note>Format string for showing a graphic's size
1833-
18341833
# {0} = width (as an integer)
18351834
# {1} = height (as an integer)
18361835
#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456"</note>

vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.tr.xlf

+1-2
Original file line numberDiff line numberDiff line change
@@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom</note>
18281828
</trans-unit>
18291829
<trans-unit id="RSE_GraphicSizeFormat">
18301830
<source>{0} x {1}</source>
1831-
<target state="needs-review-translation">{0} x {1}</target>
1831+
<target state="translated">{0} x {1}</target>
18321832
<note>Format string for showing a graphic's size
1833-
18341833
# {0} = width (as an integer)
18351834
# {1} = height (as an integer)
18361835
#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456"</note>

vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hans.xlf

+1-2
Original file line numberDiff line numberDiff line change
@@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom</note>
18281828
</trans-unit>
18291829
<trans-unit id="RSE_GraphicSizeFormat">
18301830
<source>{0} x {1}</source>
1831-
<target state="needs-review-translation">{0} x {1}</target>
1831+
<target state="translated">{0} x {1}</target>
18321832
<note>Format string for showing a graphic's size
1833-
18341833
# {0} = width (as an integer)
18351834
# {1} = height (as an integer)
18361835
#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456"</note>

vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hant.xlf

+1-2
Original file line numberDiff line numberDiff line change
@@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom</note>
18281828
</trans-unit>
18291829
<trans-unit id="RSE_GraphicSizeFormat">
18301830
<source>{0} x {1}</source>
1831-
<target state="needs-review-translation">{0} x {1}</target>
1831+
<target state="translated">{0} x {1}</target>
18321832
<note>Format string for showing a graphic's size
1833-
18341833
# {0} = width (as an integer)
18351834
# {1} = height (as an integer)
18361835
#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456"</note>

vsintegration/tests/UnitTests/ProjectDiagnosticAnalyzerTests.fs

-31
Original file line numberDiff line numberDiff line change
@@ -32,34 +32,3 @@ type ProjectDiagnosticAnalyzerTests() =
3232

3333
let args = mkProjectCommandLineArgs (dllName, [fileName])
3434
checker.GetProjectOptionsFromCommandLineArgs (projectName, args)
35-
36-
#if PROJECT_ANALYSIS
37-
[<Test>]
38-
member public this.ProjectDiagnosticsDontReportJustProjectErrors_Bug1596() =
39-
// https://github.com/Microsoft/visualfsharp/issues/1596
40-
let fileContents = """
41-
let x = 3
42-
printf "%d" x
43-
"""
44-
let options = CreateProjectAndGetOptions(fileContents)
45-
let additionalOptions = {options with OtherOptions = Array.append options.OtherOptions [| "--times" |]}
46-
47-
let errors = FSharpProjectDiagnosticAnalyzer.GetDiagnostics(additionalOptions) |> Async.RunSynchronously
48-
Assert.AreEqual(1, errors.Length, "Exactly one warning should have been reported")
49-
50-
let warning = errors.[0]
51-
Assert.AreEqual(DiagnosticSeverity.Warning, warning.Severity, "Diagnostic severity should be a warning")
52-
Assert.AreEqual("The command-line option 'times' is for test purposes only", warning.GetMessage())
53-
54-
[<Test>]
55-
member public this.ProjectDiagnosticsShouldNotReportDocumentErrors_Bug1596() =
56-
// https://github.com/Microsoft/visualfsharp/issues/1596
57-
let fileContents = """
58-
let x = "string value that cannot be printed with %d"
59-
printf "%d" x
60-
"""
61-
let options = CreateProjectAndGetOptions(fileContents)
62-
63-
let errors = FSharpProjectDiagnosticAnalyzer.GetDiagnostics(options) |> Async.RunSynchronously
64-
Assert.AreEqual(0, errors.Length, "No semantic errors should have been reported")
65-
#endif

vsintegration/tests/UnitTests/ProjectOptionsBuilder.fs

+16-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ open System.IO
55
open System.Xml.Linq
66
open FSharp.Compiler.SourceCodeServices
77

8+
module FileSystemHelpers =
9+
let safeDeleteFile (path: string) =
10+
try
11+
File.Delete(path)
12+
with
13+
| _ -> ()
14+
15+
let safeDeleteDirectory (path: string) =
16+
try
17+
Directory.Delete(path)
18+
with
19+
| _ -> ()
20+
821
type FSharpProject =
922
{
1023
Directory: string
@@ -29,9 +42,10 @@ type FSharpProject =
2942
member this.Dispose() =
3043
// delete each source file
3144
this.Files
32-
|> List.iter (fun (path, _contents) -> File.Delete(path))
45+
|> List.map fst
46+
|> List.iter FileSystemHelpers.safeDeleteFile
3347
// delete the directory
34-
Directory.Delete(this.Directory)
48+
FileSystemHelpers.safeDeleteDirectory (this.Directory)
3549
// project file doesn't really exist, nothing to delete
3650
()
3751

0 commit comments

Comments
 (0)