Skip to content

Commit e9919f8

Browse files
dotnet-botgustybrettfo
authored
Merge master to feature/tasks (#9647)
* Add launchSettings.json to ignore list (#9638) * clarify some comments * make xliff tasks happy again (#9641) * don't auto-resolve types from System.Runtime.WindowsRuntime (#9644) Co-authored-by: Gustavo Leon <1261319+gusty@users.noreply.github.com> Co-authored-by: Brett V. Forsgren <brettfo@microsoft.com>
1 parent 53d072f commit e9919f8

File tree

18 files changed

+225
-5
lines changed

18 files changed

+225
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ scripts/*.patch
5353
/src/fsharp/FSharp.LanguageService.Compiler/pplex.fs
5454
/src/fsharp/FSharp.LanguageService.Compiler/pppars.fs
5555
/src/fsharp/FSharp.LanguageService.Compiler/pppars.fsi
56+
/src/fsharp/*/Properties/launchSettings.json
5657
/vsintegration/src/unittests/Unittests.fsi
5758
/tests/*FSharp_Failures.env
5859
/tests/*FSharp_Failures.lst

src/fsharp/DotNetFrameworkDependencies.fs

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,23 @@ module internal FSharp.Compiler.DotNetFrameworkDependencies
259259
if not (assemblies.ContainsKey(referenceName)) then
260260
try
261261
if File.Exists(path) then
262-
// System.Private.CoreLib doesn't load with reflection
263-
if referenceName = "System.Private.CoreLib" then
262+
match referenceName with
263+
| "System.Runtime.WindowsRuntime"
264+
| "System.Runtime.WindowsRuntime.UI.Xaml" ->
265+
// The Windows compatibility pack included in the runtime contains a reference to
266+
// System.Runtime.WindowsRuntime, but to properly use that type the runtime also needs a
267+
// reference to the Windows.md meta-package, which isn't referenced by default. To avoid
268+
// a bug where types from `Windows, Version=255.255.255.255` can't be found we're going to
269+
// not default include this assembly. It can still be manually referenced if it's needed
270+
// via the System.Runtime.WindowsRuntime NuGet package.
271+
//
272+
// In the future this branch can be removed because WinRT support is being removed from the
273+
// .NET 5 SDK (https://github.com/dotnet/runtime/pull/36715)
274+
()
275+
| "System.Private.CoreLib" ->
276+
// System.Private.CoreLib doesn't load with reflection
264277
assemblies.Add(referenceName, path)
265-
else
278+
| _ ->
266279
try
267280
let asm = System.Reflection.Assembly.LoadFrom(path)
268281
assemblies.Add(referenceName, path)

src/fsharp/LexFilter.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1242,7 +1242,7 @@ type LexFilterImpl (lightSyntaxStatus: LightSyntaxStatus, compilingFsLib, lexer,
12421242
// a TYPE or MODULE. So the lexfilter helps out by looking ahead for these tokens and (1) closing expression contexts and (2) inserting extra 'coming soon' tokens
12431243
// that the expression rules in the FsYacc parser can 'shift' to make progress parsing the incomplete expressions, without using the 'recover' action.
12441244
let insertComingSoonTokens(keywordName, comingSoon, isHere) =
1245-
// compiling the source for FSharp.Core.dll uses crazy syntax like
1245+
// compiling the source for FSharp.Core.dll uses unconventional syntax like
12461246
// (# "unbox.any !0" type ('T) x : 'T #)
12471247
// where the type keyword is used inside an expression, so we must exempt FSharp.Core from some extra failed-parse-diagnostics-recovery-processing of the 'type' keyword
12481248
let mutable effectsToDo = []

src/fsharp/xlf/FSComp.txt.cs.xlf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@
102102
<target state="new">implicit yield</target>
103103
<note />
104104
</trans-unit>
105+
<trans-unit id="featureInterfacesWithMultipleGenericInstantiation">
106+
<source>interfaces with multiple generic instantiation</source>
107+
<target state="new">interfaces with multiple generic instantiation</target>
108+
<note />
109+
</trans-unit>
105110
<trans-unit id="featureNameOf">
106111
<source>nameof</source>
107112
<target state="new">nameof</target>
@@ -302,6 +307,16 @@
302307
<target state="new">Interface member '{0}' does not have a most specific implementation.</target>
303308
<note />
304309
</trans-unit>
310+
<trans-unit id="typrelInterfaceWithConcreteAndVariable">
311+
<source>'{0}' cannot implement the interface '{1}' with the two instantiations '{2}' and '{3}' because they may unify.</source>
312+
<target state="new">'{0}' cannot implement the interface '{1}' with the two instantiations '{2}' and '{3}' because they may unify.</target>
313+
<note />
314+
</trans-unit>
315+
<trans-unit id="typrelInterfaceWithConcreteAndVariableObjectExpression">
316+
<source>You cannot implement the interface '{0}' with the two instantiations '{1}' and '{2}' because they may unify.</source>
317+
<target state="new">You cannot implement the interface '{0}' with the two instantiations '{1}' and '{2}' because they may unify.</target>
318+
<note />
319+
</trans-unit>
305320
<trans-unit id="undefinedNameFieldConstructorOrMemberWhenTypeIsKnown">
306321
<source>The type '{0}' does not define the field, constructor or member '{1}'.</source>
307322
<target state="translated">Typ {0} nedefinuje pole, konstruktor ani člen {1}.</target>

src/fsharp/xlf/FSComp.txt.de.xlf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@
102102
<target state="new">implicit yield</target>
103103
<note />
104104
</trans-unit>
105+
<trans-unit id="featureInterfacesWithMultipleGenericInstantiation">
106+
<source>interfaces with multiple generic instantiation</source>
107+
<target state="new">interfaces with multiple generic instantiation</target>
108+
<note />
109+
</trans-unit>
105110
<trans-unit id="featureNameOf">
106111
<source>nameof</source>
107112
<target state="new">nameof</target>
@@ -302,6 +307,16 @@
302307
<target state="new">Interface member '{0}' does not have a most specific implementation.</target>
303308
<note />
304309
</trans-unit>
310+
<trans-unit id="typrelInterfaceWithConcreteAndVariable">
311+
<source>'{0}' cannot implement the interface '{1}' with the two instantiations '{2}' and '{3}' because they may unify.</source>
312+
<target state="new">'{0}' cannot implement the interface '{1}' with the two instantiations '{2}' and '{3}' because they may unify.</target>
313+
<note />
314+
</trans-unit>
315+
<trans-unit id="typrelInterfaceWithConcreteAndVariableObjectExpression">
316+
<source>You cannot implement the interface '{0}' with the two instantiations '{1}' and '{2}' because they may unify.</source>
317+
<target state="new">You cannot implement the interface '{0}' with the two instantiations '{1}' and '{2}' because they may unify.</target>
318+
<note />
319+
</trans-unit>
305320
<trans-unit id="undefinedNameFieldConstructorOrMemberWhenTypeIsKnown">
306321
<source>The type '{0}' does not define the field, constructor or member '{1}'.</source>
307322
<target state="translated">Der Typ "{0}" definiert nicht das Feld, den Konstruktor oder den Member "{1}".</target>

src/fsharp/xlf/FSComp.txt.es.xlf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@
102102
<target state="new">implicit yield</target>
103103
<note />
104104
</trans-unit>
105+
<trans-unit id="featureInterfacesWithMultipleGenericInstantiation">
106+
<source>interfaces with multiple generic instantiation</source>
107+
<target state="new">interfaces with multiple generic instantiation</target>
108+
<note />
109+
</trans-unit>
105110
<trans-unit id="featureNameOf">
106111
<source>nameof</source>
107112
<target state="new">nameof</target>
@@ -302,6 +307,16 @@
302307
<target state="new">Interface member '{0}' does not have a most specific implementation.</target>
303308
<note />
304309
</trans-unit>
310+
<trans-unit id="typrelInterfaceWithConcreteAndVariable">
311+
<source>'{0}' cannot implement the interface '{1}' with the two instantiations '{2}' and '{3}' because they may unify.</source>
312+
<target state="new">'{0}' cannot implement the interface '{1}' with the two instantiations '{2}' and '{3}' because they may unify.</target>
313+
<note />
314+
</trans-unit>
315+
<trans-unit id="typrelInterfaceWithConcreteAndVariableObjectExpression">
316+
<source>You cannot implement the interface '{0}' with the two instantiations '{1}' and '{2}' because they may unify.</source>
317+
<target state="new">You cannot implement the interface '{0}' with the two instantiations '{1}' and '{2}' because they may unify.</target>
318+
<note />
319+
</trans-unit>
305320
<trans-unit id="undefinedNameFieldConstructorOrMemberWhenTypeIsKnown">
306321
<source>The type '{0}' does not define the field, constructor or member '{1}'.</source>
307322
<target state="translated">El tipo "{0}" no define el campo, constructor o miembro "{1}".</target>

src/fsharp/xlf/FSComp.txt.fr.xlf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@
102102
<target state="new">implicit yield</target>
103103
<note />
104104
</trans-unit>
105+
<trans-unit id="featureInterfacesWithMultipleGenericInstantiation">
106+
<source>interfaces with multiple generic instantiation</source>
107+
<target state="new">interfaces with multiple generic instantiation</target>
108+
<note />
109+
</trans-unit>
105110
<trans-unit id="featureNameOf">
106111
<source>nameof</source>
107112
<target state="new">nameof</target>
@@ -302,6 +307,16 @@
302307
<target state="new">Interface member '{0}' does not have a most specific implementation.</target>
303308
<note />
304309
</trans-unit>
310+
<trans-unit id="typrelInterfaceWithConcreteAndVariable">
311+
<source>'{0}' cannot implement the interface '{1}' with the two instantiations '{2}' and '{3}' because they may unify.</source>
312+
<target state="new">'{0}' cannot implement the interface '{1}' with the two instantiations '{2}' and '{3}' because they may unify.</target>
313+
<note />
314+
</trans-unit>
315+
<trans-unit id="typrelInterfaceWithConcreteAndVariableObjectExpression">
316+
<source>You cannot implement the interface '{0}' with the two instantiations '{1}' and '{2}' because they may unify.</source>
317+
<target state="new">You cannot implement the interface '{0}' with the two instantiations '{1}' and '{2}' because they may unify.</target>
318+
<note />
319+
</trans-unit>
305320
<trans-unit id="undefinedNameFieldConstructorOrMemberWhenTypeIsKnown">
306321
<source>The type '{0}' does not define the field, constructor or member '{1}'.</source>
307322
<target state="translated">Le type '{0}' ne définit pas le champ, le constructeur ou le membre '{1}'.</target>

src/fsharp/xlf/FSComp.txt.it.xlf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@
102102
<target state="new">implicit yield</target>
103103
<note />
104104
</trans-unit>
105+
<trans-unit id="featureInterfacesWithMultipleGenericInstantiation">
106+
<source>interfaces with multiple generic instantiation</source>
107+
<target state="new">interfaces with multiple generic instantiation</target>
108+
<note />
109+
</trans-unit>
105110
<trans-unit id="featureNameOf">
106111
<source>nameof</source>
107112
<target state="new">nameof</target>
@@ -302,6 +307,16 @@
302307
<target state="new">Interface member '{0}' does not have a most specific implementation.</target>
303308
<note />
304309
</trans-unit>
310+
<trans-unit id="typrelInterfaceWithConcreteAndVariable">
311+
<source>'{0}' cannot implement the interface '{1}' with the two instantiations '{2}' and '{3}' because they may unify.</source>
312+
<target state="new">'{0}' cannot implement the interface '{1}' with the two instantiations '{2}' and '{3}' because they may unify.</target>
313+
<note />
314+
</trans-unit>
315+
<trans-unit id="typrelInterfaceWithConcreteAndVariableObjectExpression">
316+
<source>You cannot implement the interface '{0}' with the two instantiations '{1}' and '{2}' because they may unify.</source>
317+
<target state="new">You cannot implement the interface '{0}' with the two instantiations '{1}' and '{2}' because they may unify.</target>
318+
<note />
319+
</trans-unit>
305320
<trans-unit id="undefinedNameFieldConstructorOrMemberWhenTypeIsKnown">
306321
<source>The type '{0}' does not define the field, constructor or member '{1}'.</source>
307322
<target state="translated">Il tipo '{0}' non definisce il campo, il costruttore o il membro '{1}'.</target>

src/fsharp/xlf/FSComp.txt.ja.xlf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@
102102
<target state="new">implicit yield</target>
103103
<note />
104104
</trans-unit>
105+
<trans-unit id="featureInterfacesWithMultipleGenericInstantiation">
106+
<source>interfaces with multiple generic instantiation</source>
107+
<target state="new">interfaces with multiple generic instantiation</target>
108+
<note />
109+
</trans-unit>
105110
<trans-unit id="featureNameOf">
106111
<source>nameof</source>
107112
<target state="new">nameof</target>
@@ -302,6 +307,16 @@
302307
<target state="new">Interface member '{0}' does not have a most specific implementation.</target>
303308
<note />
304309
</trans-unit>
310+
<trans-unit id="typrelInterfaceWithConcreteAndVariable">
311+
<source>'{0}' cannot implement the interface '{1}' with the two instantiations '{2}' and '{3}' because they may unify.</source>
312+
<target state="new">'{0}' cannot implement the interface '{1}' with the two instantiations '{2}' and '{3}' because they may unify.</target>
313+
<note />
314+
</trans-unit>
315+
<trans-unit id="typrelInterfaceWithConcreteAndVariableObjectExpression">
316+
<source>You cannot implement the interface '{0}' with the two instantiations '{1}' and '{2}' because they may unify.</source>
317+
<target state="new">You cannot implement the interface '{0}' with the two instantiations '{1}' and '{2}' because they may unify.</target>
318+
<note />
319+
</trans-unit>
305320
<trans-unit id="undefinedNameFieldConstructorOrMemberWhenTypeIsKnown">
306321
<source>The type '{0}' does not define the field, constructor or member '{1}'.</source>
307322
<target state="translated">型 '{0}' は、フィールド、コンストラクター、またはメンバー '{1}' を定義していません。</target>

src/fsharp/xlf/FSComp.txt.ko.xlf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@
102102
<target state="new">implicit yield</target>
103103
<note />
104104
</trans-unit>
105+
<trans-unit id="featureInterfacesWithMultipleGenericInstantiation">
106+
<source>interfaces with multiple generic instantiation</source>
107+
<target state="new">interfaces with multiple generic instantiation</target>
108+
<note />
109+
</trans-unit>
105110
<trans-unit id="featureNameOf">
106111
<source>nameof</source>
107112
<target state="new">nameof</target>
@@ -302,6 +307,16 @@
302307
<target state="new">Interface member '{0}' does not have a most specific implementation.</target>
303308
<note />
304309
</trans-unit>
310+
<trans-unit id="typrelInterfaceWithConcreteAndVariable">
311+
<source>'{0}' cannot implement the interface '{1}' with the two instantiations '{2}' and '{3}' because they may unify.</source>
312+
<target state="new">'{0}' cannot implement the interface '{1}' with the two instantiations '{2}' and '{3}' because they may unify.</target>
313+
<note />
314+
</trans-unit>
315+
<trans-unit id="typrelInterfaceWithConcreteAndVariableObjectExpression">
316+
<source>You cannot implement the interface '{0}' with the two instantiations '{1}' and '{2}' because they may unify.</source>
317+
<target state="new">You cannot implement the interface '{0}' with the two instantiations '{1}' and '{2}' because they may unify.</target>
318+
<note />
319+
</trans-unit>
305320
<trans-unit id="undefinedNameFieldConstructorOrMemberWhenTypeIsKnown">
306321
<source>The type '{0}' does not define the field, constructor or member '{1}'.</source>
307322
<target state="translated">'{0}' 형식은 '{1}' 필드, 생성자 또는 멤버를 정의하지 않습니다.</target>

0 commit comments

Comments
 (0)