Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit29eeaf9

Browse files
authored
Merge pull requestdotnet#4214 from Microsoft/master
merge master to 15.6
2 parents1debda2 +452332f commit29eeaf9

File tree

68 files changed

+226
-219
lines changed

Some content is hidden

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

68 files changed

+226
-219
lines changed

‎.gitignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,5 @@ tests/fsharpqa/testenv/bin/System.ValueTuple.dll
125125
/tests/fcs/
126126
/fcs/.paket/Paket.Restore.targets
127127
msbuild.binlog
128+
/fcs/FSharp.Compiler.Service.netstandard/*.fs
129+
/fcs/FSharp.Compiler.Service.netstandard/*.fsi

‎TESTGUIDE.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ For the FSharpQA suite, the list of test areas and their associated "tags" is st
5555

5656
tests\fsharpqa\source\test.lst // FSharpQA suite
5757

58-
Tags are in the left column, paths to to corresponding test folders are in the right column. If no tags arespecifie, all tests will be run.
58+
Tags are in the left column, paths to to corresponding test folders are in the right column. If no tags arespecified, all tests will be run.
5959

6060
If you want to re-run a particular test area, the easiest way to do so is to set a temporary tag for that area in test.lst (e.g. "RERUN") and then pass that as an argument to`build.cmd`:`build.cmd test-net40-fsharpqa include RERUN`.
6161

@@ -65,7 +65,7 @@ These are all NUnit tests. You can execute these tests individually via the Visu
6565
extension or the command line via`nunit3-console.exe`.
6666

6767
Note that for compatibility reasons, the IDE unit tests should be run in a 32-bit process,
68-
using the'--x86' flag to`nunit3-console.exe`
68+
using the`--x86` flag to`nunit3-console.exe`
6969

7070

7171

‎fcs/FSharp.Compiler.Service.Tests.netcore/FSharp.Compiler.Service.Tests.netcore.fsproj‎

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
<ProjectSdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>netcoreapp1.0</TargetFramework>
4-
<DefineConstants>$(DefineConstants);DOTNETCORE;FX_ATLEAST_45;FX_ATLEAST_PORTABLE;FX_NO_RUNTIMEENVIRONMENT;FX_RESHAPED_REFLECTION;TODO_REWORK_ASSEMBLY_LOAD;</DefineConstants>
3+
<TargetFramework>netcoreapp2.0</TargetFramework>
4+
<DefineConstants>$(DefineConstants);DOTNETCORE</DefineConstants>
5+
<DefineConstants>$(DefineConstants);FX_ATLEAST_45</DefineConstants>
6+
<DefineConstants>$(DefineConstants);FX_ATLEAST_PORTABLE</DefineConstants>
7+
<DefineConstants>$(DefineConstants);FX_NO_RUNTIMEENVIRONMENT</DefineConstants>
8+
<DefineConstants>$(DefineConstants);FX_RESHAPED_REFLECTION</DefineConstants>
9+
<DefineConstants>$(DefineConstants);NO_EXTENSIONTYPING</DefineConstants>
10+
<DefineConstants>$(DefineConstants);TODO_REWORK_ASSEMBLY_LOAD</DefineConstants>
511
<NoWarn>$(NoWarn);44;</NoWarn>
612
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
713
<DelaySign>true</DelaySign>
@@ -36,25 +42,21 @@
3642
<!--<Compile Include="../service/ProjectAnalysisTests.fs">
3743
<Link>ProjectAnalysisTests.fs</Link>
3844
</Compile>-->
45+
<CompileInclude="../../tests/service/Program.fs">
46+
<Link>Program.fs</Link>
47+
</Compile>
3948
</ItemGroup>
4049
<ItemGroup>
4150
<ProjectReferenceInclude="../FSharp.Compiler.Service.netstandard/FSharp.Compiler.Service.netstandard.fsproj" />
4251
</ItemGroup>
4352
<ItemGroup>
44-
<PackageReferenceInclude="Microsoft.NET.Test.Sdk"Version="15.0.0" />
45-
<PackageReferenceInclude="NUnit3TestAdapter"Version="3.8.0" />
46-
<PackageReferenceInclude="NUnitLite"Version="3.6.1" />
47-
<PackageReferenceInclude="NUnit"Version="3.6.1" />
48-
<PackageReferenceInclude="FSharp.Core"Version="4.1.*"PrivateAssets="All" />
49-
<PackageReferenceInclude="System.Runtime"Version="4.3.0" />
50-
<PackageReferenceInclude="System.Reflection.Emit"Version="4.3.0" />
51-
<PackageReferenceInclude="System.Reflection.Metadata"Version="1.4.1" />
52-
<PackageReferenceInclude="System.Reflection.TypeExtensions"Version="4.3.0" />
53-
<PackageReferenceInclude="System.Runtime.Loader"Version="4.3.0" />
54-
<PackageReferenceInclude="Dotnet.ProjInfo"Version="0.5.0" />
53+
<PackageReferenceInclude="Microsoft.NET.Test.Sdk"Version="15.5.0" />
54+
<PackageReferenceInclude="NUnit"Version="3.9.0" />
55+
<PackageReferenceInclude="NUnit3TestAdapter"Version="3.9.0" />
56+
<PackageReferenceInclude="Dotnet.ProjInfo"Version="0.9.0" />
5557
</ItemGroup>
5658
<TargetName="PrecompileScript"BeforeTargets="BeforeBuild">
57-
<ExecCommand="dotnet restore&quot;$(MSBuildProjectDirectory)/../../tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard1.6/Sample_NETCoreSDK_FSharp_Library_netstandard1.6.fsproj&quot;" />
58-
<ExecCommand="dotnet build&quot;$(MSBuildProjectDirectory)/../../tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard1.6/Sample_NETCoreSDK_FSharp_Library_netstandard1.6.fsproj&quot;" />
59+
<ExecCommand="dotnet restore&quot;$(MSBuildProjectDirectory)/../../tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Sample_NETCoreSDK_FSharp_Library_netstandard2_0.fsproj&quot;" />
60+
<ExecCommand="dotnet build&quot;$(MSBuildProjectDirectory)/../../tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Sample_NETCoreSDK_FSharp_Library_netstandard2_0.fsproj&quot;" />
5961
</Target>
6062
</Project>

‎src/fsharp/FSComp.txt‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ FieldNotContainedMutablesDiffer,"The module contains the field\n %s \nbut
161161
FieldNotContainedLiteralsDiffer,"The module contains the field\n %s \nbut its signature specifies\n %s \nThe 'literal' modifiers differ"
162162
FieldNotContainedTypesDiffer,"The module contains the field\n %s \nbut its signature specifies\n %s \nThe types differ"
163163
331,typrelCannotResolveImplicitGenericInstantiation,"The implicit instantiation of a generic construct at or near this point could not be resolved because it could resolve to multiple unrelated types, e.g. '%s' and '%s'. Consider using type annotations to resolve the ambiguity"
164-
332,typrelCannotResolveAmbiguityInOverloadedOperator,"Could not resolve the ambiguity inherent in the use of the operator '%s' at or near this program point. Consider using type annotations to resolve the ambiguity."
165164
333,typrelCannotResolveAmbiguityInPrintf,"Could not resolve the ambiguity inherent in the use of a 'printf'-style format string"
166165
334,typrelCannotResolveAmbiguityInEnum,"Could not resolve the ambiguity in the use of a generic construct with an 'enum' constraint at or near this position"
167166
335,typrelCannotResolveAmbiguityInDelegate,"Could not resolve the ambiguity in the use of a generic construct with a 'delegate' constraint at or near this position"

‎src/fsharp/IlxGen.fs‎

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3747,8 +3747,8 @@ and GenClosureTypeDefs cenv (tref:ILTypeRef, ilGenParams, attrs, ilCloFreeVars,
37473747
Properties= emptyILProperties
37483748
Methods= mkILMethods mdefs
37493749
MethodImpls= mkILMethodImpls mimpls
3750-
IsSerializable= cenv.g.attrib_SerializableAttribute.IsSome
3751-
IsComInterop=false
3750+
IsSerializable=true
3751+
IsComInterop=false
37523752
IsSpecialName=true
37533753
NestedTypes=emptyILTypeDefs
37543754
Encoding= ILDefaultPInvokeEncoding.Auto
@@ -3803,8 +3803,8 @@ and GenLambdaClosure cenv (cgbuf:CodeGenBuffer) eenv isLocalTypeFunc selfv expr
38033803
Properties= emptyILProperties
38043804
Methods= mkILMethods ilContractMeths
38053805
MethodImpls= emptyILMethodImpls
3806-
IsSerializable= cenv.g.attrib_SerializableAttribute.IsSome
3807-
IsComInterop=false
3806+
IsSerializable=true
3807+
IsComInterop=false
38083808
IsSpecialName=true
38093809
NestedTypes=emptyILTypeDefs
38103810
Encoding= ILDefaultPInvokeEncoding.Auto
@@ -6563,9 +6563,8 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) =
65636563
letilFields= mkILFields ilFieldDefs
65646564

65656565
lettdef,tdefDiscards=
6566-
letisSerializable=(TryFindFSharpBoolAttribute cenv.g cenv.g.attrib_AutoSerializableAttribute tycon.Attribs<> Some(false))
6567-
&& cenv.g.attrib_SerializableAttribute.IsSome
6568-
6566+
letisSerializable=(TryFindFSharpBoolAttribute cenv.g cenv.g.attrib_AutoSerializableAttribute tycon.Attribs<> Some(false))
6567+
65696568
match tycon.TypeReprInfowith
65706569
| TILObjectRepr_->
65716570
lettd= tycon.ILTyconRawMetadata
@@ -6817,11 +6816,10 @@ and GenExnDef cenv mgbuf eenv m (exnc:Tycon) =
68176816
else
68186817
[]
68196818

6820-
68216819
letserializationRelatedMembers=
6822-
// do not emit serialization related members if target framework lacksSerializableAttribute orSerializationInfo
6823-
match cenv.g.attrib_SerializableAttribute, cenv.g.iltyp_SerializationInfo, cenv.g.iltyp_StreamingContextwith
6824-
| Some_, SomeserializationInfoType, Some streamingContextType->
6820+
// do not emit serialization related members if target framework lacksSerializationInfo orStreamingContext
6821+
match cenv.g.iltyp_SerializationInfo, cenv.g.iltyp_StreamingContextwith
6822+
| Some serializationInfoType, Some streamingContextType->
68256823
letilCtorDefForSerialziation=
68266824
mkILCtor(ILMemberAccess.Family,
68276825
[mkILParamNamed("info", serializationInfoType);mkILParamNamed("context",streamingContextType)],
@@ -6880,7 +6878,7 @@ and GenExnDef cenv mgbuf eenv m (exnc:Tycon) =
68806878
emptyILEvents,
68816879
mkILCustomAttrs[mkCompilationMappingAttr cenv.g(int SourceConstructFlags.Exception)],
68826880
ILTypeInit.BeforeField)
6883-
lettdef={ tdefwith IsSerializable=cenv.g.attrib_SerializableAttribute.IsSome}
6881+
lettdef={ tdefwith IsSerializable=true}
68846882
mgbuf.AddTypeDef(tref, tdef,false,false, None)
68856883

68866884

‎src/fsharp/TcGlobals.fs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,6 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d
10051005
member valattrib_ProjectionParameterAttribute= mk_MFCore_attrib"ProjectionParameterAttribute"
10061006
member valattrib_CustomOperationAttribute= mk_MFCore_attrib"CustomOperationAttribute"
10071007
member valattrib_NonSerializedAttribute= tryFindSysAttrib"System.NonSerializedAttribute"
1008-
member valattrib_SerializableAttribute= tryFindSysAttrib"System.SerializableAttribute"
10091008

10101009
member valattrib_AutoSerializableAttribute= mk_MFCore_attrib"AutoSerializableAttribute"
10111010
member valattrib_RequireQualifiedAccessAttribute= mk_MFCore_attrib"RequireQualifiedAccessAttribute"

‎src/fsharp/TypeRelations.fs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,7 @@ let ChooseTyparSolutionAndRange (g: TcGlobals) amap (tp:Typar) =
141141
match tpcwith
142142
| TyparConstraint.CoercesTo(x,m)->
143143
join m x,m
144-
| TyparConstraint.MayResolveMember(TTrait(_,nm,_,_,_,_),m)->
145-
errorR(Error(FSComp.SR.typrelCannotResolveAmbiguityInOverloadedOperator(DemangleOperatorName nm),m))
144+
| TyparConstraint.MayResolveMember(TTrait(_,_,_,_,_,_),m)->
146145
maxSoFar,m
147146
| TyparConstraint.SimpleChoice(_,m)->
148147
errorR(Error(FSComp.SR.typrelCannotResolveAmbiguityInPrintf(),m))

‎src/fsharp/fsc.fs‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1968,12 +1968,10 @@ let main2b (tcImportsCapture,dynamicAssemblyCreator) (Args (ctok, tcConfig: TcCo
19681968
use unwindBuildPhase= PushThreadBuildPhaseUntilUnwind BuildPhase.IlxGen
19691969
letilxGenerator= CreateIlxAssemblyGenerator(tcConfig, tcImports, tcGlobals,(LightweightTcValForUsingInBuildMethodCall tcGlobals), generatedCcu)
19701970

1971-
// Check if System.SerializableAttribute exists in mscorlib.dll,
1972-
// so that make sure the compiler only emits "serializable" bit into IL metadata when it is available.
1973-
// Note that SerializableAttribute may be relocated in the future but now resides in mscorlib.
19741971
letcodegenResults= GenerateIlxCode((if Option.isSome dynamicAssemblyCreatorthen IlReflectBackendelse IlWriteBackend), Option.isSome dynamicAssemblyCreator,false, tcConfig, topAttrs, optimizedImpls, generatedCcu.AssemblyName, ilxGenerator)
19751972
letcasApplied=new Dictionary<Stamp, bool>()
19761973
letsecurityAttrs,topAssemblyAttrs= topAttrs.assemblyAttrs|> List.partition(fun a-> TypeChecker.IsSecurityAttribute tcGlobals(tcImports.GetImportMap()) casApplied a rangeStartup)
1974+
19771975
// remove any security attributes from the top-level assembly attribute list
19781976
lettopAttrs={topAttrswith assemblyAttrs=topAssemblyAttrs}
19791977
letpermissionSets= ilxGenerator.CreatePermissionSets securityAttrs

‎src/fsharp/service/ServiceUntypedParse.fs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ module SourceFileImpl =
4141
0= String.Compare(".fsi",ext,StringComparison.OrdinalIgnoreCase)
4242

4343
/// Additional #defines that should be in place when editing a file in a file editor such as VS.
44-
letAdditionalDefinesForUseInEditor(filename)=
45-
ifCompileOps.IsScript(filename)then["INTERACTIVE";"EDITING"]// This is still used by the foreground parse
44+
letAdditionalDefinesForUseInEditor(isInteractive:bool)=
45+
ifisInteractivethen["INTERACTIVE";"EDITING"]// This is still used by the foreground parse
4646
else["COMPILED";"EDITING"]
4747

4848
typeCompletionPath= string list* string option// plid * residue

‎src/fsharp/service/ServiceUntypedParse.fsi‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,5 +112,5 @@ module public UntypedParseImpl =
112112
// implementation details used by other code in the compiler
113113
module internal SourceFileImpl=
114114
valIsInterfaceFile:string->bool
115-
valAdditionalDefinesForUseInEditor:string->string list
115+
valAdditionalDefinesForUseInEditor:isInteractive:bool->string list
116116

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp