Skip to content

Commit

Permalink
Merge branch 'release/fsharp47' into merges/release/dev16.3-to-releas…
Browse files Browse the repository at this point in the history
…e/fsharp47
  • Loading branch information
KevinRansom authored Jul 3, 2019
2 parents d51ae07 + 8b66074 commit 7891cbd
Show file tree
Hide file tree
Showing 160 changed files with 1,990 additions and 1,738 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ ossreadme*.txt
*.log
*.jrs
*.chk
*.bak
*.bak
*.vserr
*.err
*.orig
*.mdf
*.ldf
Expand Down
12 changes: 11 additions & 1 deletion DEVGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,17 @@ After you build the first time you can open and use this solution in Visual Stud

If you don't have everything installed yet, you'll get prompted by Visual Studio to install a few more things. This is because we use a `.vsconfig` file that specifies all our dependencies.

## Developing on Windows - No Visual Studio
If you are just developing the core compiler and library then building ``FSharp.sln`` will be enough.

### Developing the F# Compiler (Linux/macOS)

For Linux/Mac:

./build.sh

Running tests:

./build.sh --test

We recommend installing the latest released Visual Studio and using that if you are on Windows. However, if you prefer not to do that, you will need to install the following:

Expand Down
21 changes: 0 additions & 21 deletions FSharp.Profiles.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,22 @@
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))">
<DefineConstants Condition="'$(MonoPackaging)' == 'true'">$(DefineConstants);CROSS_PLATFORM_COMPILER</DefineConstants>
<DefineConstants>$(DefineConstants);ENABLE_MONO_SUPPORT</DefineConstants>
<DefineConstants>$(DefineConstants);BE_SECURITY_TRANSPARENT</DefineConstants>
<DefineConstants>$(DefineConstants);FX_LCIDFROMCODEPAGE</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="$(TargetFramework.StartsWith('netstandard')) OR $(TargetFramework.StartsWith('netcoreapp'))">
<DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_APP_DOMAINS</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_ARRAY_LONG_LENGTH</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_BEGINEND_READWRITE</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_BINARY_SERIALIZATION</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_CONVERTER</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_DEFAULT_DEPENDENCY_TYPE</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_CORHOST_SIGNER</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_EVENTWAITHANDLE_IDISPOSABLE</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_EXIT_CONTEXT_FLAGS</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_LINKEDRESOURCES</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_PARAMETERIZED_THREAD_START</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_PDB_READER</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_PDB_WRITER</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_REFLECTION_MODULE_HANDLES</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_REFLECTION_ONLY</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_RUNTIMEENVIRONMENT</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_SECURITY_PERMISSIONS</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_SERVERCODEPAGES</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_SYMBOLSTORE</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_SYSTEM_CONFIGURATION</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_THREAD</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_THREADABORT</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_WAITONE_MILLISECONDS</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_WEB_CLIENT</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_WIN_REGISTRY</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_WINFORMS</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_INDENTED_TEXT_WRITER</DefineConstants>
<DefineConstants>$(DefineConstants);FX_REDUCED_EXCEPTIONS</DefineConstants>
<DefineConstants>$(DefineConstants);FX_RESHAPED_REFEMIT</DefineConstants>
<DefineConstants>$(DefineConstants);FX_RESHAPED_GLOBALIZATION</DefineConstants>
<DefineConstants>$(DefineConstants);FX_RESHAPED_REFLECTION</DefineConstants>
<DefineConstants>$(DefineConstants);FX_RESHAPED_MSBUILD</DefineConstants>
<OtherFlags>$(OtherFlags) --simpleresolution</OtherFlags>
</PropertyGroup>
Expand Down
4 changes: 4 additions & 0 deletions FSharpTests.Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
<DotnetFsiCompilerPath></DotnetFsiCompilerPath>
</PropertyGroup>

<PropertyGroup Condition="'$(OS)' == 'Unix'">
<DefineConstants>($(DefineConstants);TESTING_ON_LINUX</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(FSharpTestCompilerVersion)' == 'coreclr'">
<DisableAutoSetFscCompilerPath>true</DisableAutoSetFscCompilerPath>

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ restore:

build: proto restore
$(DotNetExe) build-server shutdown
$(DotNetExe) build -c $(Configuration) -f netstandard1.6 src/fsharp/FSharp.Core/FSharp.Core.fsproj
$(DotNetExe) build -c $(Configuration) -f netstandard2.0 src/fsharp/FSharp.Core/FSharp.Core.fsproj
$(DotNetExe) build -c $(Configuration) -f netstandard2.0 src/fsharp/FSharp.Build/FSharp.Build.fsproj
$(DotNetExe) build -c $(Configuration) -f netstandard2.0 src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj
$(DotNetExe) build -c $(Configuration) -f netcoreapp2.1 src/fsharp/fsc/fsc.fsproj
Expand Down
3 changes: 1 addition & 2 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<!-- Version number computation -->
<PropertyGroup>
<PreReleaseVersionLabel>beta</PreReleaseVersionLabel>
<FSLanguageVersion>4.6</FSLanguageVersion>
<FSLanguageVersion>4.7</FSLanguageVersion>
<FSCoreMajorVersion>$(FSLanguageVersion)</FSCoreMajorVersion>
<FSCorePackageVersion>$(FSCoreMajorVersion).3</FSCorePackageVersion>
<FSCoreVersionPrefix>$(FSCoreMajorVersion).0</FSCoreVersionPrefix>
Expand Down Expand Up @@ -55,7 +55,6 @@
https://dotnet.myget.org/F/roslyn-tools/api/v3/index.json;
https://api.nuget.org/v3/index.json;
https://dotnet.myget.org/F/roslyn/api/v3/index.json;
https://dotnet.myget.org/F/roslyn-analyzers/api/v3/index.json;
https://dotnet.myget.org/F/symreader-converter/api/v3/index.json;
https://dotnet.myget.org/F/interactive-window/api/v3/index.json;
https://myget.org/F/vs-devcore/api/v3/index.json;
Expand Down
1 change: 1 addition & 0 deletions eng/common/templates/job/publish-build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
/p:MaestroApiEndpoint=https://maestro-prod.westus2.cloudapp.azure.com
/p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }}
/p:Configuration=$(_BuildConfig)
/v:detailed
condition: ${{ parameters.condition }}
continueOnError: ${{ parameters.continueOnError }}
- task: powershell@2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ stages:
-PersonalAccessToken $(dn-bot-dnceng-unviersal-packages-rw)
enabled: false


- stage: PublishValidation
displayName: Publish Validation
variables:
Expand Down
2 changes: 2 additions & 0 deletions eng/common/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,8 @@ function MSBuild-Core {
}
}

. "$scriptroot/pipeline-logging-functions.sh"

ResolvePath "${BASH_SOURCE[0]}"
_script_dir=`dirname "$_ResolvePath"`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,9 @@
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <!-- Tests won't run without this, at least on OSX, see https://github.com/NuGet/Home/issues/4837#issuecomment-354536302 -->
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
<DefineConstants>$(DefineConstants);FX_NO_RUNTIMEENVIRONMENT</DefineConstants>
<DefineConstants>$(DefineConstants);NO_PROJECTCRACKER</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(FSharpSourcesRoot)\..\tests\service\ReshapedReflection.fs">
<Link>ReshapedReflection.fs</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)\..\tests\service\FsUnit.fs">
<Link>FsUnit.fs</Link>
</Compile>
Expand Down
19 changes: 12 additions & 7 deletions fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
<DefineConstants>$(DefineConstants);FX_NO_SYMBOLSTORE</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_LINKEDRESOURCES</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_APP_DOMAINS</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_RUNTIMEENVIRONMENT</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_WIN_REGISTRY</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_SYSTEM_CONFIGURATION</DefineConstants>
<DefineConstants>$(DefineConstants);FX_RESHAPED_REFEMIT</DefineConstants>
Expand Down Expand Up @@ -67,9 +66,6 @@
<Compile Include="$(FSharpSourcesRoot)/fsharp/Logger.fs">
<Link>Logger.fs</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)/utils/reshapedreflection.fs">
<Link>Reshaped/reshapedreflection.fs</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)/utils/sformat.fsi">
<Link>ErrorText/sformat.fsi</Link>
</Compile>
Expand All @@ -82,6 +78,12 @@
<Compile Include="$(FSharpSourcesRoot)/fsharp/sr.fs">
<Link>ErrorText/sr.fs</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)/fsharp/LanguageFeatures.fsi">
<Link>Driver\LanguageFeatures.fsi</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)/fsharp/LanguageFeatures.fs">
<Link>Driver\LanguageFeatures.fs</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)/utils/prim-lexing.fsi">
<Link>LexYaccRuntime/prim-lexing.fsi</Link>
</Compile>
Expand Down Expand Up @@ -157,6 +159,9 @@
<Compile Include="$(FSharpSourcesRoot)/absil/bytes.fs">
<Link>Utilities/bytes.fs</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)/fsharp/XmlAdapters.fs">
<Link>Utilities\XmlAdapters.fs</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)/fsharp/lib.fs">
<Link>Utilities/lib.fs</Link>
</Compile>
Expand Down Expand Up @@ -264,6 +269,9 @@
<Compile Include="$(FSharpSourcesRoot)/absil/ilreflect.fs">
<Link>AbsIL/ilreflect.fs</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)\utils\reshapedmsbuild.fs">
<Link>ReferenceResolution/reshapedmsbuild.fs</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)/fsharp/ReferenceResolver.fs">
<Link>ReferenceResolution/ReferenceResolver.fs</Link>
</Compile>
Expand Down Expand Up @@ -588,9 +596,6 @@
<Compile Include="$(FSharpSourcesRoot)\fsharp\service\ServiceUntypedParse.fs">
<Link>Service/ServiceUntypedParse.fs</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)\utils\reshapedmsbuild.fs">
<Link>Service/reshapedmsbuild.fs</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)\fsharp\service\ServiceDeclarationLists.fsi">
<Link>Service/ServiceDeclarationLists.fsi</Link>
</Compile>
Expand Down
15 changes: 0 additions & 15 deletions src/absil/illib.fs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ open System.Reflection
open System.Threading
open System.Runtime.CompilerServices

#if FX_RESHAPED_REFLECTION
open Microsoft.FSharp.Core.ReflectionAdapters
#endif

// Logical shift right treating int32 as unsigned integer.
// Code that uses this should probably be adjusted to use unsigned integer types.
let (>>>&) (x: int32) (n: int32) = int32 (uint32 x >>> n)
Expand Down Expand Up @@ -258,12 +254,6 @@ module Option =

module List =

//let item n xs = List.nth xs n
#if FX_RESHAPED_REFLECTION
open PrimReflectionAdapters
open Microsoft.FSharp.Core.ReflectionAdapters
#endif

let sortWithOrder (c: IComparer<'T>) elements = List.sortWith (Order.toFunction c) elements

let splitAfter n l =
Expand Down Expand Up @@ -1272,11 +1262,6 @@ type LayeredMultiMap<'Key, 'Value when 'Key : equality and 'Key : comparison>(co
[<AutoOpen>]
module Shim =

#if FX_RESHAPED_REFLECTION
open PrimReflectionAdapters
open Microsoft.FSharp.Core.ReflectionAdapters
#endif

type IFileSystem =

/// A shim over File.ReadAllBytes
Expand Down
17 changes: 0 additions & 17 deletions src/absil/ilreflect.fs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ open FSharp.Compiler.ErrorLogger
open FSharp.Compiler.Range
open FSharp.Core.Printf

#if FX_RESHAPED_REFLECTION
open Microsoft.FSharp.Core.ReflectionAdapters
#endif

let codeLabelOrder = ComparisonIdentity.Structural<ILCodeLabel>

// Convert the output of convCustomAttr
Expand Down Expand Up @@ -314,10 +310,8 @@ let convAssemblyRef (aref: ILAssemblyRef) =
asmName.Version <- System.Version (int32 version.Major, int32 version.Minor, int32 version.Build, int32 version.Revision)
Option.iter setVersion aref.Version
// asmName.ProcessorArchitecture <- System.Reflection.ProcessorArchitecture.MSIL
#if !FX_RESHAPED_GLOBALIZATION
//Option.iter (fun name -> asmName.CultureInfo <- System.Globalization.CultureInfo.CreateSpecificCulture name) aref.Locale
asmName.CultureInfo <- System.Globalization.CultureInfo.InvariantCulture
#endif
asmName

/// The global environment.
Expand Down Expand Up @@ -663,9 +657,6 @@ let TypeBuilderInstantiationT =
ty

let typeIsNotQueryable (ty: Type) =
#if FX_RESHAPED_REFLECTION
let ty = ty.GetTypeInfo()
#endif
(ty :? TypeBuilder) || ((ty.GetType()).Equals(TypeBuilderInstantiationT))
//----------------------------------------------------------------------------
// convFieldSpec
Expand Down Expand Up @@ -794,11 +785,7 @@ let queryableTypeGetMethod cenv emEnv parentT (mref: ILMethodRef) =
parentT.GetMethod(mref.Name, cconv ||| BindingFlags.Public ||| BindingFlags.NonPublic,
null,
argTs,
#if FX_RESHAPED_REFLECTION
(null: obj[]))
#else
(null: ParameterModifier[]))
#endif
// This can fail if there is an ambiguity w.r.t. return type
with _ -> null
if (isNonNull methInfo && equalTypes resT methInfo.ReturnType) then
Expand Down Expand Up @@ -1434,11 +1421,7 @@ let buildGenParamsPass1 _emEnv defineGenericParameters (gps: ILGenericParameterD


let buildGenParamsPass1b cenv emEnv (genArgs: Type array) (gps: ILGenericParameterDefs) =
#if FX_RESHAPED_REFLECTION
let genpBs = genArgs |> Array.map (fun x -> (x.GetTypeInfo() :?> GenericTypeParameterBuilder))
#else
let genpBs = genArgs |> Array.map (fun x -> (x :?> GenericTypeParameterBuilder))
#endif
gps |> List.iteri (fun i (gp: ILGenericParameterDef) ->
let gpB = genpBs.[i]
// the Constraints are either the parent (base) type or interfaces.
Expand Down
3 changes: 0 additions & 3 deletions src/absil/ilwrite.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3035,9 +3035,6 @@ module FileSystemUtilites =
open System
open System.Reflection
open System.Globalization
#if FX_RESHAPED_REFLECTION
open Microsoft.FSharp.Core.ReflectionAdapters
#endif
let progress = try System.Environment.GetEnvironmentVariable("FSharp_DebugSetFilePermissions") <> null with _ -> false
let setExecutablePermission (filename: string) =

Expand Down
Loading

0 comments on commit 7891cbd

Please sign in to comment.