{0} for F# {1}
- {0} for F# {1}
+ {0} pro F# {1}
diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.de.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.de.xlf
index 1865fb58fea..8014aa45590 100644
--- a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.de.xlf
+++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.de.xlf
@@ -4,7 +4,7 @@
{0} for F# {1}
- {0} for F# {1}
+ {0} für F# {1}
diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.es.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.es.xlf
index 05929de6032..e70e526aa75 100644
--- a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.es.xlf
+++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.es.xlf
@@ -4,7 +4,7 @@
{0} for F# {1}
- {0} for F# {1}
+ {0} para F# {1}
diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.fr.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.fr.xlf
index 22d534392f1..967ceecc6e4 100644
--- a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.fr.xlf
+++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.fr.xlf
@@ -4,7 +4,7 @@
{0} for F# {1}
- {0} for F# {1}
+ {0} pour F# {1}
diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.it.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.it.xlf
index 2e707f25086..a0c02bd7658 100644
--- a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.it.xlf
+++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.it.xlf
@@ -4,7 +4,7 @@
{0} for F# {1}
- {0} for F# {1}
+ {0} per F# {1}
diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ja.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ja.xlf
index 627dc44db2d..2cbcdb1927b 100644
--- a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ja.xlf
+++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ja.xlf
@@ -4,7 +4,7 @@
{0} for F# {1}
- {0} for F# {1}
+ F# {1} の {0}
diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ko.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ko.xlf
index f337b0ad289..d007db16c3c 100644
--- a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ko.xlf
+++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ko.xlf
@@ -4,7 +4,7 @@
{0} for F# {1}
- {0} for F# {1}
+ F# {1}용 {0}
diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.pl.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.pl.xlf
index f88076689ac..565fdd2b8d2 100644
--- a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.pl.xlf
+++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.pl.xlf
@@ -4,7 +4,7 @@
{0} for F# {1}
- {0} for F# {1}
+ {0} dla języka F# {1}
diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.pt-BR.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.pt-BR.xlf
index e6c5b3c6011..2d6ac4cf6ca 100644
--- a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.pt-BR.xlf
+++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.pt-BR.xlf
@@ -4,7 +4,7 @@
{0} for F# {1}
- {0} for F# {1}
+ {0} para F# {1}
diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ru.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ru.xlf
index b84d44d49d4..23dc6215bd4 100644
--- a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ru.xlf
+++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ru.xlf
@@ -4,7 +4,7 @@
{0} for F# {1}
- {0} for F# {1}
+ {0} для F# {1}
diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.tr.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.tr.xlf
index 02194a2720b..b56fc715900 100644
--- a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.tr.xlf
+++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.tr.xlf
@@ -4,7 +4,7 @@
{0} for F# {1}
- {0} for F# {1}
+ F# {1} için {0}
diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.zh-Hans.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.zh-Hans.xlf
index 12ae0131cbd..f514600395d 100644
--- a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.zh-Hans.xlf
+++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.zh-Hans.xlf
@@ -4,7 +4,7 @@
{0} for F# {1}
- {0} for F# {1}
+ F# {1} 的 {0}
diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.zh-Hant.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.zh-Hant.xlf
index c18392ba1dc..e3f63746fa4 100644
--- a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.zh-Hant.xlf
+++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.zh-Hant.xlf
@@ -4,7 +4,7 @@
{0} for F# {1}
- {0} for F# {1}
+ F # {1} 的 {0}
diff --git a/src/fsharp/IlxGen.fs b/src/fsharp/IlxGen.fs
index b77d06e508a..6b66a6a8ab2 100644
--- a/src/fsharp/IlxGen.fs
+++ b/src/fsharp/IlxGen.fs
@@ -832,8 +832,15 @@ and IlxGenEnv =
/// Are we under the scope of a try, catch or finally? If so we can't tailcall. SEH = structured exception handling
withinSEH: bool
+
+ /// Are we inside of a recursive let binding, while loop, or a for loop?
+ isInLoop: bool
}
+let SetIsInLoop isInLoop eenv =
+ if eenv.isInLoop = isInLoop then eenv
+ else { eenv with isInLoop = isInLoop }
+
let ReplaceTyenv tyenv (eenv: IlxGenEnv) = {eenv with tyenv = tyenv }
let EnvForTypars tps eenv = {eenv with tyenv = TypeReprEnv.ForTypars tps }
@@ -3434,6 +3441,7 @@ and GenTryFinally cenv cgbuf eenv (bodyExpr, handlerExpr, m, resty, spTry, spFin
//--------------------------------------------------------------------------
and GenForLoop cenv cgbuf eenv (spFor, v, e1, dir, e2, loopBody, m) sequel =
+ let eenv = SetIsInLoop true eenv
let g = cenv.g
// The JIT/NGen eliminate array-bounds checks for C# loops of form:
@@ -3524,6 +3532,7 @@ and GenForLoop cenv cgbuf eenv (spFor, v, e1, dir, e2, loopBody, m) sequel =
//--------------------------------------------------------------------------
and GenWhileLoop cenv cgbuf eenv (spWhile, e1, e2, m) sequel =
+ let eenv = SetIsInLoop true eenv
let finish = CG.GenerateDelayMark cgbuf "while_finish"
let startTest = CG.GenerateMark cgbuf "startTest"
@@ -5126,6 +5135,7 @@ and GenLetRecFixup cenv cgbuf eenv (ilxCloSpec: IlxClosureSpec, e, ilField: ILFi
/// Generate letrec bindings
and GenLetRecBindings cenv (cgbuf: CodeGenBuffer) eenv (allBinds: Bindings, m) =
+ let eenv = SetIsInLoop true eenv
// Fix up recursion for non-toplevel recursive bindings
let bindsPossiblyRequiringFixup =
allBinds |> List.filter (fun b ->
@@ -5374,8 +5384,8 @@ and GenBindingAfterSequencePoint cenv cgbuf eenv sp (TBind(vspec, rhsExpr, _)) s
| _ ->
let storage = StorageForVal cenv.g m vspec eenv
match storage, rhsExpr with
- // locals are zero-init, no need to initialize them
- | Local (_, realloc, _), Expr.Const (Const.Zero, _, _) when not realloc ->
+ // locals are zero-init, no need to initialize them, except if you are in a loop and the local is mutable.
+ | Local (_, realloc, _), Expr.Const (Const.Zero, _, _) when not realloc && not (eenv.isInLoop && vspec.IsMutable) ->
CommitStartScope cgbuf startScopeMarkOpt
| _ ->
GenBindingRhs cenv cgbuf eenv SPSuppress vspec rhsExpr
@@ -7512,7 +7522,8 @@ let GetEmptyIlxGenEnv (ilg: ILGlobals) ccu =
liveLocals=IntMap.empty()
innerVals = []
sigToImplRemapInfo = [] (* "module remap info" *)
- withinSEH = false }
+ withinSEH = false
+ isInLoop = false }
type IlxGenResults =
{ ilTypeDefs: ILTypeDef list
diff --git a/src/fsharp/fsi/fsi.fsproj b/src/fsharp/fsi/fsi.fsproj
index 5b4978679b2..96293d2d77c 100644
--- a/src/fsharp/fsi/fsi.fsproj
+++ b/src/fsharp/fsi/fsi.fsproj
@@ -34,6 +34,9 @@
+
+
+
diff --git a/src/fsharp/xlf/FSComp.txt.cs.xlf b/src/fsharp/xlf/FSComp.txt.cs.xlf
index 883582e5e67..7ff138f6adf 100644
--- a/src/fsharp/xlf/FSComp.txt.cs.xlf
+++ b/src/fsharp/xlf/FSComp.txt.cs.xlf
@@ -4,7 +4,7 @@
{0} for F# {1}
- {0} for F# {1}
+ {0} pro F# {1}
@@ -154,7 +154,7 @@
Use reference assemblies for .NET framework references when available (Enabled by default).
- Use reference assemblies for .NET framework references when available (Enabled by default).
+ Pro odkazy na rozhraní .NET používejte referenční sestavení, pokud jsou k dispozici (ve výchozím nastavení povolené).
@@ -5559,7 +5559,7 @@
Deterministic builds only support portable PDBs (--debug:portable or --debug:embedded)
- Deterministická sestavení podporují jenom soubory PDB typu Portable (--debug:portable nebo --debug:embedded).
+ Deterministické buildy podporují jenom přenositelné soubory PDB (--debug:portable nebo --debug:embedded)
@@ -7174,17 +7174,17 @@
Maps physical paths to source path names output by the compiler
- Maps physical paths to source path names output by the compiler
+ Mapuje fyzické cesty na názvy zdrojových cest z výstupu kompilátoru.--pathmap can only be used with portable PDBs (--debug:portable or --debug:embedded)
- --pathmap can only be used with portable PDBs (--debug:portable or --debug:embedded)
+ Parametr --pathmap se může používat jenom s přenositelnými soubory PDB (--debug:portable nebo --debug:embedded)Invalid path map. Mappings must be comma separated and of the format 'path=sourcePath'
- Invalid path map. Mappings must be comma separated and of the format 'path=sourcePath'
+ Neplatná mapa cest. Mapování musí být oddělená čárkami a používat formát cesta=zdrojováCesta.
diff --git a/src/fsharp/xlf/FSComp.txt.de.xlf b/src/fsharp/xlf/FSComp.txt.de.xlf
index 12791db46fa..1645cfc2d52 100644
--- a/src/fsharp/xlf/FSComp.txt.de.xlf
+++ b/src/fsharp/xlf/FSComp.txt.de.xlf
@@ -4,7 +4,7 @@
{0} for F# {1}
- {0} for F# {1}
+ {0} für F# {1}
@@ -154,7 +154,7 @@
Use reference assemblies for .NET framework references when available (Enabled by default).
- Use reference assemblies for .NET framework references when available (Enabled by default).
+ Verweisassemblys für .NET Framework-Verweise verwenden, wenn verfügbar (standardmäßig aktiviert).
@@ -5559,7 +5559,7 @@
Deterministic builds only support portable PDBs (--debug:portable or --debug:embedded)
- Deterministische Builds unterstützen nur portierbare PDbs ("--debug:portable" oder "--debug:embedded").
+ Deterministische Builds unterstützen nur portable PDB-Dateien (--debug:portable oder --debug:embedded)
@@ -7174,17 +7174,17 @@
Maps physical paths to source path names output by the compiler
- Maps physical paths to source path names output by the compiler
+ Ordnet der Ausgabe von Quellpfadnamen des Compilers physische Pfade zu--pathmap can only be used with portable PDBs (--debug:portable or --debug:embedded)
- --pathmap can only be used with portable PDBs (--debug:portable or --debug:embedded)
+ --pathmap kann nur mit portablen PDB-Dateien verwendet werden (--debug:portable oder --debug:embedded)Invalid path map. Mappings must be comma separated and of the format 'path=sourcePath'
- Invalid path map. Mappings must be comma separated and of the format 'path=sourcePath'
+ Ungültige Pfadzuordnung. Zuordnungen müssen durch Kommas getrennt werden und das Format 'path=sourcePath' aufweisen
diff --git a/src/fsharp/xlf/FSComp.txt.es.xlf b/src/fsharp/xlf/FSComp.txt.es.xlf
index e4096bec532..56f087fb38d 100644
--- a/src/fsharp/xlf/FSComp.txt.es.xlf
+++ b/src/fsharp/xlf/FSComp.txt.es.xlf
@@ -4,7 +4,7 @@
{0} for F# {1}
- {0} for F# {1}
+ {0} para F# {1}
@@ -124,7 +124,7 @@
All branches of a pattern match expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'.
- All branches of a pattern match expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'.
+ Todas las ramas de una expresión de coincidencia de patrón deben devolver valores del mismo tipo. La primera rama devolvió un valor de tipo "{0}", pero esta rama devolvió un valor de tipo "\{1 \}".
@@ -154,7 +154,7 @@
Use reference assemblies for .NET framework references when available (Enabled by default).
- Use reference assemblies for .NET framework references when available (Enabled by default).
+ Use ensamblados de referencia para las referencias de .NET Framework cuando estén disponibles (habilitado de forma predeterminada).
@@ -5559,7 +5559,7 @@
Deterministic builds only support portable PDBs (--debug:portable or --debug:embedded)
- Las compilaciones deterministas solo admiten PDB portátiles (--debug:portable o --debug:embedded)
+ Las compilaciones deterministas solo admiten PDB portátiles (--Debug: portable o--Debug: embedded)
@@ -7174,17 +7174,17 @@
Maps physical paths to source path names output by the compiler
- Maps physical paths to source path names output by the compiler
+ Asigna rutas físicas de acceso a nombres de ruta de origen resultantes del compilador--pathmap can only be used with portable PDBs (--debug:portable or --debug:embedded)
- --pathmap can only be used with portable PDBs (--debug:portable or --debug:embedded)
+ --pathmap solo se puede utilizar con PDB portátiles (--Debug:portable o --Debug:embedded)Invalid path map. Mappings must be comma separated and of the format 'path=sourcePath'
- Invalid path map. Mappings must be comma separated and of the format 'path=sourcePath'
+ Mapa de ruta no válido. Las asignaciones deben estar separadas por comas y tener el formato "path=rutaOrigen"
diff --git a/src/fsharp/xlf/FSComp.txt.fr.xlf b/src/fsharp/xlf/FSComp.txt.fr.xlf
index 1a0d745e9f2..0be131277cd 100644
--- a/src/fsharp/xlf/FSComp.txt.fr.xlf
+++ b/src/fsharp/xlf/FSComp.txt.fr.xlf
@@ -4,7 +4,7 @@
{0} for F# {1}
- {0} for F# {1}
+ {0} pour F# {1}
@@ -154,7 +154,7 @@
Use reference assemblies for .NET framework references when available (Enabled by default).
- Use reference assemblies for .NET framework references when available (Enabled by default).
+ Utilisez des assemblys de référence pour les références .NET Framework quand ils sont disponibles (activé par défaut).
@@ -5559,7 +5559,7 @@
Deterministic builds only support portable PDBs (--debug:portable or --debug:embedded)
- Les builds déterministes ne prennent en charge que les fichiers PDB portables (--debug:portable ou --debug:embedded)
+ Les builds déterministes prennent seulement en charge les PDB portables (--debug:portable ou --debug:embedded)
@@ -7174,17 +7174,17 @@
Maps physical paths to source path names output by the compiler
- Maps physical paths to source path names output by the compiler
+ Mappe les chemins physiques aux noms de chemin source générés par le compilateur--pathmap can only be used with portable PDBs (--debug:portable or --debug:embedded)
- --pathmap can only be used with portable PDBs (--debug:portable or --debug:embedded)
+ --pathmap peut seulement être utilisé avec des PBD portables (--debug:portable ou --debug:embedded)Invalid path map. Mappings must be comma separated and of the format 'path=sourcePath'
- Invalid path map. Mappings must be comma separated and of the format 'path=sourcePath'
+ Mappage de chemin non valide. Les mappages doivent être séparés par des virgules et au format 'path=sourcePath'
diff --git a/src/fsharp/xlf/FSComp.txt.it.xlf b/src/fsharp/xlf/FSComp.txt.it.xlf
index baec2ba7fd6..53ca4ca804e 100644
--- a/src/fsharp/xlf/FSComp.txt.it.xlf
+++ b/src/fsharp/xlf/FSComp.txt.it.xlf
@@ -4,7 +4,7 @@
{0} for F# {1}
- {0} for F# {1}
+ {0} per F# {1}
@@ -154,7 +154,7 @@
Use reference assemblies for .NET framework references when available (Enabled by default).
- Use reference assemblies for .NET framework references when available (Enabled by default).
+ Usa gli assembly di riferimento per i riferimenti a .NET Framework quando disponibili (abilitato per impostazione predefinita).
@@ -5559,7 +5559,7 @@
Deterministic builds only support portable PDBs (--debug:portable or --debug:embedded)
- Le compilazioni deterministiche supportano solo file PDB portatili (--debug:portable o --debug:embedded)
+ Le compilazioni deterministiche supportano solo file PDB portatili (--debug:portable o --debug:embedded)
@@ -7174,17 +7174,17 @@
Maps physical paths to source path names output by the compiler
- Maps physical paths to source path names output by the compiler
+ Esegue il mapping dei percorsi fisici ai nomi di percorso di origine restituiti dal compilatore--pathmap can only be used with portable PDBs (--debug:portable or --debug:embedded)
- --pathmap can only be used with portable PDBs (--debug:portable or --debug:embedded)
+ --pathmap può essere usato solo con file PDB portatili (--debug:portable o --debug:embedded)Invalid path map. Mappings must be comma separated and of the format 'path=sourcePath'
- Invalid path map. Mappings must be comma separated and of the format 'path=sourcePath'
+ Mapping di percorso non valido. I mapping devono essere delimitati da virgole e specificati in formato 'percorso=percorsoOrigine'
diff --git a/src/fsharp/xlf/FSComp.txt.ja.xlf b/src/fsharp/xlf/FSComp.txt.ja.xlf
index a2a18f153ad..25ad9ef7015 100644
--- a/src/fsharp/xlf/FSComp.txt.ja.xlf
+++ b/src/fsharp/xlf/FSComp.txt.ja.xlf
@@ -4,7 +4,7 @@
{0} for F# {1}
- {0} for F# {1}
+ F# {1} の {0}
@@ -154,7 +154,7 @@
Use reference assemblies for .NET framework references when available (Enabled by default).
- Use reference assemblies for .NET framework references when available (Enabled by default).
+ 使用可能な場合は、.NET Framework リファレンスの参照アセンブリを使用します (既定で有効)。
@@ -5561,7 +5561,7 @@
Deterministic builds only support portable PDBs (--debug:portable or --debug:embedded)
- 決定論的ビルドはポータブル PDB のみをサポートします (--debug:portable または --debug:embedded)
+ 決定論的ビルドは、ポータブル PDB のみをサポートします (--debug:portable または --debug:embedded)
@@ -7176,17 +7176,17 @@
Maps physical paths to source path names output by the compiler
- Maps physical paths to source path names output by the compiler
+ 物理パスをコンパイラ出力のソース パス名にマップします--pathmap can only be used with portable PDBs (--debug:portable or --debug:embedded)
- --pathmap can only be used with portable PDBs (--debug:portable or --debug:embedded)
+ --pathmap は、ポータブル PDB でのみ使用できます (--debug:portable または --debug:embedded)Invalid path map. Mappings must be comma separated and of the format 'path=sourcePath'
- Invalid path map. Mappings must be comma separated and of the format 'path=sourcePath'
+ 無効なパス マップです。マッピングはコンマ区切りの 'path=sourcePath' 形式である必要があります
diff --git a/src/fsharp/xlf/FSComp.txt.ko.xlf b/src/fsharp/xlf/FSComp.txt.ko.xlf
index 92ead77838e..f1a4302d509 100644
--- a/src/fsharp/xlf/FSComp.txt.ko.xlf
+++ b/src/fsharp/xlf/FSComp.txt.ko.xlf
@@ -4,7 +4,7 @@
{0} for F# {1}
- {0} for F# {1}
+ F# {1}용 {0}
@@ -154,7 +154,7 @@
Use reference assemblies for .NET framework references when available (Enabled by default).
- Use reference assemblies for .NET framework references when available (Enabled by default).
+ 기본적으로 활성화되는 참조 어셈블리를 .NET Framework 참조에 사용합니다(사용 가능한 경우).
@@ -5559,7 +5559,7 @@
Deterministic builds only support portable PDBs (--debug:portable or --debug:embedded)
- 결정적 빌드는 이식 가능한 PDB만 지원합니다(--debug:portable 또는 --debug:embedded).
+ 결정적 빌드는 이식 가능한 PDB만 지원합니다(--debug:portable 또는 --debug:embedded).
@@ -7174,17 +7174,17 @@
Maps physical paths to source path names output by the compiler
- Maps physical paths to source path names output by the compiler
+ 컴파일러에서 실제 경로를 소스 경로 이름 출력에 매핑합니다.--pathmap can only be used with portable PDBs (--debug:portable or --debug:embedded)
- --pathmap can only be used with portable PDBs (--debug:portable or --debug:embedded)
+ --pathmap은 이식 가능한 PDB에만 사용할 수 있습니다(--debug:portable 또는 --debug:embedded).Invalid path map. Mappings must be comma separated and of the format 'path=sourcePath'
- Invalid path map. Mappings must be comma separated and of the format 'path=sourcePath'
+ 잘못된 경로 맵입니다. 매핑은 쉼표로 구분되어야 하며 'path=sourcePath' 형식이어야 합니다.
diff --git a/src/fsharp/xlf/FSComp.txt.pl.xlf b/src/fsharp/xlf/FSComp.txt.pl.xlf
index 0187c22d016..f50ce51d8dd 100644
--- a/src/fsharp/xlf/FSComp.txt.pl.xlf
+++ b/src/fsharp/xlf/FSComp.txt.pl.xlf
@@ -4,7 +4,7 @@
{0} for F# {1}
- {0} for F# {1}
+ {0} dla języka F# {1}
@@ -154,7 +154,7 @@
Use reference assemblies for .NET framework references when available (Enabled by default).
- Use reference assemblies for .NET framework references when available (Enabled by default).
+ Użyj zestawów odwołań dla odwołań do programu .NET Framework, gdy są dostępne (domyślnie włączone).
@@ -5559,7 +5559,7 @@
Deterministic builds only support portable PDBs (--debug:portable or --debug:embedded)
- Kompilacje deterministyczne obsługują tylko przenośne pliki PDB (--debug:portable lub --debug:embedded)
+ Deterministyczne kompilacje obsługują tylko przenośne pliki PDB (--debug:portable lub --debug:embedded)
@@ -7174,17 +7174,17 @@
Maps physical paths to source path names output by the compiler
- Maps physical paths to source path names output by the compiler
+ Mapuje ścieżki fizyczne na wyjściowe nazwy ścieżek źródłowych z kompilatora--pathmap can only be used with portable PDBs (--debug:portable or --debug:embedded)
- --pathmap can only be used with portable PDBs (--debug:portable or --debug:embedded)
+ Argumentu --pathmap można używać tylko z przenośnymi plikami PDB (--debug:portable lub --debug:embedded)Invalid path map. Mappings must be comma separated and of the format 'path=sourcePath'
- Invalid path map. Mappings must be comma separated and of the format 'path=sourcePath'
+ Nieprawidłowe mapowanie ścieżek. Mapowania muszą być rozdzielone przecinkami i mieć format „path=sourcePath”
diff --git a/src/fsharp/xlf/FSComp.txt.pt-BR.xlf b/src/fsharp/xlf/FSComp.txt.pt-BR.xlf
index 1ed97eb22d3..cf3fbbae234 100644
--- a/src/fsharp/xlf/FSComp.txt.pt-BR.xlf
+++ b/src/fsharp/xlf/FSComp.txt.pt-BR.xlf
@@ -4,7 +4,7 @@
{0} for F# {1}
- {0} for F# {1}
+ {0} para F# {1}
@@ -154,7 +154,7 @@
Use reference assemblies for .NET framework references when available (Enabled by default).
- Use reference assemblies for .NET framework references when available (Enabled by default).
+ Use assemblies de referência para referências do .NET Framework quando disponível (habilitado por padrão).
@@ -5559,7 +5559,7 @@
Deterministic builds only support portable PDBs (--debug:portable or --debug:embedded)
- Compilações determinísticas dão suporte somente a PDBs portáteis (--debug:portable ou --debug:embedded)
+ Os builds determinísticos oferecem suporte apenas para PDBs portáteis (--debug:portable ou --debug:embedded)
@@ -7174,17 +7174,17 @@
Maps physical paths to source path names output by the compiler
- Maps physical paths to source path names output by the compiler
+ Mapeia caminhos físicos para nomes de caminho de origem gerados pelo compilador--pathmap can only be used with portable PDBs (--debug:portable or --debug:embedded)
- --pathmap can only be used with portable PDBs (--debug:portable or --debug:embedded)
+ --pathmap só pode ser usado com PDBs portáteis (--debug:portable ou --debug:embedded)Invalid path map. Mappings must be comma separated and of the format 'path=sourcePath'
- Invalid path map. Mappings must be comma separated and of the format 'path=sourcePath'
+ Mapa de caminho inválido. Os mapeamentos devem ser separados por vírgulas e do formato 'path=sourcePath'
diff --git a/src/fsharp/xlf/FSComp.txt.ru.xlf b/src/fsharp/xlf/FSComp.txt.ru.xlf
index bdeac0f9592..f4c4134fda1 100644
--- a/src/fsharp/xlf/FSComp.txt.ru.xlf
+++ b/src/fsharp/xlf/FSComp.txt.ru.xlf
@@ -4,7 +4,7 @@
{0} for F# {1}
- {0} for F# {1}
+ {0} для F# {1}
@@ -154,7 +154,7 @@
Use reference assemblies for .NET framework references when available (Enabled by default).
- Use reference assemblies for .NET framework references when available (Enabled by default).
+ Использовать базовые сборки для ссылок на платформу .NET, если базовые сборки доступны (включено по умолчанию).
@@ -5559,7 +5559,7 @@
Deterministic builds only support portable PDBs (--debug:portable or --debug:embedded)
- Детерминированные сборки поддерживают только переносимые PDB-файлы (--debug:portable или --debug:embedded)
+ Детерминированные сборки поддерживают только переносимые PDB-файлы (--debug:portable или --debug:embedded)
@@ -7174,17 +7174,17 @@
Maps physical paths to source path names output by the compiler
- Maps physical paths to source path names output by the compiler
+ Сопоставляет физические пути с исходными путями в выходных данных компилятора--pathmap can only be used with portable PDBs (--debug:portable or --debug:embedded)
- --pathmap can only be used with portable PDBs (--debug:portable or --debug:embedded)
+ Параметр --pathmap может использоваться только с переносимыми PDB-файлами (--debug:portable или --debug:embedded)Invalid path map. Mappings must be comma separated and of the format 'path=sourcePath'
- Invalid path map. Mappings must be comma separated and of the format 'path=sourcePath'
+ Недействительная карта путей. Сопоставления должны быть разделены запятыми и должны иметь формат "path=исходный_путь"
diff --git a/src/fsharp/xlf/FSComp.txt.tr.xlf b/src/fsharp/xlf/FSComp.txt.tr.xlf
index de62c337f55..216c29567d6 100644
--- a/src/fsharp/xlf/FSComp.txt.tr.xlf
+++ b/src/fsharp/xlf/FSComp.txt.tr.xlf
@@ -4,7 +4,7 @@
{0} for F# {1}
- {0} for F# {1}
+ F# {1} için {0}
@@ -154,7 +154,7 @@
Use reference assemblies for .NET framework references when available (Enabled by default).
- Use reference assemblies for .NET framework references when available (Enabled by default).
+ Kullanılabilir olduğunda, .NET Framework başvuruları için başvuru bütünleştirilmiş kodlarını kullanın (Varsayılan olarak etkindir).
@@ -5559,7 +5559,7 @@
Deterministic builds only support portable PDBs (--debug:portable or --debug:embedded)
- Belirleyici derlemeler yalnızca taşınabilir PDB'leri (--debug:portable veya --debug:embedded) destekler
+ Belirlenimci derlemeler yalnızca taşınabilir PDB'leri (--debug:portable veya --debug:embedded) destekler
@@ -7174,17 +7174,17 @@
Maps physical paths to source path names output by the compiler
- Maps physical paths to source path names output by the compiler
+ Fiziksel yolları derleyiciye göre kaynak yol adları çıkışıyla eşler--pathmap can only be used with portable PDBs (--debug:portable or --debug:embedded)
- --pathmap can only be used with portable PDBs (--debug:portable or --debug:embedded)
+ --pathmap yalnızca taşınabilir PDB'ler (--debug:portable veya --debug:embedded) ile kullanılabilirInvalid path map. Mappings must be comma separated and of the format 'path=sourcePath'
- Invalid path map. Mappings must be comma separated and of the format 'path=sourcePath'
+ Geçersiz yol eşlemesi. Eşlemeler virgülle ayrılmış ve 'path=sourcePath' biçiminde olmalıdır
diff --git a/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf b/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf
index b0264288fb1..b2a9493d151 100644
--- a/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf
+++ b/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf
@@ -4,7 +4,7 @@
{0} for F# {1}
- {0} for F# {1}
+ F# {1} 的 {0}
@@ -154,7 +154,7 @@
Use reference assemblies for .NET framework references when available (Enabled by default).
- Use reference assemblies for .NET framework references when available (Enabled by default).
+ 如果可用,请对 .NET Framework 引用使用引用程序集(默认启用)。
@@ -5559,7 +5559,7 @@
Deterministic builds only support portable PDBs (--debug:portable or --debug:embedded)
- 确定性的生成仅支持可移植 PDB (--debug:portable 或 --debug:embedded)
+ 决定性生成仅支持可移植的 PDB (--debug:portable 或 --debug:embedded)
@@ -7174,17 +7174,17 @@
Maps physical paths to source path names output by the compiler
- Maps physical paths to source path names output by the compiler
+ 将物理路径映射到编译器输出的源路径名--pathmap can only be used with portable PDBs (--debug:portable or --debug:embedded)
- --pathmap can only be used with portable PDBs (--debug:portable or --debug:embedded)
+ --pathmap 只能与可移植的 PDB 一起使用(--debug:portable 或 --debug:embedded)Invalid path map. Mappings must be comma separated and of the format 'path=sourcePath'
- Invalid path map. Mappings must be comma separated and of the format 'path=sourcePath'
+ 路径映射无效。映射必须以逗号分隔,且采用 "path=sourcePath" 格式
diff --git a/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf b/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf
index ab73b60a7f4..d9c19965864 100644
--- a/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf
+++ b/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf
@@ -4,7 +4,7 @@
{0} for F# {1}
- {0} for F# {1}
+ F # {1} 的 {0}
@@ -154,7 +154,7 @@
Use reference assemblies for .NET framework references when available (Enabled by default).
- Use reference assemblies for .NET framework references when available (Enabled by default).
+ 請在可行的情況下使用適用於 .NET 架構參考的參考組件 (預設會啟用)。
@@ -5559,7 +5559,7 @@
Deterministic builds only support portable PDBs (--debug:portable or --debug:embedded)
- 確定性組建僅支援可攜式 PDB (--debug:portable 或 --debug:embedded)
+ 確定性組建僅支援可攜式 PDB (--debug:portable 或 --debug:embedded)
@@ -7174,17 +7174,17 @@
Maps physical paths to source path names output by the compiler
- Maps physical paths to source path names output by the compiler
+ 將實體路徑對應至來源路徑名稱,由編譯器輸出--pathmap can only be used with portable PDBs (--debug:portable or --debug:embedded)
- --pathmap can only be used with portable PDBs (--debug:portable or --debug:embedded)
+ --pathmap 只能搭配可攜式 PDB 使用 (--debug:portable 或 --debug:embedded)Invalid path map. Mappings must be comma separated and of the format 'path=sourcePath'
- Invalid path map. Mappings must be comma separated and of the format 'path=sourcePath'
+ 路徑對應無效。對應必須以逗號分隔,且格式應為 'path=sourcePath'
diff --git a/tests/fsharp/Compiler/Regressions/ForInDoMutableRegressionTest.fs b/tests/fsharp/Compiler/Regressions/ForInDoMutableRegressionTest.fs
new file mode 100644
index 00000000000..7319c2fab76
--- /dev/null
+++ b/tests/fsharp/Compiler/Regressions/ForInDoMutableRegressionTest.fs
@@ -0,0 +1,73 @@
+// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
+
+namespace FSharp.Compiler.UnitTests
+
+open System
+open NUnit.Framework
+
+[]
+module ForInDoMutableRegressionTest =
+
+ /// This test is to ensure we initialize locals inside loops.
+ []
+ let Script_ForInDoMutableRegressionTest() =
+ let script =
+ """
+open System.Collections.Generic
+
+let bug() =
+ for a in [1;2;3;4] do
+ let mutable x = null
+ if x = null then
+ x <- HashSet()
+ x.Add a |> ignore
+ let expected = [a]
+ let actual = List.ofSeq x
+ if expected <> actual then
+ failwith "Bug"
+
+let not_a_bug() =
+ for a in [1;2;3;4] do
+ let x = ref null
+ if (!x) = null then
+ x := HashSet()
+ (!x).Add a |> ignore
+ let expected = [a]
+ let actual = List.ofSeq (!x)
+ if expected <> actual then
+ failwith "Bug"
+
+let rec test_rec xs =
+ let mutable x = null
+ match xs with
+ | [] -> ()
+ | a :: xs ->
+ if x = null then
+ x <- HashSet()
+ x.Add a |> ignore
+ let expected = [a]
+ let actual = List.ofSeq x
+ if expected <> actual then
+ failwith "Bug"
+ test_rec xs
+
+let test_for_loop () =
+ let xs = [|1;2;3;4|]
+ for i = 0 to xs.Length - 1 do
+ let a = xs.[i]
+ let mutable x = null
+ if x = null then
+ x <- HashSet()
+ x.Add a |> ignore
+ let expected = [a]
+ let actual = List.ofSeq x
+ if expected <> actual then
+ failwith "Bug"
+
+bug ()
+not_a_bug ()
+test_rec [1;2;3;4]
+test_for_loop ()
+ """
+
+ CompilerAssert.RunScript script []
diff --git a/tests/fsharp/FSharpSuite.Tests.fsproj b/tests/fsharp/FSharpSuite.Tests.fsproj
index 2be8d09cd72..9f3aeee1e43 100644
--- a/tests/fsharp/FSharpSuite.Tests.fsproj
+++ b/tests/fsharp/FSharpSuite.Tests.fsproj
@@ -49,9 +49,7 @@
-
-
-
+
diff --git a/vsintegration/Vsix/VisualFSharpFull/Source.extension.vsixmanifest b/vsintegration/Vsix/VisualFSharpFull/Source.extension.vsixmanifest
index e272923a3da..cae75397665 100644
--- a/vsintegration/Vsix/VisualFSharpFull/Source.extension.vsixmanifest
+++ b/vsintegration/Vsix/VisualFSharpFull/Source.extension.vsixmanifest
@@ -28,7 +28,10 @@
+
+
diff --git a/vsintegration/src/FSharp.Editor/BlockComment/CommentSelectionService.fs b/vsintegration/src/FSharp.Editor/BlockComment/CommentSelectionService.fs
deleted file mode 100644
index 4c54a45a519..00000000000
--- a/vsintegration/src/FSharp.Editor/BlockComment/CommentSelectionService.fs
+++ /dev/null
@@ -1,19 +0,0 @@
-namespace Microsoft.VisualStudio.FSharp.Editor
-
-open Microsoft.CodeAnalysis.CommentSelection
-open Microsoft.CodeAnalysis.Host.Mef
-open System.Composition
-open System.Threading.Tasks
-
-[]
-[, FSharpConstants.FSharpLanguageName)>]
-type CommentSelectionService() =
- interface ICommentSelectionService with
- member this.GetInfoAsync(_document, _textSpan, _cancellationToken) =
- Task.FromResult(CommentSelectionInfo(supportsSingleLineComment=true,
- supportsBlockComment=true,
- singleLineCommentString="//",
- blockCommentStartString="(*",
- blockCommentEndString="*)"))
-
- member this.FormatAsync(document, _changes, _cancellationToken) = Task.FromResult(document)
diff --git a/vsintegration/src/FSharp.Editor/CodeFix/RemoveUnusedOpens.fs b/vsintegration/src/FSharp.Editor/CodeFix/RemoveUnusedOpens.fs
index e2ccc7e22c8..8b659aafb32 100644
--- a/vsintegration/src/FSharp.Editor/CodeFix/RemoveUnusedOpens.fs
+++ b/vsintegration/src/FSharp.Editor/CodeFix/RemoveUnusedOpens.fs
@@ -10,6 +10,7 @@ open Microsoft.CodeAnalysis.Diagnostics
open Microsoft.CodeAnalysis.Text
open Microsoft.CodeAnalysis.CodeFixes
open Microsoft.CodeAnalysis.CodeActions
+open Microsoft.CodeAnalysis.ExternalAccess.FSharp.Diagnostics
open FSharp.Compiler.Range
@@ -21,7 +22,7 @@ type internal FSharpRemoveUnusedOpensCodeFixProvider
projectInfoManager: FSharpProjectOptionsManager
) =
inherit CodeFixProvider()
- let fixableDiagnosticIds = [IDEDiagnosticIds.RemoveUnnecessaryImportsDiagnosticId]
+ let fixableDiagnosticIds = [FSharpIDEDiagnosticIds.RemoveUnnecessaryImportsDiagnosticId]
let createCodeFix (title: string, context: CodeFixContext) =
CodeAction.Create(
diff --git a/vsintegration/src/FSharp.Editor/CodeFix/SimplifyName.fs b/vsintegration/src/FSharp.Editor/CodeFix/SimplifyName.fs
index aeeae1773ef..a2768640387 100644
--- a/vsintegration/src/FSharp.Editor/CodeFix/SimplifyName.fs
+++ b/vsintegration/src/FSharp.Editor/CodeFix/SimplifyName.fs
@@ -10,12 +10,13 @@ open Microsoft.CodeAnalysis
open Microsoft.CodeAnalysis.Diagnostics
open Microsoft.CodeAnalysis.Text
open Microsoft.CodeAnalysis.CodeFixes
+open Microsoft.CodeAnalysis.ExternalAccess.FSharp.Diagnostics
open SymbolHelpers
-[]
+[]
type internal FSharpSimplifyNameCodeFixProvider() =
inherit CodeFixProvider()
- let fixableDiagnosticId = IDEDiagnosticIds.SimplifyNamesDiagnosticId
+ let fixableDiagnosticId = FSharpIDEDiagnosticIds.SimplifyNamesDiagnosticId
override __.FixableDiagnosticIds = ImmutableArray.Create(fixableDiagnosticId)
diff --git a/vsintegration/src/FSharp.Editor/CodeLens/FSharpCodeLensService.fs b/vsintegration/src/FSharp.Editor/CodeLens/FSharpCodeLensService.fs
index add51361f19..21a70f89e2e 100644
--- a/vsintegration/src/FSharp.Editor/CodeLens/FSharpCodeLensService.fs
+++ b/vsintegration/src/FSharp.Editor/CodeLens/FSharpCodeLensService.fs
@@ -14,6 +14,7 @@ open System.Windows.Media.Animation
open Microsoft.CodeAnalysis
open Microsoft.CodeAnalysis.Editor.Shared.Extensions
open Microsoft.CodeAnalysis.ExternalAccess.FSharp.Classification
+open Microsoft.CodeAnalysis.ExternalAccess.FSharp.Editor.Shared.Extensions
open FSharp.Compiler
open FSharp.Compiler.SourceCodeServices
@@ -91,7 +92,7 @@ type internal FSharpCodeLensService
logInfof "Tagged text %A" taggedText
#endif
let textBlock = new TextBlock(Background = Brushes.AliceBlue, Opacity = 0.0, TextTrimming = TextTrimming.None)
- DependencyObjectExtensions.SetDefaultTextProperties(textBlock, formatMap.Value)
+ FSharpDependencyObjectExtensions.SetDefaultTextProperties(textBlock, formatMap.Value)
let prefix = Documents.Run settings.CodeLens.Prefix
prefix.Foreground <- SolidColorBrush(Color.FromRgb(153uy, 153uy, 153uy))
@@ -116,7 +117,7 @@ type internal FSharpCodeLensService
coloredProperties.SetForeground(Color.FromRgb(153uy, 153uy, 153uy))
let run = Documents.Run text.Text
- DependencyObjectExtensions.SetTextProperties (run, actualProperties)
+ FSharpDependencyObjectExtensions.SetTextProperties (run, actualProperties)
let inl =
match text with
@@ -126,7 +127,7 @@ type internal FSharpCodeLensService
navigation.NavigateTo nav.Range)
h :> Documents.Inline
| _ -> run :> _
- DependencyObjectExtensions.SetTextProperties (inl, actualProperties)
+ FSharpDependencyObjectExtensions.SetTextProperties (inl, actualProperties)
textBlock.Inlines.Add inl
diff --git a/vsintegration/src/FSharp.Editor/Common/ContentType.fs b/vsintegration/src/FSharp.Editor/Common/ContentType.fs
deleted file mode 100644
index 2e92332ccbe..00000000000
--- a/vsintegration/src/FSharp.Editor/Common/ContentType.fs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
-
-namespace Microsoft.VisualStudio.FSharp.Editor
-
-open System.ComponentModel.Composition
-
-open Microsoft.CodeAnalysis.Editor
-open Microsoft.VisualStudio.Utilities
-open Microsoft.CodeAnalysis.ExternalAccess.FSharp.Editor
-
-module FSharpStaticTypeDefinitions =
- []
- []
- []
- let FSharpContentTypeDefinition = ContentTypeDefinition()
-
- []
- []
- []
- let FSharpSignatureHelpContentTypeDefinition = ContentTypeDefinition()
diff --git a/vsintegration/src/FSharp.Editor/Common/RoslynHelpers.fs b/vsintegration/src/FSharp.Editor/Common/RoslynHelpers.fs
index 4d66d133b78..ae8c5fe4fb6 100644
--- a/vsintegration/src/FSharp.Editor/Common/RoslynHelpers.fs
+++ b/vsintegration/src/FSharp.Editor/Common/RoslynHelpers.fs
@@ -130,14 +130,6 @@ module internal RoslynHelpers =
let StartAsyncUnitAsTask cancellationToken (computation:Async) =
StartAsyncAsTask cancellationToken computation :> Task
- let private TheSupportedDiagnostics =
- // We are constructing our own descriptors at run-time. Compiler service is already doing error formatting and localization.
- let dummyDescriptors =
- [| for i in 0 .. 10000 -> DiagnosticDescriptor(sprintf "FS%04d" i, String.Empty, String.Empty, String.Empty, DiagnosticSeverity.Error, true, null, null) |]
- ImmutableArray.Create(dummyDescriptors)
-
- let SupportedDiagnostics() = TheSupportedDiagnostics
-
let ConvertError(error: FSharpErrorInfo, location: Location) =
// Normalize the error message into the same format that we will receive it from the compiler.
// This ensures that IntelliSense and Compiler errors in the 'Error List' are de-duplicated.
diff --git a/vsintegration/src/FSharp.Editor/Completion/CompletionProvider.fs b/vsintegration/src/FSharp.Editor/Completion/CompletionProvider.fs
index 989f210a19a..9ec89f069dd 100644
--- a/vsintegration/src/FSharp.Editor/Completion/CompletionProvider.fs
+++ b/vsintegration/src/FSharp.Editor/Completion/CompletionProvider.fs
@@ -12,6 +12,7 @@ open Microsoft.CodeAnalysis
open Microsoft.CodeAnalysis.Completion
open Microsoft.CodeAnalysis.Options
open Microsoft.CodeAnalysis.Text
+open Microsoft.CodeAnalysis.ExternalAccess.FSharp.Completion
open Microsoft.VisualStudio.Shell
@@ -48,7 +49,7 @@ type internal FSharpCompletionProvider
|> List.filter (fun (keyword, _) -> not (PrettyNaming.IsOperatorName keyword))
|> List.sortBy (fun (keyword, _) -> keyword)
|> List.mapi (fun n (keyword, description) ->
- CommonCompletionItem.Create(keyword, null, CompletionItemRules.Default, Nullable Glyph.Keyword, sortText = sprintf "%06d" (1000000 + n))
+ FSharpCommonCompletionItem.Create(keyword, null, CompletionItemRules.Default, Nullable Glyph.Keyword, sortText = sprintf "%06d" (1000000 + n))
.AddProperty("description", description)
.AddProperty(IsKeywordPropName, ""))
@@ -73,7 +74,7 @@ type internal FSharpCompletionProvider
// * let xs = [1..10] <<---- Don't commit autocomplete! (same for arrays)
let noCommitChars = [|' '; '='; ','; '.'; '<'; '>'; '('; ')'; '!'; ':'; '['; ']'; '|'|].ToImmutableArray()
- CompletionItemRules.Default.WithCommitCharacterRule(CharacterSetModificationRule.Create(CharacterSetModificationKind.Remove, noCommitChars))
+ CompletionItemRules.Default.WithCommitCharacterRules(ImmutableArray.Create (CharacterSetModificationRule.Create(CharacterSetModificationKind.Remove, noCommitChars)))
static let getRules showAfterCharIsTyped = if showAfterCharIsTyped then noCommitOnSpaceRules else CompletionItemRules.Default
@@ -152,7 +153,7 @@ type internal FSharpCompletionProvider
| _, idents -> Array.last idents
let completionItem =
- CommonCompletionItem.Create(name, null, rules = getRules intellisenseOptions.ShowAfterCharIsTyped, glyph = Nullable (Microsoft.CodeAnalysis.ExternalAccess.FSharp.FSharpGlyphHelpersObsolete.Convert(glyph)), filterText = filterText)
+ FSharpCommonCompletionItem.Create(name, null, rules = getRules intellisenseOptions.ShowAfterCharIsTyped, glyph = Nullable glyph, filterText = filterText)
.AddProperty(FullNamePropName, declarationItem.FullName)
let completionItem =
@@ -198,7 +199,7 @@ type internal FSharpCompletionProvider
}
override this.ShouldTriggerCompletion(sourceText: SourceText, caretPosition: int, trigger: CompletionTrigger, _: OptionSet) =
- use _logBlock = Logger.LogBlockMessage this.Name LogEditorFunctionId.Completion_ShouldTrigger
+ use _logBlock = Logger.LogBlock LogEditorFunctionId.Completion_ShouldTrigger
let getInfo() =
let documentId = workspace.GetDocumentIdInCurrentContext(sourceText.Container)
diff --git a/vsintegration/src/FSharp.Editor/Completion/CompletionService.fs b/vsintegration/src/FSharp.Editor/Completion/CompletionService.fs
index ef138b72c7d..6303e2498d2 100644
--- a/vsintegration/src/FSharp.Editor/Completion/CompletionService.fs
+++ b/vsintegration/src/FSharp.Editor/Completion/CompletionService.fs
@@ -9,6 +9,7 @@ open Microsoft.CodeAnalysis
open Microsoft.CodeAnalysis.Completion
open Microsoft.CodeAnalysis.Host
open Microsoft.CodeAnalysis.Host.Mef
+open Microsoft.CodeAnalysis.ExternalAccess.FSharp.Completion
open Microsoft.VisualStudio.Shell
@@ -26,10 +27,11 @@ type internal FSharpCompletionService
let builtInProviders =
ImmutableArray.Create(
FSharpCompletionProvider(workspace, serviceProvider, checkerProvider, projectInfoManager, assemblyContentProvider),
- HashDirectiveCompletionProvider(workspace, projectInfoManager,
- [ Completion.Create("""\s*#load\s+(@?"*(?"[^"]*"?))""", [".fs"; ".fsx"], useIncludeDirectives = true)
- Completion.Create("""\s*#r\s+(@?"*(?"[^"]*"?))""", [".dll"; ".exe"], useIncludeDirectives = true)
- Completion.Create("""\s*#I\s+(@?"*(?"[^"]*"?))""", ["\x00"], useIncludeDirectives = false) ]))
+ FSharpCommonCompletionProvider.Create(
+ HashDirectiveCompletionProvider(workspace, projectInfoManager,
+ [ Completion.Create("""\s*#load\s+(@?"*(?"[^"]*"?))""", [".fs"; ".fsx"], useIncludeDirectives = true)
+ Completion.Create("""\s*#r\s+(@?"*(?"[^"]*"?))""", [".dll"; ".exe"], useIncludeDirectives = true)
+ Completion.Create("""\s*#I\s+(@?"*(?"[^"]*"?))""", ["\x00"], useIncludeDirectives = false) ])))
override this.Language = FSharpConstants.FSharpLanguageName
override this.GetBuiltInProviders() = builtInProviders
diff --git a/vsintegration/src/FSharp.Editor/Completion/CompletionUtils.fs b/vsintegration/src/FSharp.Editor/Completion/CompletionUtils.fs
index 6691640c4fd..5d210d5f363 100644
--- a/vsintegration/src/FSharp.Editor/Completion/CompletionUtils.fs
+++ b/vsintegration/src/FSharp.Editor/Completion/CompletionUtils.fs
@@ -8,6 +8,7 @@ open Microsoft.CodeAnalysis
open Microsoft.CodeAnalysis.Classification
open Microsoft.CodeAnalysis.Text
open Microsoft.CodeAnalysis.Completion
+open Microsoft.CodeAnalysis.ExternalAccess.FSharp.Completion
open System.Globalization
open FSharp.Compiler.SourceCodeServices
@@ -81,7 +82,7 @@ module internal CompletionUtils =
| _ -> false
let isStartingNewWord (sourceText, position) =
- CommonCompletionUtilities.IsStartingNewWord(sourceText, position, (fun ch -> isIdentifierStartCharacter ch), (fun ch -> isIdentifierPartCharacter ch))
+ FSharpCommonCompletionUtilities.IsStartingNewWord(sourceText, position, (fun ch -> isIdentifierStartCharacter ch), (fun ch -> isIdentifierPartCharacter ch))
let shouldProvideCompletion (documentId: DocumentId, filePath: string, defines: string list, sourceText: SourceText, triggerPosition: int) : bool =
let textLines = sourceText.Lines
diff --git a/vsintegration/src/FSharp.Editor/Completion/FileSystemCompletion.fs b/vsintegration/src/FSharp.Editor/Completion/FileSystemCompletion.fs
index e92caa22d4d..d8028425009 100644
--- a/vsintegration/src/FSharp.Editor/Completion/FileSystemCompletion.fs
+++ b/vsintegration/src/FSharp.Editor/Completion/FileSystemCompletion.fs
@@ -12,6 +12,7 @@ open Microsoft.CodeAnalysis
open Microsoft.CodeAnalysis.Completion
open Microsoft.CodeAnalysis.Text
open Microsoft.CodeAnalysis.Classification
+open Microsoft.CodeAnalysis.ExternalAccess.FSharp.Completion
type internal Completion =
{ DirectiveRegex: Regex
@@ -23,7 +24,6 @@ type internal Completion =
UseIncludeDirectives = useIncludeDirectives }
type internal HashDirectiveCompletionProvider(workspace: Workspace, projectInfoManager: FSharpProjectOptionsManager, completions: Completion list) =
- inherit CommonCompletionProvider()
let [] NetworkPath = "\\\\"
let commitRules = ImmutableArray.Create(CharacterSetModificationRule.Create(CharacterSetModificationKind.Replace, '"', '\\', ',', '/'))
@@ -82,75 +82,77 @@ type internal HashDirectiveCompletionProvider(workspace: Workspace, projectInfoM
)
|> Seq.toList
- override this.ProvideCompletionsAsync(context) =
- asyncMaybe {
- let document = context.Document
- let position = context.Position
- do! let extension = Path.GetExtension document.FilePath
- Option.guard (extension = ".fsx" || extension = ".fsscript")
-
- let! ct = liftAsync Async.CancellationToken
- let! text = document.GetTextAsync(ct)
- do! Option.guard (isInStringLiteral(text, position))
- let line = text.Lines.GetLineFromPosition(position)
- let lineText = text.ToString(TextSpan.FromBounds(line.Start, position))
+ interface IFSharpCommonCompletionProvider with
+
+ member this.ProvideCompletionsAsync(context) =
+ asyncMaybe {
+ let document = context.Document
+ let position = context.Position
+ do! let extension = Path.GetExtension document.FilePath
+ Option.guard (extension = ".fsx" || extension = ".fsscript")
+
+ let! ct = liftAsync Async.CancellationToken
+ let! text = document.GetTextAsync(ct)
+ do! Option.guard (isInStringLiteral(text, position))
+ let line = text.Lines.GetLineFromPosition(position)
+ let lineText = text.ToString(TextSpan.FromBounds(line.Start, position))
- let! completion, quotedPathGroup =
- completions |> List.tryPick (fun completion ->
- match completion.DirectiveRegex.Match lineText with
- | m when m.Success ->
- let quotedPathGroup = m.Groups.["literal"]
- let endsWithQuote = PathCompletionUtilities.EndsWithQuote(quotedPathGroup.Value)
- if endsWithQuote && (position >= line.Start + m.Length) then
- None
- else
- Some (completion, quotedPathGroup)
- | _ -> None)
-
- let snapshot = text.FindCorrespondingEditorTextSnapshot()
+ let! completion, quotedPathGroup =
+ completions |> List.tryPick (fun completion ->
+ match completion.DirectiveRegex.Match lineText with
+ | m when m.Success ->
+ let quotedPathGroup = m.Groups.["literal"]
+ let endsWithQuote = PathCompletionUtilities.EndsWithQuote(quotedPathGroup.Value)
+ if endsWithQuote && (position >= line.Start + m.Length) then
+ None
+ else
+ Some (completion, quotedPathGroup)
+ | _ -> None)
+
+ let snapshot = text.FindCorrespondingEditorTextSnapshot()
- do! Option.guard (not (isNull snapshot))
-
- let extraSearchPaths =
- if completion.UseIncludeDirectives then
- getIncludeDirectives (text, position)
- else []
-
- let defaultSearchPath = Path.GetDirectoryName document.FilePath
- let searchPaths = defaultSearchPath :: extraSearchPaths
-
- let helper =
- FileSystemCompletionHelper(
- Glyph.OpenFolder,
- completion.AllowableExtensions |> List.tryPick getFileGlyph |> Option.defaultValue Glyph.None,
- Seq.toImmutableArray searchPaths,
- null,
- completion.AllowableExtensions |> Seq.toImmutableArray,
- rules)
+ do! Option.guard (not (isNull snapshot))
+
+ let extraSearchPaths =
+ if completion.UseIncludeDirectives then
+ getIncludeDirectives (text, position)
+ else []
+
+ let defaultSearchPath = Path.GetDirectoryName document.FilePath
+ let searchPaths = defaultSearchPath :: extraSearchPaths
+
+ let helper =
+ FSharpFileSystemCompletionHelper(
+ Glyph.OpenFolder,
+ completion.AllowableExtensions |> List.tryPick getFileGlyph |> Option.defaultValue Glyph.None,
+ Seq.toImmutableArray searchPaths,
+ null,
+ completion.AllowableExtensions |> Seq.toImmutableArray,
+ rules)
- let pathThroughLastSlash = getPathThroughLastSlash(text, position, quotedPathGroup)
- let! items = helper.GetItemsAsync(pathThroughLastSlash, ct) |> Async.AwaitTask |> liftAsync
- context.AddItems(items)
- }
- |> Async.Ignore
- |> RoslynHelpers.StartAsyncUnitAsTask context.CancellationToken
+ let pathThroughLastSlash = getPathThroughLastSlash(text, position, quotedPathGroup)
+ let! items = helper.GetItemsAsync(pathThroughLastSlash, ct) |> Async.AwaitTask |> liftAsync
+ context.AddItems(items)
+ }
+ |> Async.Ignore
+ |> RoslynHelpers.StartAsyncUnitAsTask context.CancellationToken
- override __.IsInsertionTrigger(text, position, _) =
- // Bring up completion when the user types a quote (i.e.: #r "), or if they type a slash
- // path separator character, or if they type a comma (#r "foo,version...").
- // Also, if they're starting a word. i.e. #r "c:\W
- let ch = text.[position]
- let isTriggerChar =
- ch = '"' || ch = '\\' || ch = ',' || ch = '/' ||
- CommonCompletionUtilities.IsStartingNewWord(text, position, (fun x -> Char.IsLetter x), (fun x -> Char.IsLetterOrDigit x))
- isTriggerChar && isInStringLiteral(text, position)
+ member __.IsInsertionTrigger(text, position, _) =
+ // Bring up completion when the user types a quote (i.e.: #r "), or if they type a slash
+ // path separator character, or if they type a comma (#r "foo,version...").
+ // Also, if they're starting a word. i.e. #r "c:\W
+ let ch = text.[position]
+ let isTriggerChar =
+ ch = '"' || ch = '\\' || ch = ',' || ch = '/' ||
+ FSharpCommonCompletionUtilities.IsStartingNewWord(text, position, (fun x -> Char.IsLetter x), (fun x -> Char.IsLetterOrDigit x))
+ isTriggerChar && isInStringLiteral(text, position)
- override __.GetTextChangeAsync(selectedItem, ch, cancellationToken) =
- // When we commit "\\" when the user types \ we have to adjust for the fact that the
- // controller will automatically append \ after we commit. Because of that, we don't
- // want to actually commit "\\" as we'll end up with "\\\". So instead we just commit
- // "\" and know that controller will append "\" and give us "\\".
- if selectedItem.DisplayText = NetworkPath && ch = Nullable '\\' then
- Task.FromResult(Nullable(TextChange(selectedItem.Span, "\\")))
- else
- base.GetTextChangeAsync(selectedItem, ch, cancellationToken)
\ No newline at end of file
+ member __.GetTextChangeAsync(baseGetTextChangeAsync, selectedItem, ch, cancellationToken) =
+ // When we commit "\\" when the user types \ we have to adjust for the fact that the
+ // controller will automatically append \ after we commit. Because of that, we don't
+ // want to actually commit "\\" as we'll end up with "\\\". So instead we just commit
+ // "\" and know that controller will append "\" and give us "\\".
+ if selectedItem.DisplayText = NetworkPath && ch = Nullable '\\' then
+ Task.FromResult(Nullable(TextChange(selectedItem.Span, "\\")))
+ else
+ baseGetTextChangeAsync.Invoke(selectedItem, ch, cancellationToken)
\ No newline at end of file
diff --git a/vsintegration/src/FSharp.Editor/Completion/SignatureHelp.fs b/vsintegration/src/FSharp.Editor/Completion/SignatureHelp.fs
index 288feb97870..cde4f1d22dd 100644
--- a/vsintegration/src/FSharp.Editor/Completion/SignatureHelp.fs
+++ b/vsintegration/src/FSharp.Editor/Completion/SignatureHelp.fs
@@ -9,6 +9,7 @@ open System.Collections.Generic
open Microsoft.CodeAnalysis
open Microsoft.CodeAnalysis.SignatureHelp
open Microsoft.CodeAnalysis.Text
+open Microsoft.CodeAnalysis.ExternalAccess.FSharp.SignatureHelp
open Microsoft.VisualStudio.Text
open Microsoft.VisualStudio.Shell
@@ -19,7 +20,7 @@ open FSharp.Compiler.Range
open FSharp.Compiler.SourceCodeServices
[]
-[]
+[)>]
type internal FSharpSignatureHelpProvider
[]
(
@@ -188,7 +189,7 @@ type internal FSharpSignatureHelpProvider
return Some items
}
- interface ISignatureHelpProvider with
+ interface IFSharpSignatureHelpProvider with
member this.IsTriggerCharacter(c) = c ='(' || c = '<' || c = ','
member this.IsRetriggerCharacter(c) = c = ')' || c = '>' || c = '='
@@ -200,7 +201,7 @@ type internal FSharpSignatureHelpProvider
let! textVersion = document.GetTextVersionAsync(cancellationToken)
let triggerTypedChar =
- if triggerInfo.TriggerCharacter.HasValue && triggerInfo.TriggerReason = SignatureHelpTriggerReason.TypeCharCommand then
+ if triggerInfo.TriggerCharacter.HasValue && triggerInfo.TriggerReason = FSharpSignatureHelpTriggerReason.TypeCharCommand then
Some triggerInfo.TriggerCharacter.Value
else None
@@ -211,27 +212,13 @@ type internal FSharpSignatureHelpProvider
|> Array.map (fun (hasParamArrayArg, doc, prefixParts, separatorParts, suffixParts, parameters, descriptionParts) ->
let parameters = parameters
|> Array.map (fun (paramName, isOptional, _typeText, paramDoc, displayParts) ->
- SignatureHelpParameter(paramName,isOptional,documentationFactory=(fun _ -> paramDoc :> seq<_>),displayParts=displayParts))
- SignatureHelpItem(isVariadic=hasParamArrayArg, documentationFactory=(fun _ -> doc :> seq<_>),prefixParts=prefixParts,separatorParts=separatorParts,suffixParts=suffixParts,parameters=parameters,descriptionParts=descriptionParts))
+ FSharpSignatureHelpParameter(paramName,isOptional,documentationFactory=(fun _ -> paramDoc :> seq<_>),displayParts=displayParts))
+ FSharpSignatureHelpItem(isVariadic=hasParamArrayArg, documentationFactory=(fun _ -> doc :> seq<_>),prefixParts=prefixParts,separatorParts=separatorParts,suffixParts=suffixParts,parameters=parameters,descriptionParts=descriptionParts))
- return SignatureHelpItems(items,applicableSpan,argumentIndex,argumentCount,Option.toObj argumentName)
+ return FSharpSignatureHelpItems(items,applicableSpan,argumentIndex,argumentCount,Option.toObj argumentName)
with ex ->
Assert.Exception(ex)
return! None
}
|> Async.map Option.toObj
|> RoslynHelpers.StartAsyncAsTask cancellationToken
-
-open System.ComponentModel.Composition
-open Microsoft.VisualStudio.Utilities
-open Microsoft.VisualStudio.Text.Classification
-open Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.SignatureHelp.Presentation
-
-// Enable colorized signature help for F# buffers
-
-[)>]
-[]
-type internal FSharpSignatureHelpClassifierProvider [] (typeMap) =
- interface IClassifierProvider with
- override __.GetClassifier (buffer: ITextBuffer) =
- buffer.Properties.GetOrCreateSingletonProperty(fun _ -> SignatureHelpClassifier(buffer, typeMap) :> _)
diff --git a/vsintegration/src/FSharp.Editor/Diagnostics/DocumentDiagnosticAnalyzer.fs b/vsintegration/src/FSharp.Editor/Diagnostics/DocumentDiagnosticAnalyzer.fs
index 44b94805950..273e0bad4b6 100644
--- a/vsintegration/src/FSharp.Editor/Diagnostics/DocumentDiagnosticAnalyzer.fs
+++ b/vsintegration/src/FSharp.Editor/Diagnostics/DocumentDiagnosticAnalyzer.fs
@@ -3,6 +3,7 @@
namespace Microsoft.VisualStudio.FSharp.Editor
open System
+open System.Composition
open System.Collections.Immutable
open System.Collections.Generic
open System.Threading
@@ -11,6 +12,7 @@ open System.Threading.Tasks
open Microsoft.CodeAnalysis
open Microsoft.CodeAnalysis.Diagnostics
open Microsoft.CodeAnalysis.Text
+open Microsoft.CodeAnalysis.Host.Mef
open Microsoft.CodeAnalysis.ExternalAccess.FSharp.Diagnostics
open FSharp.Compiler
@@ -22,9 +24,8 @@ type internal DiagnosticsType =
| Syntax
| Semantic
-[]
-type internal FSharpDocumentDiagnosticAnalyzer() =
- inherit DocumentDiagnosticAnalyzer()
+[)>]
+type internal FSharpDocumentDiagnosticAnalyzer [] () =
static let userOpName = "DocumentDiagnosticAnalyzer"
let getChecker(document: Document) =
@@ -106,40 +107,33 @@ type internal FSharpDocumentDiagnosticAnalyzer() =
return results
}
- override __.Priority = 10 // Default = 50
+ interface IFSharpDocumentDiagnosticAnalyzer with
- override this.SupportedDiagnostics = RoslynHelpers.SupportedDiagnostics()
-
- override this.AnalyzeSyntaxAsync(document: Document, cancellationToken: CancellationToken): Task> =
- let projectInfoManager = getProjectInfoManager document
- asyncMaybe {
- let! parsingOptions, projectOptions = projectInfoManager.TryGetOptionsForEditingDocumentOrProject(document, cancellationToken)
- let! sourceText = document.GetTextAsync(cancellationToken)
- let! textVersion = document.GetTextVersionAsync(cancellationToken)
- return!
- FSharpDocumentDiagnosticAnalyzer.GetDiagnostics(getChecker document, document.FilePath, sourceText, textVersion.GetHashCode(), parsingOptions, projectOptions, DiagnosticsType.Syntax)
- |> liftAsync
- }
- |> Async.map (Option.defaultValue ImmutableArray.Empty)
- |> RoslynHelpers.StartAsyncAsTask cancellationToken
-
- override this.AnalyzeSemanticsAsync(document: Document, cancellationToken: CancellationToken): Task> =
- let projectInfoManager = getProjectInfoManager document
- asyncMaybe {
- let! parsingOptions, _, projectOptions = projectInfoManager.TryGetOptionsForDocumentOrProject(document, cancellationToken)
- let! sourceText = document.GetTextAsync(cancellationToken)
- let! textVersion = document.GetTextVersionAsync(cancellationToken)
- if document.Project.Name <> FSharpConstants.FSharpMiscellaneousFilesName || isScriptFile document.FilePath then
+ member this.AnalyzeSyntaxAsync(document: Document, cancellationToken: CancellationToken): Task> =
+ let projectInfoManager = getProjectInfoManager document
+ asyncMaybe {
+ let! parsingOptions, projectOptions = projectInfoManager.TryGetOptionsForEditingDocumentOrProject(document, cancellationToken)
+ let! sourceText = document.GetTextAsync(cancellationToken)
+ let! textVersion = document.GetTextVersionAsync(cancellationToken)
return!
- FSharpDocumentDiagnosticAnalyzer.GetDiagnostics(getChecker document, document.FilePath, sourceText, textVersion.GetHashCode(), parsingOptions, projectOptions, DiagnosticsType.Semantic)
+ FSharpDocumentDiagnosticAnalyzer.GetDiagnostics(getChecker document, document.FilePath, sourceText, textVersion.GetHashCode(), parsingOptions, projectOptions, DiagnosticsType.Syntax)
|> liftAsync
- else
- return ImmutableArray.Empty
- }
- |> Async.map (Option.defaultValue ImmutableArray.Empty)
- |> RoslynHelpers.StartAsyncAsTask cancellationToken
-
- interface IBuiltInAnalyzer with
- member __.GetAnalyzerCategory() : DiagnosticAnalyzerCategory = DiagnosticAnalyzerCategory.SemanticDocumentAnalysis
- member __.OpenFileOnly _ = true
-
+ }
+ |> Async.map (Option.defaultValue ImmutableArray.Empty)
+ |> RoslynHelpers.StartAsyncAsTask cancellationToken
+
+ member this.AnalyzeSemanticsAsync(document: Document, cancellationToken: CancellationToken): Task> =
+ let projectInfoManager = getProjectInfoManager document
+ asyncMaybe {
+ let! parsingOptions, _, projectOptions = projectInfoManager.TryGetOptionsForDocumentOrProject(document, cancellationToken)
+ let! sourceText = document.GetTextAsync(cancellationToken)
+ let! textVersion = document.GetTextVersionAsync(cancellationToken)
+ if document.Project.Name <> FSharpConstants.FSharpMiscellaneousFilesName || isScriptFile document.FilePath then
+ return!
+ FSharpDocumentDiagnosticAnalyzer.GetDiagnostics(getChecker document, document.FilePath, sourceText, textVersion.GetHashCode(), parsingOptions, projectOptions, DiagnosticsType.Semantic)
+ |> liftAsync
+ else
+ return ImmutableArray.Empty
+ }
+ |> Async.map (Option.defaultValue ImmutableArray.Empty)
+ |> RoslynHelpers.StartAsyncAsTask cancellationToken
diff --git a/vsintegration/src/FSharp.Editor/Diagnostics/ProjectDiagnosticAnalyzer.fs b/vsintegration/src/FSharp.Editor/Diagnostics/ProjectDiagnosticAnalyzer.fs
index 9b67e11819f..544039aa36a 100644
--- a/vsintegration/src/FSharp.Editor/Diagnostics/ProjectDiagnosticAnalyzer.fs
+++ b/vsintegration/src/FSharp.Editor/Diagnostics/ProjectDiagnosticAnalyzer.fs
@@ -14,20 +14,20 @@ open Microsoft.CodeAnalysis.Diagnostics
open Microsoft.CodeAnalysis.Host.Mef
open Microsoft.CodeAnalysis.Text
open Microsoft.CodeAnalysis.SolutionCrawler
+open Microsoft.CodeAnalysis.ExternalAccess.FSharp.Diagnostics
open FSharp.Compiler
open FSharp.Compiler.SourceCodeServices
open FSharp.Compiler.Range
-#if PROJECT_ANALYSIS
// Project-wide error analysis. We don't enable this because ParseAndCheckProject checks projects against the versions of the files
// saves to the file system. This is different to the versions of the files active in the editor. This results in out-of-sync error
// messages while files are being edited
-[]
-type internal FSharpProjectDiagnosticAnalyzer() =
- inherit ProjectDiagnosticAnalyzer()
+[)>]
+type internal FSharpProjectDiagnosticAnalyzer [] () =
+#if PROJECT_ANALYSIS
static member GetDiagnostics(options: FSharpProjectOptions) = async {
let! checkProjectResults = FSharpLanguageService.Checker.ParseAndCheckProject(options)
let results =
@@ -42,13 +42,17 @@ type internal FSharpProjectDiagnosticAnalyzer() =
|> Seq.toImmutableArray
return results
}
-
- override this.SupportedDiagnostics = CommonRoslynHelpers.SupportedDiagnostics()
-
- override this.AnalyzeProjectAsync(project: Project, cancellationToken: CancellationToken): Task> =
- async {
- match FSharpLanguageService.GetOptionsForProject(project.Id) with
- | Some options -> return! FSharpProjectDiagnosticAnalyzer.GetDiagnostics(options)
- | None -> return ImmutableArray.Empty
- } |> CommonRoslynHelpers.StartAsyncAsTask cancellationToken
+#endif
+
+ interface IFSharpProjectDiagnosticAnalyzer with
+
+ member this.AnalyzeProjectAsync(_project: Project, _cancellationToken: CancellationToken): Task> =
+#if PROJECT_ANALYSIS
+ async {
+ match FSharpLanguageService.GetOptionsForProject(project.Id) with
+ | Some options -> return! FSharpProjectDiagnosticAnalyzer.GetDiagnostics(options)
+ | None -> return ImmutableArray.Empty
+ } |> CommonRoslynHelpers.StartAsyncAsTask cancellationToken
+#else
+ Task.FromResult(ImmutableArray.Empty)
#endif
diff --git a/vsintegration/src/FSharp.Editor/Diagnostics/SimplifyNameDiagnosticAnalyzer.fs b/vsintegration/src/FSharp.Editor/Diagnostics/SimplifyNameDiagnosticAnalyzer.fs
index 97235c0f1e0..f90717522a5 100644
--- a/vsintegration/src/FSharp.Editor/Diagnostics/SimplifyNameDiagnosticAnalyzer.fs
+++ b/vsintegration/src/FSharp.Editor/Diagnostics/SimplifyNameDiagnosticAnalyzer.fs
@@ -3,6 +3,7 @@
namespace rec Microsoft.VisualStudio.FSharp.Editor
open System
+open System.Composition
open System.Collections.Immutable
open System.Diagnostics
open System.Threading
@@ -13,15 +14,15 @@ open Microsoft.CodeAnalysis.Diagnostics
open FSharp.Compiler
open FSharp.Compiler.Range
open System.Runtime.Caching
+open Microsoft.CodeAnalysis.Host.Mef
open Microsoft.CodeAnalysis.ExternalAccess.FSharp.Diagnostics
type private TextVersionHash = int
type private PerDocumentSavedData = { Hash: int; Diagnostics: ImmutableArray }
-[]
-type internal SimplifyNameDiagnosticAnalyzer() =
- inherit DocumentDiagnosticAnalyzer()
-
+[)>]
+type internal SimplifyNameDiagnosticAnalyzer [] () =
+
static let userOpName = "SimplifyNameDiagnosticAnalyzer"
let getProjectInfoManager (document: Document) = document.Project.Solution.Workspace.Services.GetService().FSharpProjectOptionsManager
let getChecker (document: Document) = document.Project.Solution.Workspace.Services.GetService().Checker
@@ -30,105 +31,90 @@ type internal SimplifyNameDiagnosticAnalyzer() =
// Make sure only one document is being analyzed at a time, to be nice
static let guard = new SemaphoreSlim(1)
- static let Descriptor =
- DiagnosticDescriptor(
- id = IDEDiagnosticIds.SimplifyNamesDiagnosticId,
- title = SR.SimplifyName(),
- messageFormat = SR.NameCanBeSimplified(),
- category = DiagnosticCategory.Style,
- defaultSeverity = DiagnosticSeverity.Hidden,
- isEnabledByDefault = true,
- customTags = FSharpDiagnosticCustomTags.Unnecessary)
-
static member LongIdentPropertyKey = "FullName"
- override __.Priority = 100 // Default = 50
- override __.SupportedDiagnostics = ImmutableArray.Create Descriptor
- override this.AnalyzeSyntaxAsync(_, _) = Task.FromResult ImmutableArray.Empty
- override this.AnalyzeSemanticsAsync(document: Document, cancellationToken: CancellationToken) =
- asyncMaybe {
- do! Option.guard document.FSharpOptions.CodeFixes.SimplifyName
- do Trace.TraceInformation("{0:n3} (start) SimplifyName", DateTime.Now.TimeOfDay.TotalSeconds)
- do! Async.Sleep DefaultTuning.SimplifyNameInitialDelay |> liftAsync
- let! _parsingOptions, projectOptions = getProjectInfoManager(document).TryGetOptionsForEditingDocumentOrProject(document, cancellationToken)
- let! textVersion = document.GetTextVersionAsync(cancellationToken)
- let textVersionHash = textVersion.GetHashCode()
- let! _ = guard.WaitAsync(cancellationToken) |> Async.AwaitTask |> liftAsync
- try
- let key = document.Id.ToString()
- match cache.Get(key) with
- | :? PerDocumentSavedData as data when data.Hash = textVersionHash -> return data.Diagnostics
- | _ ->
- let! sourceText = document.GetTextAsync()
- let checker = getChecker document
- let! _, _, checkResults = checker.ParseAndCheckDocument(document, projectOptions, sourceText = sourceText, userOpName=userOpName)
- let! symbolUses = checkResults.GetAllUsesOfAllSymbolsInFile() |> liftAsync
- let mutable result = ResizeArray()
- let symbolUses =
- symbolUses
- |> Array.filter (fun symbolUse -> not symbolUse.IsFromOpenStatement)
- |> Array.Parallel.map (fun symbolUse ->
- let lineStr = sourceText.Lines.[Line.toZ symbolUse.RangeAlternate.StartLine].ToString()
- // for `System.DateTime.Now` it returns ([|"System"; "DateTime"|], "Now")
- let partialName = QuickParse.GetPartialLongNameEx(lineStr, symbolUse.RangeAlternate.EndColumn - 1)
- // `symbolUse.RangeAlternate.Start` does not point to the start of plid, it points to start of `name`,
- // so we have to calculate plid's start ourselves.
- let plidStartCol = symbolUse.RangeAlternate.EndColumn - partialName.PartialIdent.Length - (getPlidLength partialName.QualifyingIdents)
- symbolUse, partialName.QualifyingIdents, plidStartCol, partialName.PartialIdent)
- |> Array.filter (fun (_, plid, _, name) -> name <> "" && not (List.isEmpty plid))
- |> Array.groupBy (fun (symbolUse, _, plidStartCol, _) -> symbolUse.RangeAlternate.StartLine, plidStartCol)
- |> Array.map (fun (_, xs) -> xs |> Array.maxBy (fun (symbolUse, _, _, _) -> symbolUse.RangeAlternate.EndColumn))
+ interface IFSharpSimplifyNameDiagnosticAnalyzer with
+
+ member this.AnalyzeSemanticsAsync(descriptor, document: Document, cancellationToken: CancellationToken) =
+ asyncMaybe {
+ do! Option.guard document.FSharpOptions.CodeFixes.SimplifyName
+ do Trace.TraceInformation("{0:n3} (start) SimplifyName", DateTime.Now.TimeOfDay.TotalSeconds)
+ do! Async.Sleep DefaultTuning.SimplifyNameInitialDelay |> liftAsync
+ let! _parsingOptions, projectOptions = getProjectInfoManager(document).TryGetOptionsForEditingDocumentOrProject(document, cancellationToken)
+ let! textVersion = document.GetTextVersionAsync(cancellationToken)
+ let textVersionHash = textVersion.GetHashCode()
+ let! _ = guard.WaitAsync(cancellationToken) |> Async.AwaitTask |> liftAsync
+ try
+ let key = document.Id.ToString()
+ match cache.Get(key) with
+ | :? PerDocumentSavedData as data when data.Hash = textVersionHash -> return data.Diagnostics
+ | _ ->
+ let! sourceText = document.GetTextAsync()
+ let checker = getChecker document
+ let! _, _, checkResults = checker.ParseAndCheckDocument(document, projectOptions, sourceText = sourceText, userOpName=userOpName)
+ let! symbolUses = checkResults.GetAllUsesOfAllSymbolsInFile() |> liftAsync
+ let mutable result = ResizeArray()
+ let symbolUses =
+ symbolUses
+ |> Array.filter (fun symbolUse -> not symbolUse.IsFromOpenStatement)
+ |> Array.Parallel.map (fun symbolUse ->
+ let lineStr = sourceText.Lines.[Line.toZ symbolUse.RangeAlternate.StartLine].ToString()
+ // for `System.DateTime.Now` it returns ([|"System"; "DateTime"|], "Now")
+ let partialName = QuickParse.GetPartialLongNameEx(lineStr, symbolUse.RangeAlternate.EndColumn - 1)
+ // `symbolUse.RangeAlternate.Start` does not point to the start of plid, it points to start of `name`,
+ // so we have to calculate plid's start ourselves.
+ let plidStartCol = symbolUse.RangeAlternate.EndColumn - partialName.PartialIdent.Length - (getPlidLength partialName.QualifyingIdents)
+ symbolUse, partialName.QualifyingIdents, plidStartCol, partialName.PartialIdent)
+ |> Array.filter (fun (_, plid, _, name) -> name <> "" && not (List.isEmpty plid))
+ |> Array.groupBy (fun (symbolUse, _, plidStartCol, _) -> symbolUse.RangeAlternate.StartLine, plidStartCol)
+ |> Array.map (fun (_, xs) -> xs |> Array.maxBy (fun (symbolUse, _, _, _) -> symbolUse.RangeAlternate.EndColumn))
- for symbolUse, plid, plidStartCol, name in symbolUses do
- if not symbolUse.IsFromDefinition then
- let posAtStartOfName =
- let r = symbolUse.RangeAlternate
- if r.StartLine = r.EndLine then Range.mkPos r.StartLine (r.EndColumn - name.Length)
- else r.Start
+ for symbolUse, plid, plidStartCol, name in symbolUses do
+ if not symbolUse.IsFromDefinition then
+ let posAtStartOfName =
+ let r = symbolUse.RangeAlternate
+ if r.StartLine = r.EndLine then Range.mkPos r.StartLine (r.EndColumn - name.Length)
+ else r.Start
- let getNecessaryPlid (plid: string list) : Async =
- let rec loop (rest: string list) (current: string list) =
- async {
- match rest with
- | [] -> return current
- | headIdent :: restPlid ->
- let! res = checkResults.IsRelativeNameResolvableFromSymbol(posAtStartOfName, current, symbolUse.Symbol, userOpName=userOpName)
- if res then return current
- else return! loop restPlid (headIdent :: current)
- }
- loop (List.rev plid) []
+ let getNecessaryPlid (plid: string list) : Async =
+ let rec loop (rest: string list) (current: string list) =
+ async {
+ match rest with
+ | [] -> return current
+ | headIdent :: restPlid ->
+ let! res = checkResults.IsRelativeNameResolvableFromSymbol(posAtStartOfName, current, symbolUse.Symbol, userOpName=userOpName)
+ if res then return current
+ else return! loop restPlid (headIdent :: current)
+ }
+ loop (List.rev plid) []
- do! Async.Sleep DefaultTuning.SimplifyNameEachItemDelay |> liftAsync // be less intrusive, give other work priority most of the time
- let! necessaryPlid = getNecessaryPlid plid |> liftAsync
+ do! Async.Sleep DefaultTuning.SimplifyNameEachItemDelay |> liftAsync // be less intrusive, give other work priority most of the time
+ let! necessaryPlid = getNecessaryPlid plid |> liftAsync
- match necessaryPlid with
- | necessaryPlid when necessaryPlid = plid -> ()
- | necessaryPlid ->
- let r = symbolUse.RangeAlternate
- let necessaryPlidStartCol = r.EndColumn - name.Length - (getPlidLength necessaryPlid)
+ match necessaryPlid with
+ | necessaryPlid when necessaryPlid = plid -> ()
+ | necessaryPlid ->
+ let r = symbolUse.RangeAlternate
+ let necessaryPlidStartCol = r.EndColumn - name.Length - (getPlidLength necessaryPlid)
- let unnecessaryRange =
- Range.mkRange r.FileName (Range.mkPos r.StartLine plidStartCol) (Range.mkPos r.EndLine necessaryPlidStartCol)
+ let unnecessaryRange =
+ Range.mkRange r.FileName (Range.mkPos r.StartLine plidStartCol) (Range.mkPos r.EndLine necessaryPlidStartCol)
- let relativeName = (String.concat "." plid) + "." + name
- result.Add(
- Diagnostic.Create(
- Descriptor,
- RoslynHelpers.RangeToLocation(unnecessaryRange, sourceText, document.FilePath),
- properties = (dict [SimplifyNameDiagnosticAnalyzer.LongIdentPropertyKey, relativeName]).ToImmutableDictionary()))
+ let relativeName = (String.concat "." plid) + "." + name
+ result.Add(
+ Diagnostic.Create(
+ descriptor,
+ RoslynHelpers.RangeToLocation(unnecessaryRange, sourceText, document.FilePath),
+ properties = (dict [SimplifyNameDiagnosticAnalyzer.LongIdentPropertyKey, relativeName]).ToImmutableDictionary()))
- let diagnostics = result.ToImmutableArray()
- cache.Remove(key) |> ignore
- let data = { Hash = textVersionHash; Diagnostics=diagnostics }
- let cacheItem = CacheItem(key, data)
- let policy = CacheItemPolicy(SlidingExpiration=DefaultTuning.PerDocumentSavedDataSlidingWindow)
- cache.Set(cacheItem, policy)
- return diagnostics
- finally guard.Release() |> ignore
- }
- |> Async.map (Option.defaultValue ImmutableArray.Empty)
- |> RoslynHelpers.StartAsyncAsTask cancellationToken
-
- interface IBuiltInAnalyzer with
- member __.OpenFileOnly _ = true
- member __.GetAnalyzerCategory() = DiagnosticAnalyzerCategory.SemanticDocumentAnalysis
\ No newline at end of file
+ let diagnostics = result.ToImmutableArray()
+ cache.Remove(key) |> ignore
+ let data = { Hash = textVersionHash; Diagnostics=diagnostics }
+ let cacheItem = CacheItem(key, data)
+ let policy = CacheItemPolicy(SlidingExpiration=DefaultTuning.PerDocumentSavedDataSlidingWindow)
+ cache.Set(cacheItem, policy)
+ return diagnostics
+ finally guard.Release() |> ignore
+ }
+ |> Async.map (Option.defaultValue ImmutableArray.Empty)
+ |> RoslynHelpers.StartAsyncAsTask cancellationToken
diff --git a/vsintegration/src/FSharp.Editor/Diagnostics/UnusedDeclarationsAnalyzer.fs b/vsintegration/src/FSharp.Editor/Diagnostics/UnusedDeclarationsAnalyzer.fs
index 58b1b139ff0..ff7c43839d0 100644
--- a/vsintegration/src/FSharp.Editor/Diagnostics/UnusedDeclarationsAnalyzer.fs
+++ b/vsintegration/src/FSharp.Editor/Diagnostics/UnusedDeclarationsAnalyzer.fs
@@ -3,6 +3,7 @@
namespace rec Microsoft.VisualStudio.FSharp.Editor
open System
+open System.Composition
open System.Collections.Generic
open System.Collections.Immutable
open System.Diagnostics
@@ -10,27 +11,16 @@ open System.Threading.Tasks
open Microsoft.CodeAnalysis
open Microsoft.CodeAnalysis.Diagnostics
+open Microsoft.CodeAnalysis.Host.Mef
open FSharp.Compiler.SourceCodeServices
open Microsoft.CodeAnalysis.ExternalAccess.FSharp.Diagnostics
-[]
-type internal UnusedDeclarationsAnalyzer() =
- inherit DocumentDiagnosticAnalyzer()
+[)>]
+type internal UnusedDeclarationsAnalyzer [] () =
static let userOpName = "UnusedDeclarationsAnalyzer"
let getProjectInfoManager (document: Document) = document.Project.Solution.Workspace.Services.GetService().FSharpProjectOptionsManager
let getChecker (document: Document) = document.Project.Solution.Workspace.Services.GetService().Checker
- let [] DescriptorId = "FS1182"
-
- let Descriptor =
- DiagnosticDescriptor(
- id = DescriptorId,
- title = SR.TheValueIsUnused(),
- messageFormat = SR.TheValueIsUnused(),
- category = DiagnosticCategory.Style,
- defaultSeverity = DiagnosticSeverity.Hidden,
- isEnabledByDefault = true,
- customTags = FSharpDiagnosticCustomTags.Unnecessary)
let isPotentiallyUnusedDeclaration (symbol: FSharpSymbol) : bool =
match symbol with
@@ -95,33 +85,25 @@ type internal UnusedDeclarationsAnalyzer() =
//#endif
unusedRanges
- override __.Priority = 80 // Default = 50
-
- override __.SupportedDiagnostics = ImmutableArray.Create Descriptor
-
- override __.AnalyzeSyntaxAsync(_, _) = Task.FromResult ImmutableArray.Empty
-
- override __.AnalyzeSemanticsAsync(document, cancellationToken) =
- asyncMaybe {
- do! Option.guard document.FSharpOptions.CodeFixes.UnusedDeclarations
+ interface IFSharpUnusedDeclarationsDiagnosticAnalyzer with
- do Trace.TraceInformation("{0:n3} (start) UnusedDeclarationsAnalyzer", DateTime.Now.TimeOfDay.TotalSeconds)
- do! Async.Sleep DefaultTuning.UnusedDeclarationsAnalyzerInitialDelay |> liftAsync // be less intrusive, give other work priority most of the time
- match! getProjectInfoManager(document).TryGetOptionsForEditingDocumentOrProject(document, cancellationToken) with
- | (_parsingOptions, projectOptions) ->
- let! sourceText = document.GetTextAsync()
- let checker = getChecker document
- let! _, _, checkResults = checker.ParseAndCheckDocument(document, projectOptions, sourceText = sourceText, userOpName = userOpName)
- let! allSymbolUsesInFile = checkResults.GetAllUsesOfAllSymbolsInFile() |> liftAsync
- let unusedRanges = getUnusedDeclarationRanges allSymbolUsesInFile (isScriptFile document.FilePath)
- return
- unusedRanges
- |> Seq.map (fun m -> Diagnostic.Create(Descriptor, RoslynHelpers.RangeToLocation(m, sourceText, document.FilePath)))
- |> Seq.toImmutableArray
- }
- |> Async.map (Option.defaultValue ImmutableArray.Empty)
- |> RoslynHelpers.StartAsyncAsTask cancellationToken
+ member __.AnalyzeSemanticsAsync(descriptor, document, cancellationToken) =
+ asyncMaybe {
+ do! Option.guard document.FSharpOptions.CodeFixes.UnusedDeclarations
- interface IBuiltInAnalyzer with
- member __.OpenFileOnly _ = true
- member __.GetAnalyzerCategory() = DiagnosticAnalyzerCategory.SemanticDocumentAnalysis
\ No newline at end of file
+ do Trace.TraceInformation("{0:n3} (start) UnusedDeclarationsAnalyzer", DateTime.Now.TimeOfDay.TotalSeconds)
+ do! Async.Sleep DefaultTuning.UnusedDeclarationsAnalyzerInitialDelay |> liftAsync // be less intrusive, give other work priority most of the time
+ match! getProjectInfoManager(document).TryGetOptionsForEditingDocumentOrProject(document, cancellationToken) with
+ | (_parsingOptions, projectOptions) ->
+ let! sourceText = document.GetTextAsync()
+ let checker = getChecker document
+ let! _, _, checkResults = checker.ParseAndCheckDocument(document, projectOptions, sourceText = sourceText, userOpName = userOpName)
+ let! allSymbolUsesInFile = checkResults.GetAllUsesOfAllSymbolsInFile() |> liftAsync
+ let unusedRanges = getUnusedDeclarationRanges allSymbolUsesInFile (isScriptFile document.FilePath)
+ return
+ unusedRanges
+ |> Seq.map (fun m -> Diagnostic.Create(descriptor, RoslynHelpers.RangeToLocation(m, sourceText, document.FilePath)))
+ |> Seq.toImmutableArray
+ }
+ |> Async.map (Option.defaultValue ImmutableArray.Empty)
+ |> RoslynHelpers.StartAsyncAsTask cancellationToken
diff --git a/vsintegration/src/FSharp.Editor/Diagnostics/UnusedOpensDiagnosticAnalyzer.fs b/vsintegration/src/FSharp.Editor/Diagnostics/UnusedOpensDiagnosticAnalyzer.fs
index b94f0ca09a9..c79027b0dff 100644
--- a/vsintegration/src/FSharp.Editor/Diagnostics/UnusedOpensDiagnosticAnalyzer.fs
+++ b/vsintegration/src/FSharp.Editor/Diagnostics/UnusedOpensDiagnosticAnalyzer.fs
@@ -3,6 +3,7 @@
namespace Microsoft.VisualStudio.FSharp.Editor
open System
+open System.Composition
open System.Collections.Immutable
open System.Diagnostics
open System.Threading
@@ -16,29 +17,16 @@ open FSharp.Compiler.Ast
open FSharp.Compiler.Range
open FSharp.Compiler.SourceCodeServices
open Microsoft.VisualStudio.FSharp.Editor.Symbols
+open Microsoft.CodeAnalysis.Host.Mef
open Microsoft.CodeAnalysis.ExternalAccess.FSharp.Diagnostics
-[]
-type internal UnusedOpensDiagnosticAnalyzer() =
- inherit DocumentDiagnosticAnalyzer()
-
+[)>]
+type internal UnusedOpensDiagnosticAnalyzer [] () =
+
let getProjectInfoManager (document: Document) = document.Project.Solution.Workspace.Services.GetService().FSharpProjectOptionsManager
let getChecker (document: Document) = document.Project.Solution.Workspace.Services.GetService().Checker
static let userOpName = "UnusedOpensAnalyzer"
- static let Descriptor =
- DiagnosticDescriptor(
- id = IDEDiagnosticIds.RemoveUnnecessaryImportsDiagnosticId,
- title = SR.RemoveUnusedOpens(),
- messageFormat = SR.UnusedOpens(),
- category = DiagnosticCategory.Style,
- defaultSeverity = DiagnosticSeverity.Hidden,
- isEnabledByDefault = true,
- customTags = FSharpDiagnosticCustomTags.Unnecessary)
-
- override __.Priority = 90 // Default = 50
- override __.SupportedDiagnostics = ImmutableArray.Create Descriptor
- override this.AnalyzeSyntaxAsync(_, _) = Task.FromResult ImmutableArray.Empty
static member GetUnusedOpenRanges(document: Document, options, checker: FSharpChecker) : Async{0} x {1}
- {0} x {1}
+ {0} x {1}Format string for showing a graphic's size
-
# {0} = width (as an integer)
# {1} = height (as an integer)
#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456"
diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.de.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.de.xlf
index 65b4328fdc2..662133483e3 100644
--- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.de.xlf
+++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.de.xlf
@@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom
{0} x {1}
- {0} x {1}
+ {0} x {1}Format string for showing a graphic's size
-
# {0} = width (as an integer)
# {1} = height (as an integer)
#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456"
diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.es.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.es.xlf
index 1153755c3dd..41dbc88f0bd 100644
--- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.es.xlf
+++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.es.xlf
@@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom
{0} x {1}
- {0} x {1}
+ {0} x {1}Format string for showing a graphic's size
-
# {0} = width (as an integer)
# {1} = height (as an integer)
#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456"
diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.fr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.fr.xlf
index cd60e9f07e9..0f1e16e95f2 100644
--- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.fr.xlf
+++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.fr.xlf
@@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom
{0} x {1}
- {0} x {1}
+ {0} x {1}Format string for showing a graphic's size
-
# {0} = width (as an integer)
# {1} = height (as an integer)
#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456"
diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.it.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.it.xlf
index dd58cb9a119..8902030751c 100644
--- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.it.xlf
+++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.it.xlf
@@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom
{0} x {1}
- {0} x {1}
+ {0} x {1}Format string for showing a graphic's size
-
# {0} = width (as an integer)
# {1} = height (as an integer)
#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456"
diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ja.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ja.xlf
index bdb896a5c83..a39e49dfa0d 100644
--- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ja.xlf
+++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ja.xlf
@@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom
{0} x {1}
- {0} x {1}
+ {0} x {1}Format string for showing a graphic's size
-
# {0} = width (as an integer)
# {1} = height (as an integer)
#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456"
diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ko.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ko.xlf
index 6f540b54250..e7191ac3c4a 100644
--- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ko.xlf
+++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ko.xlf
@@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom
{0} x {1}
- {0} x {1}
+ {0} x {1}Format string for showing a graphic's size
-
# {0} = width (as an integer)
# {1} = height (as an integer)
#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456"
diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pl.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pl.xlf
index 73bef853b9f..d0675bd2fcb 100644
--- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pl.xlf
+++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pl.xlf
@@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom
{0} x {1}
- {0} x {1}
+ {0} x {1}Format string for showing a graphic's size
-
# {0} = width (as an integer)
# {1} = height (as an integer)
#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456"
diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pt-BR.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pt-BR.xlf
index 3e8a1693485..acfade88845 100644
--- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pt-BR.xlf
+++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pt-BR.xlf
@@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom
{0} x {1}
- {0} x {1}
+ {0} x {1}Format string for showing a graphic's size
-
# {0} = width (as an integer)
# {1} = height (as an integer)
#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456"
diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ru.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ru.xlf
index 2b5303d91de..355d363084e 100644
--- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ru.xlf
+++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ru.xlf
@@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom
{0} x {1}
- {0} x {1}
+ {0} x {1}Format string for showing a graphic's size
-
# {0} = width (as an integer)
# {1} = height (as an integer)
#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456"
diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.tr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.tr.xlf
index 73a72b806a2..86ac32f4b37 100644
--- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.tr.xlf
+++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.tr.xlf
@@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom
{0} x {1}
- {0} x {1}
+ {0} x {1}Format string for showing a graphic's size
-
# {0} = width (as an integer)
# {1} = height (as an integer)
#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456"
diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hans.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hans.xlf
index 474f99a3dcd..0537632d5fc 100644
--- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hans.xlf
+++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hans.xlf
@@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom
{0} x {1}
- {0} x {1}
+ {0} x {1}Format string for showing a graphic's size
-
# {0} = width (as an integer)
# {1} = height (as an integer)
#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456"
diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hant.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hant.xlf
index 16b7339b2a4..17c64ffefb9 100644
--- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hant.xlf
+++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hant.xlf
@@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom
{0} x {1}
- {0} x {1}
+ {0} x {1}Format string for showing a graphic's size
-
# {0} = width (as an integer)
# {1} = height (as an integer)
#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456"
diff --git a/vsintegration/src/FSharp.UIResources/AdvancedOptionsControl.xaml b/vsintegration/src/FSharp.UIResources/AdvancedOptionsControl.xaml
index a14d4cbadfb..f8dd82f7d06 100644
--- a/vsintegration/src/FSharp.UIResources/AdvancedOptionsControl.xaml
+++ b/vsintegration/src/FSharp.UIResources/AdvancedOptionsControl.xaml
@@ -24,10 +24,13 @@
+
+
diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.cs.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.cs.xlf
index 9da4f3c87aa..973cdbd6e91 100644
--- a/vsintegration/src/FSharp.UIResources/xlf/Strings.cs.xlf
+++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.cs.xlf
@@ -104,7 +104,7 @@
Text hover
- Text hover
+ Přechod myší nad textem
@@ -199,7 +199,7 @@
(Preview) Use out of process language server
- (Preview) Use out of process language server
+ (Preview) Použít mimoprocesový jazykový server
diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.de.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.de.xlf
index 594bdd6a66d..c2defd7c40c 100644
--- a/vsintegration/src/FSharp.UIResources/xlf/Strings.de.xlf
+++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.de.xlf
@@ -104,7 +104,7 @@
Text hover
- Text hover
+ Texthover
@@ -199,7 +199,7 @@
(Preview) Use out of process language server
- (Preview) Use out of process language server
+ (Vorschauversion) Prozessexternen Sprachserver verwenden
diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.es.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.es.xlf
index 0dd79115a6d..2b0507a438e 100644
--- a/vsintegration/src/FSharp.UIResources/xlf/Strings.es.xlf
+++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.es.xlf
@@ -104,7 +104,7 @@
Text hover
- Text hover
+ Texto al pasar el puntero
@@ -199,7 +199,7 @@
(Preview) Use out of process language server
- (Preview) Use out of process language server
+ (Versión preliminar) Usar el servidor de lenguaje fuera del proceso
diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.fr.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.fr.xlf
index 6cd63471707..423d9c97c81 100644
--- a/vsintegration/src/FSharp.UIResources/xlf/Strings.fr.xlf
+++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.fr.xlf
@@ -104,7 +104,7 @@
Text hover
- Text hover
+ Survol du texte
@@ -199,7 +199,7 @@
(Preview) Use out of process language server
- (Preview) Use out of process language server
+ (Préversion) Utiliser un serveur de langage hors processus
diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.it.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.it.xlf
index a053b865918..a577a1e315c 100644
--- a/vsintegration/src/FSharp.UIResources/xlf/Strings.it.xlf
+++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.it.xlf
@@ -104,7 +104,7 @@
Text hover
- Text hover
+ Passaggio del puntatore sul testo
@@ -199,7 +199,7 @@
(Preview) Use out of process language server
- (Preview) Use out of process language server
+ (Anteprima) Usa server di linguaggio out-of-process
diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.ja.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.ja.xlf
index 444ceb8b6da..de08a58854b 100644
--- a/vsintegration/src/FSharp.UIResources/xlf/Strings.ja.xlf
+++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.ja.xlf
@@ -104,7 +104,7 @@
Text hover
- Text hover
+ テキスト ホバー
@@ -199,7 +199,7 @@
(Preview) Use out of process language server
- (Preview) Use out of process language server
+ (プレビュー) プロセス外言語サーバーの使用
diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.ko.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.ko.xlf
index b8b14271ac4..0651ce96fa7 100644
--- a/vsintegration/src/FSharp.UIResources/xlf/Strings.ko.xlf
+++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.ko.xlf
@@ -104,7 +104,7 @@
Text hover
- Text hover
+ 텍스트 호버
@@ -199,7 +199,7 @@
(Preview) Use out of process language server
- (Preview) Use out of process language server
+ (미리 보기) Out of Process 언어 서버 사용
diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.pl.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.pl.xlf
index e0f43b53d9f..1c6085f8566 100644
--- a/vsintegration/src/FSharp.UIResources/xlf/Strings.pl.xlf
+++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.pl.xlf
@@ -104,7 +104,7 @@
Text hover
- Text hover
+ Najechanie kursorem na tekst
@@ -199,7 +199,7 @@
(Preview) Use out of process language server
- (Preview) Use out of process language server
+ (Wersja zapoznawcza) Korzystanie z serwera języka poza procesem
diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.pt-BR.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.pt-BR.xlf
index a23bcaf79d0..2fca2b08f6b 100644
--- a/vsintegration/src/FSharp.UIResources/xlf/Strings.pt-BR.xlf
+++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.pt-BR.xlf
@@ -104,7 +104,7 @@
Text hover
- Text hover
+ Foco do texto
@@ -199,7 +199,7 @@
(Preview) Use out of process language server
- (Preview) Use out of process language server
+ (Versão Prévia) Usar um servidor de idioma fora do processo
diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.ru.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.ru.xlf
index 8a8a30892ff..de853464359 100644
--- a/vsintegration/src/FSharp.UIResources/xlf/Strings.ru.xlf
+++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.ru.xlf
@@ -104,7 +104,7 @@
Text hover
- Text hover
+ Текст, отображаемый при наведении
@@ -199,7 +199,7 @@
(Preview) Use out of process language server
- (Preview) Use out of process language server
+ (Предварительная версия) Использование сервера языка процессов
diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.tr.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.tr.xlf
index 228bd69b6c7..dd44a1a1b41 100644
--- a/vsintegration/src/FSharp.UIResources/xlf/Strings.tr.xlf
+++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.tr.xlf
@@ -104,7 +104,7 @@
Text hover
- Text hover
+ Metni vurgulama
@@ -199,7 +199,7 @@
(Preview) Use out of process language server
- (Preview) Use out of process language server
+ (Önizleme) İşlem dışı dil sunucusunu kullanma
diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.zh-Hans.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.zh-Hans.xlf
index 0db63d7df1f..ba5c37bf74b 100644
--- a/vsintegration/src/FSharp.UIResources/xlf/Strings.zh-Hans.xlf
+++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.zh-Hans.xlf
@@ -104,7 +104,7 @@
Text hover
- Text hover
+ 文本悬停
@@ -199,7 +199,7 @@
(Preview) Use out of process language server
- (Preview) Use out of process language server
+ (预览)使用进程外语言服务器
diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.zh-Hant.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.zh-Hant.xlf
index ea7c015a9d8..db714fc7bc2 100644
--- a/vsintegration/src/FSharp.UIResources/xlf/Strings.zh-Hant.xlf
+++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.zh-Hant.xlf
@@ -104,7 +104,7 @@
Text hover
- Text hover
+ 文字暫留
@@ -199,7 +199,7 @@
(Preview) Use out of process language server
- (Preview) Use out of process language server
+ (預覽) 使用處理序語言伺服器
diff --git a/vsintegration/tests/GetTypesVS.UnitTests/GetTypesVS.UnitTests.fsproj b/vsintegration/tests/GetTypesVS.UnitTests/GetTypesVS.UnitTests.fsproj
index d44b41fab37..8c70a8c5e0a 100644
--- a/vsintegration/tests/GetTypesVS.UnitTests/GetTypesVS.UnitTests.fsproj
+++ b/vsintegration/tests/GetTypesVS.UnitTests/GetTypesVS.UnitTests.fsproj
@@ -1,4 +1,4 @@
-
+
@@ -24,6 +24,7 @@
+
diff --git a/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj b/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj
index 7b11fb96c6c..7a0bea77017 100644
--- a/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj
+++ b/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj
@@ -253,6 +253,7 @@
+