Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FS-1030] - Anonymous records #4499

Merged
merged 37 commits into from
Nov 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
b952b72
anonymous record types implementation
dsyme Mar 13, 2018
4335cff
stable tests
dsyme Mar 13, 2018
6000c34
fix build
dsyme Mar 14, 2018
375b422
Merge branch 'master' of http://github.com/Microsoft/visualfsharp int…
dsyme Mar 14, 2018
1ffbee7
copy and update
dsyme Mar 14, 2018
4f424c2
more tests
dsyme Mar 14, 2018
b73595a
merge master
dsyme Mar 14, 2018
9b9f6bf
update ilxgen
dsyme Mar 15, 2018
f42054a
adjust test
dsyme Mar 16, 2018
d0c72c2
Merge branch 'master' into anon-1
dsyme Mar 17, 2018
2b51188
conflicts
dsyme Mar 17, 2018
770ea52
integrate
dsyme Mar 17, 2018
7a33c05
fix test
dsyme Mar 17, 2018
98c5b50
merge mastar
dsyme Mar 19, 2018
c2b02c1
fix test
dsyme Mar 21, 2018
c246f83
Merge branch 'dev15.8' of http://github.com/Microsoft/visualfsharp in…
dsyme Mar 22, 2018
cbb0d51
simplify diff
dsyme May 4, 2018
05ceaca
simplify diff
dsyme May 4, 2018
91a969c
simplify diff
dsyme May 4, 2018
2291857
simplify diff
dsyme May 4, 2018
a0f54ce
simplify diff
dsyme May 4, 2018
d4c4267
integrate dev15.8
dsyme May 4, 2018
1f5a26b
integrate dev15.8
dsyme May 4, 2018
ddb3ca8
integrate dev15.8
dsyme May 4, 2018
f3e3fe0
integrate dev15.8
dsyme Jun 1, 2018
f05a399
integrate dev15.8
dsyme Jun 1, 2018
579f31b
update FSComp
dsyme Jun 1, 2018
b914569
merge master
dsyme Oct 9, 2018
fafad3c
re-add tests
dsyme Oct 11, 2018
bf935d5
fix tests
dsyme Oct 11, 2018
836d7d2
update FSharp.Core dependency
dsyme Oct 12, 2018
af018f8
Merge branch 'master' of http://github.com/Microsoft/visualfsharp int…
dsyme Oct 12, 2018
5724850
integrate master
dsyme Oct 23, 2018
2b882b2
update tools version
dsyme Oct 23, 2018
17d05ae
fix fcs build
dsyme Oct 23, 2018
eba9851
Merge branch 'master' of http://github.com/Microsoft/visualfsharp int…
dsyme Oct 24, 2018
0e495f3
integrate master
dsyme Oct 31, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions DEVGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ See the "Debugging The Compiler" section of this [article](https://medium.com/@w
- We use the proto compiler to compile the source for `FSharp.Core.dll` in this distribution.
- We use the proto compiler to compile the source for `FSharp.Compiler.dll`, `fsc.exe`, `fsi.exe`, and other binaries found in this distribution.

#### Updating FSComp.fs
#### Updating FSComp.fs, FSComp.resx and XLF

If you change error messages you may need to update FSComp.fs in `src\buildfromsource\FSharp.Compiler.Private`.

Expand All @@ -239,6 +239,14 @@ To do this, build the non-buildfromsource version of FSharp.Compiler.Private (sr
.\build net40
copy /y src\fsharp\FSharp.Compiler.Private\obj\release\net40\FSComp.* src\buildfromsource\FSharp.Compiler.Private\

If your changes involve modifying the list of language keywords in any way, (e.g. when implementing a new keyword), the XLF localization files need to be synced with the corresponding resx files. This can be done automatically by running

pushd src\fsharp\FSharp.Compiler.Private
msbuild FSharp.Compiler.Private.fsproj /t:UpdateXlf
popd

This only works on Windows/.NETStandard framework, so changing this from any other platform requires editing and syncing all of the XLF files manually.

You can also change build.cmd to default COPY_FSCOMP_RESOURCE_FOR_BUILD_FROM_SOURCES to 1 under ":ARGUMENTS_OK" label.

#### Configuring proxy server
Expand All @@ -251,11 +259,6 @@ If you are behind a proxy server, NuGet client tool must be configured to use it

Where you should set proper proxy address, user name and password.

#### When modifying, adding, or removing keywords or compiler messages

If your changes involve modifying the list of language keywords in any way, (e.g. when implementing a new keyword), the XLF localization files need to be synced with the corresponding resx files. This can be done automatically by running `msbuild FSharp.Compiler.Private.fsproj /t:UpdateXlf` (located in [src\fsharp\FSharp.Compiler.Private](https://github.com/Microsoft/visualfsharp/tree/master/src/fsharp/FSharp.Compiler.Private)). This only works on Windows/.NETStandard framework, so changing this from any other platform requires editing and syncing all of the XLF files manually.

After this, you must copy any differing `resx` files from the output directory into the corresponding subdirectory in [src\buildfromsource](https://github.com/Microsoft/visualfsharp/tree/master/src/fsharp/FSharp.Compiler.Private). This step will soon be eliminated (see issue [#3905](https://github.com/Microsoft/visualfsharp/issues/3905)).

#### Resources

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<ItemGroup>
<Reference Include="System.Runtime" />
<Reference Include="System.IO" />
<PackageReference Include="FSharp.Core" Version="4.1.18" />
<PackageReference Include="FSharp.Core" Version="4.5.2" />
<ProjectReference Include="..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
<Reference Include="Microsoft.Build.Framework, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>$(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Framework.dll</HintPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<ItemGroup>
<Reference Include="System.Runtime" />
<Reference Include="System.IO" />
<PackageReference Include="FSharp.Core" Version="4.1.18" />
<PackageReference Include="FSharp.Core" Version="4.5.2" />
<ProjectReference Include="..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.Portable.FSharp.Core.$(FSharpCoreFrozenPortablePackageVersion)\lib\profiles\net40\FSharp.Core.dll</HintPath>
<Private>false</Private>
</Reference>
<PackageReference Include="FSharp.Core" Version="4.1.18" />
<PackageReference Include="FSharp.Core" Version="4.5.2" />
<Reference Include="Microsoft.Build.Framework, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>$(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Framework.dll</HintPath>
<Private>false</Private>
Expand Down
2 changes: 1 addition & 1 deletion fcs/build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ let isMono = false
// Utilities
// --------------------------------------------------------------------------------------

let dotnetExePath = DotNetCli.InstallDotNetSDK "2.1.201"
let dotnetExePath = DotNetCli.InstallDotNetSDK "2.1.403"

let runDotnet workingDir args =
let result =
Expand Down
2 changes: 1 addition & 1 deletion fcs/samples/EditorService/EditorService.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="FSharp.Core" Version="4.1.*" />
<PackageReference Include="FSharp.Core" Version="4.5.2" />
<ProjectReference Include="..\..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
<PackageReference Include="System.Reflection.Metadata" Version="1.6.0" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion fcs/samples/FscExe/FscExe.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</ItemGroup>
<ItemGroup>
<Reference Include="System.Runtime.Remoting" />
<PackageReference Include="FSharp.Core" Version="4.1.*" />
<PackageReference Include="FSharp.Core" Version="4.5.2" />
<ProjectReference Include="..\..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net46'">
Expand Down
2 changes: 1 addition & 1 deletion fcs/samples/FsiExe/FsiExe.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<ItemGroup>
<Reference Include="System.Runtime.Remoting" />
<Reference Include="System.Windows.Forms" />
<PackageReference Include="FSharp.Core" Version="4.1.*" />
<PackageReference Include="FSharp.Core" Version="4.5.2" />
<ProjectReference Include="..\..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net46'">
Expand Down
2 changes: 1 addition & 1 deletion fcs/samples/InteractiveService/InteractiveService.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="FSharp.Core" Version="4.1.*" />
<PackageReference Include="FSharp.Core" Version="4.5.2" />
<ProjectReference Include="..\..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net46'">
Expand Down
2 changes: 1 addition & 1 deletion fcs/samples/Tokenizer/Tokenizer.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="FSharp.Core" Version="4.1.*" />
<PackageReference Include="FSharp.Core" Version="4.5.2" />
<ProjectReference Include="..\..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net46'">
Expand Down
2 changes: 1 addition & 1 deletion fcs/samples/UntypedTree/UntypedTree.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="FSharp.Core" Version="4.1.*" />
<PackageReference Include="FSharp.Core" Version="4.5.2" />
<ProjectReference Include="..\..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net46'">
Expand Down
4 changes: 4 additions & 0 deletions src/absil/il.fs
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,12 @@ module SHA1 =
let (_h0, _h1, _h2, h3, h4) = sha1Hash { stream = s; pos = 0; eof = false } // the result of the SHA algorithm is stored in registers 3 and 4
Array.map byte [| b0 h4; b1 h4; b2 h4; b3 h4; b0 h3; b1 h3; b2 h3; b3 h3; |]

let sha1HashInt64 s =
let (_h0,_h1,_h2,h3,h4) = sha1Hash { stream = s; pos = 0; eof = false } // the result of the SHA algorithm is stored in registers 3 and 4
(int64 h3 <<< 32) ||| int64 h4

let sha1HashBytes s = SHA1.sha1HashBytes s
let sha1HashInt64 s = SHA1.sha1HashInt64 s

// --------------------------------------------------------------------
//
Expand Down
1 change: 1 addition & 0 deletions src/absil/il.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -1955,6 +1955,7 @@ val isILTypedReferenceTy: ILType -> bool
val isILDoubleTy: ILType -> bool
val isILSingleTy: ILType -> bool

val sha1HashInt64 : byte[] -> int64
/// Get a public key token from a public key.
val sha1HashBytes: byte[] -> byte[] (* SHA1 hash *)

Expand Down
Loading