Skip to content

Commit 6af4caf

Browse files
authored
Merge branch 'master' into feature/string-interp
2 parents 93a1a0d + ae5c1db commit 6af4caf

File tree

82 files changed

+653
-447
lines changed

Some content is hidden

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

82 files changed

+653
-447
lines changed

FSharpBuild.Directory.Build.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<_ReplacementText>$([System.IO.File]::ReadAllText('%(NoneSubstituteText.FullPath)'))</_ReplacementText>
2020
<_ReplacementText Condition="'%(NoneSubstituteText.Pattern1)' != ''">$(_ReplacementText.Replace('%(NoneSubstituteText.Pattern1)', '%(NoneSubstituteText.Replacement1)'))</_ReplacementText>
2121
<_ReplacementText Condition="'%(NoneSubstituteText.Pattern2)' != ''">$(_ReplacementText.Replace('%(NoneSubstituteText.Pattern2)', '%(NoneSubstituteText.Replacement2)'))</_ReplacementText>
22+
<_ReplacementText Condition="'%(NoneSubstituteText.Pattern3)' != ''">$(_ReplacementText.Replace('%(NoneSubstituteText.Pattern3)', '%(NoneSubstituteText.Replacement3)'))</_ReplacementText>
2223

2324
<_CopyToOutputDirectory Condition="'%(NoneSubstituteText.CopyToOutputDirectory)' != ''">%(NoneSubstituteText.CopyToOutputDirectory)</_CopyToOutputDirectory>
2425
<_CopyToOutputDirectory Condition="'%(NoneSubstituteText.CopyToOutputDirectory)' == ''">Never</_CopyToOutputDirectory>

fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<DefineConstants>$(DefineConstants);COMPILER</DefineConstants>
1111
<DefineConstants>$(DefineConstants);ENABLE_MONO_SUPPORT</DefineConstants>
1212
<DefineConstants>$(DefineConstants);NO_STRONG_NAMES</DefineConstants>
13-
<DefineConstants>$(DefineConstants);LOCALIZATION_FSCOMP</DefineConstants>
1413
<FsLexOutputFolder Condition="'$(TargetFramework)' != ''">$(TargetFramework)\</FsLexOutputFolder>
1514
<FsYaccOutputFolder Condition="'$(TargetFramework)' != ''">$(TargetFramework)\</FsYaccOutputFolder>
1615
<OtherFlags>$(OtherFlags) /warnon:1182</OtherFlags>
@@ -289,6 +288,7 @@
289288
<Compile Include="$(FSharpSourcesRoot)\fsharp\SimulatedMSBuildReferenceResolver.fs">
290289
<Link>ReferenceResolution/SimulatedMSBuildReferenceResolver.fs</Link>
291290
</Compile>
291+
<EmbeddedText Include="$(FSharpSourcesRoot)\utils\UtilsStrings.txt" />
292292
<Compile Include="$(FSharpSourcesRoot)/utils/CompilerLocationUtils.fs">
293293
<Link>CompilerLocation/CompilerLocationUtils.fs</Link>
294294
</Compile>

src/fsharp/AttributeChecking.fs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,11 @@ let CheckFSharpAttributes (g:TcGlobals) attribs m =
299299
match namedArgs with
300300
| ExtractAttribNamedArg "IsError" (AttribBoolArg v) -> v
301301
| _ -> false
302-
if isError && (not g.compilingFslib || n <> 1204) then ErrorD msg else WarnD msg
302+
// If we are using a compiler that supports nameof then error 3501 is always suppressed.
303+
// See attribute on FSharp.Core 'nameof'
304+
if n = 3501 then CompleteD
305+
elif isError && (not g.compilingFslib || n <> 1204) then ErrorD msg
306+
else WarnD msg
303307
| _ ->
304308
CompleteD
305309
) ++ (fun () ->

src/fsharp/CompileOps.fs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2422,8 +2422,7 @@ type TcConfigBuilder =
24222422
deterministic = false
24232423
preferredUiLang = None
24242424
lcid = None
2425-
// See bug 6071 for product banner spec
2426-
productNameForBannerText = FSComp.SR.buildProductName(FSharpEnvironment.FSharpBannerVersion)
2425+
productNameForBannerText = FSharpEnvironment.FSharpProductName
24272426
showBanner = true
24282427
showTimes = false
24292428
showLoadedAssemblies = false

src/fsharp/FSComp.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ tupleRequiredInAbstractMethod,"\nA tuple type is required for one or more argume
3434
203,buildInvalidWarningNumber,"Invalid warning number '%s'"
3535
204,buildInvalidVersionString,"Invalid version string '%s'"
3636
205,buildInvalidVersionFile,"Invalid version file '%s'"
37-
buildProductName,"Microsoft (R) F# Compiler version %s"
38-
buildProductNameCommunity,"F# Compiler for F# %s"
3937
206,buildProblemWithFilename,"Problem with filename '%s': %s"
4038
207,buildNoInputsSpecified,"No inputs specified"
4139
209,buildPdbRequiresDebug,"The '--pdb' option requires the '--debug' option to be used"
@@ -1494,7 +1492,6 @@ notAFunctionButMaybeDeclaration,"This value is not a function and cannot be appl
14941492
3352,typrelInterfaceMemberNoMostSpecificImplementation,"Interface member '%s' does not have a most specific implementation."
14951493
3353,chkFeatureNotSupportedInLibrary,"Feature '%s' requires the F# library for language version %s or greater."
14961494
useSdkRefs,"Use reference assemblies for .NET framework references when available (Enabled by default)."
1497-
fSharpBannerVersion,"%s for F# %s"
14981495
optsLangVersion,"Display the allowed values for language version, specify language version such as 'latest' or 'preview'"
14991496
optsSupportedLangVersions,"Supported language versions:"
15001497
nativeResourceFormatError,"Stream does not begin with a null resource and is not in '.RES' format."
@@ -1535,3 +1532,4 @@ forFormatInvalidForInterpolated4,"Interpolated strings used as type IFormattable
15351532
3379,parsEofInInterpolatedString,"Incomplete interpolated string begun at or before here"
15361533
3380,parsEofInInterpolatedVerbatimString,"Incomplete interpolated verbatim string begun at or before here"
15371534
3381,parsEofInInterpolatedTripleQuoteString,"Incomplete interpolated triple-quote string begun at or before here"
1535+
#3501 "This construct is not supported by your version of the F# compiler" CompilerMessage(ExperimentalAttributeMessages.NotSupportedYet, 3501, IsError=true)
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
# FSharp.Build resource strings
22
toolpathUnknown,"ToolPath is unknown; specify the path to the tool."
3-
fSharpBannerVersion,"%s for F# %s"

src/fsharp/FSharp.Build/FSharp.Build.fsproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<ItemGroup>
1919
<InternalsVisibleTo Include="VisualFSharp.UnitTests" />
2020
<EmbeddedText Include="FSBuild.txt" />
21+
<EmbeddedText Include="..\..\utils\UtilsStrings.txt" />
2122
<Compile Include="..\..\utils\CompilerLocationUtils.fs" />
2223
<Compile Include="FSharpCommandLineBuilder.fs" />
2324
<Compile Include="Fsc.fs" />
@@ -36,6 +37,8 @@
3637
<Replacement1>$(FSharpCoreShippedPackageVersion)</Replacement1>
3738
<Pattern2>{{FSharpCorePreviewPackageVersion}}</Pattern2>
3839
<Replacement2>$(FSharpCorePreviewPackageVersion)</Replacement2>
40+
<Pattern3>{{FSCorePackageVersion}}</Pattern3>
41+
<Replacement3>$(FSCorePackageVersion)</Replacement3>
3942
</NoneSubstituteText>
4043
<None Include="Microsoft.FSharp.Overrides.NetSdk.targets" CopyToOutputDirectory="PreserveNewest" />
4144
</ItemGroup>

src/fsharp/FSharp.Build/Microsoft.FSharp.NetSdk.props

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,32 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and
7474

7575
<PropertyGroup>
7676
<DefaultValueTuplePackageVersion>4.4.0</DefaultValueTuplePackageVersion>
77-
<DefaultFSharpCorePackageVersion>{{FSharpCoreShippedPackageVersion}}</DefaultFSharpCorePackageVersion>
78-
<DefaultFSharpCorePreviewPackageVersion>{{FSharpCorePreviewPackageVersion}}</DefaultFSharpCorePreviewPackageVersion>
7977
<ValueTupleImplicitPackageVersion>$(DefaultValueTuplePackageVersion)</ValueTupleImplicitPackageVersion>
80-
<FSharpCoreImplicitPackageVersion>$(DefaultFSharpCorePackageVersion)</FSharpCoreImplicitPackageVersion>
78+
<FSharpCoreShippedPackageVersion>{{FSharpCoreShippedPackageVersion}}</FSharpCoreShippedPackageVersion>
79+
<FSharpCorePreviewPackageVersion>{{FSharpCorePreviewPackageVersion}}</FSharpCorePreviewPackageVersion>
80+
<FSCorePackageVersion>{{FSCorePackageVersion}}</FSCorePackageVersion>
8181
</PropertyGroup>
8282

83+
<ItemGroup>
84+
85+
<PackageReference
86+
Include="FSharp.Core" Version="$(FSharpCoreImplicitPackageVersion)"
87+
Condition = "'$(DisableImplicitFSharpCoreReference)' != 'true' and '$(FSharpCoreImplicitPackageVersion)' != ''"/>
88+
89+
<PackageReference
90+
Include="FSharp.Core" Version="$(FSharpCoreShippedPackageVersion)"
91+
Condition="'$(DisableImplicitFSharpCoreReference)' != 'true' and '$(FSharpCoreImplicitPackageVersion)' == '' and '$(_NETCoreSdkIsPreview)' == 'true' and '$(DisableFSharpCorePreviewCheck)' == 'true'"/>
92+
93+
<PackageReference
94+
Include="FSharp.Core" Version="$(FSharpCorePreviewPackageVersion)"
95+
Condition="'$(DisableImplicitFSharpCoreReference)' != 'true' and '$(FSharpCoreImplicitPackageVersion)' == '' and '$(_NETCoreSdkIsPreview)' == 'true' and '$(DisableFSharpCorePreviewCheck)' != 'true'"/>
96+
97+
<PackageReference
98+
Include="FSharp.Core" Version="$(FSCorePackageVersion)"
99+
Condition="'$(DisableImplicitFSharpCoreReference)' != 'true' and '$(FSharpCoreImplicitPackageVersion)' == '' and '$(_NETCoreSdkIsPreview)' != 'true'"/>
100+
101+
</ItemGroup>
102+
83103
<ItemGroup Condition="'$(DisableImplicitSystemValueTupleReference)' != 'true'
84104
and ('$(TargetFrameworkIdentifier)' == '.NETFramework'
85105
and ('$(_TargetFrameworkVersionWithoutV)' == ''
@@ -94,10 +114,6 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and
94114
<PackageReference Include="System.ValueTuple" Version="$(ValueTupleImplicitPackageVersion)" />
95115
</ItemGroup>
96116

97-
<ItemGroup Condition="'$(DisableImplicitFSharpCoreReference)' != 'true'">
98-
<PackageReference Include="FSharp.Core" Version="$(FSharpCoreImplicitPackageVersion)" />
99-
</ItemGroup>
100-
101117
<ItemDefinitionGroup>
102118
<PackageReference>
103119
<GeneratePathProperty>true</GeneratePathProperty>

src/fsharp/FSharp.Build/Microsoft.FSharp.NetSdk.targets

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,8 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and
5252
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);PackageFSharpDesignTimeTools</TargetsForTfmSpecificContentInPackage>
5353
</PropertyGroup>
5454

55-
<!-- When the developer specifies UseFSharpPreview=true then resolve the highest preview package from the F# myget feed -->
56-
<PropertyGroup Condition="'$(UseFSharpPreview)' == 'true'">
57-
<FSharpCoreImplicitPackageVersion>$(DefaultFSharpCorePreviewPackageVersion)</FSharpCoreImplicitPackageVersion>
58-
<RestoreSources>$(RestoreSources); https://dotnet.myget.org/F/fsharp/api/v3/index.json</RestoreSources>
55+
<PropertyGroup>
56+
<RestoreAdditionalProjectSources Condition="'$(_NETCoreSdkIsPreview)' != 'false'">$(RestoreAdditionalProjectSources);https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json</RestoreAdditionalProjectSources>
5957
</PropertyGroup>
6058

6159
<Target Name="CollectFSharpDesignTimeTools" BeforeTargets="BeforeCompile" DependsOnTargets="_GetFrameworkAssemblyReferences">

src/fsharp/FSharp.Build/xlf/FSBuild.txt.cs.xlf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
33
<file datatype="xml" source-language="en" target-language="cs" original="../FSBuild.resx">
44
<body>
5-
<trans-unit id="fSharpBannerVersion">
6-
<source>{0} for F# {1}</source>
7-
<target state="translated">{0} pro F# {1}</target>
8-
<note />
9-
</trans-unit>
105
<trans-unit id="toolpathUnknown">
116
<source>ToolPath is unknown; specify the path to the tool.</source>
127
<target state="translated">Parametr ToolPath není známý. Zadejte cestu k nástroji.</target>

0 commit comments

Comments
 (0)