Skip to content

Commit

Permalink
Merged into dev16
Browse files Browse the repository at this point in the history
  • Loading branch information
TIHan committed Nov 13, 2018
2 parents d50fce6 + 4156112 commit ac0a91d
Show file tree
Hide file tree
Showing 545 changed files with 6,698 additions and 3,318 deletions.
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
2 changes: 1 addition & 1 deletion DotnetCLIToolsVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.400-preview-009197
2.1.403
2 changes: 1 addition & 1 deletion RoslynPackageVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.11.0-beta1-63430-03
2.11.0-beta1-63431-08
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<ItemGroup>
<Reference Include="System.Runtime" />
<Reference Include="System.IO" />
<PackageReference Include="FSharp.Core" Version="4.5.2" />
<PackageReference Include="FSharp.Core" Version="4.1.19" />
<PackageReference Include="FSharp.Core" Version="4.1.18" />
<ProjectReference Include="..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<ItemGroup>
<Reference Include="System.Runtime" />
<Reference Include="System.IO" />
<PackageReference Include="FSharp.Core" Version="4.5.2" />
<PackageReference Include="FSharp.Core" Version="4.1.19" />
<PackageReference Include="FSharp.Core" Version="4.1.18" />
<ProjectReference Include="..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
Expand Down
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/docsrc/content/ja/tokenizer.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ let rec tokenizeLine (tokenizer:FSharpLineTokenizer) state =
必要となるような新しい状態を返します。
初期値としては `0L` を指定します:
*)
tokenizeLine tokenizer 0L
tokenizeLine tokenizer FSharpTokenizerLexState.Initial
(**
この結果は LET WHITESPACE IDENT EQUALS INT32 という
トークン名のシーケンスになります。
Expand Down
2 changes: 1 addition & 1 deletion fcs/docsrc/content/tokenizer.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ let rec tokenizeLine (tokenizer:FSharpLineTokenizer) state =
The function returns the new state, which is needed if you need to tokenize multiple lines
and an earlier line ends with a multi-line comment. As an initial state, we can use `0L`:
*)
tokenizeLine tokenizer 0L
tokenizeLine tokenizer FSharpTokenizerLexState.Initial
(**
The result is a sequence of tokens with names LET, WHITESPACE, IDENT, EQUALS and INT32.
There is a number of interesting properties on `FSharpTokenInfo` including:
Expand Down
1 change: 1 addition & 0 deletions fcs/samples/EditorService/EditorService.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="FSharp.Core" Version="4.5.2" />
<PackageReference Include="FSharp.Core" Version="4.1.19" />
<ProjectReference Include="..\..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
<PackageReference Include="System.Reflection.Metadata" Version="1.6.0" />
Expand Down
1 change: 1 addition & 0 deletions fcs/samples/FscExe/FscExe.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
</ItemGroup>
<ItemGroup>
<Reference Include="System.Runtime.Remoting" />
<PackageReference Include="FSharp.Core" Version="4.5.2" />
<PackageReference Include="FSharp.Core" Version="4.1.19" />
<ProjectReference Include="..\..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
</ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions fcs/samples/FsiExe/FsiExe.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<ItemGroup>
<Reference Include="System.Runtime.Remoting" />
<Reference Include="System.Windows.Forms" />
<PackageReference Include="FSharp.Core" Version="4.5.2" />
<PackageReference Include="FSharp.Core" Version="4.1.19" />
<ProjectReference Include="..\..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
</ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions fcs/samples/InteractiveService/InteractiveService.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="FSharp.Core" Version="4.5.2" />
<PackageReference Include="FSharp.Core" Version="4.1.19" />
<ProjectReference Include="..\..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion fcs/samples/Tokenizer/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
let sourceTok = FSharpSourceTokenizer([], Some "C:\\test.fsx")

let tokenizeLines (lines:string[]) =
[ let state = ref 0L
[ let state = ref FSharpTokenizerLexState.Initial
for n, line in lines |> Seq.zip [ 0 .. lines.Length ] do
let tokenizer = sourceTok.CreateLineTokenizer(line)
let rec parseLine() = seq {
Expand Down
1 change: 1 addition & 0 deletions fcs/samples/Tokenizer/Tokenizer.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="FSharp.Core" Version="4.5.2" />
<PackageReference Include="FSharp.Core" Version="4.1.19" />
<ProjectReference Include="..\..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
</ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions fcs/samples/UntypedTree/UntypedTree.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="FSharp.Core" Version="4.5.2" />
<PackageReference Include="FSharp.Core" Version="4.1.29" />
<ProjectReference Include="..\..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
</ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion setup/Swix/Microsoft.FSharp.Compiler/Files.swr
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharp"
file source="$(BinariesFolder)\net40\bin\Microsoft.Portable.FSharp.Targets"
file source="$(BinariesFolder)\net40\bin\System.Collections.Immutable.dll"
file source="$(BinariesFolder)\net40\bin\System.Reflection.Metadata.dll"
file source="$(BinariesFolder)\net40\bin\System.ValueTuple.dll"
file source="$(BinariesFolder)\net40\bin\Microsoft.FSharp.NetSdk.props"
file source="$(BinariesFolder)\net40\bin\Microsoft.FSharp.NetSdk.targets"
file source="$(BinariesFolder)\net40\bin\Microsoft.FSharp.Overrides.NetSdk.targets"
Expand Down
4 changes: 3 additions & 1 deletion src/FSharpSource.targets
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@
<Import Project="FSharpSource.Profiles.targets" />

<PropertyGroup Condition="'$(TargetDotnetProfile)'=='net40'">
<TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v4.6</TargetFrameworkVersion>
<!-- target .NET 4.7.2, except on Mono which doesn't have 4.7.2 reference assemblies yet -->
<TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == '' AND '$(MonoPackaging)' != 'true'">v4.7.2</TargetFrameworkVersion>
<TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == '' AND '$(MonoPackaging)' == 'true'">v4.6</TargetFrameworkVersion>
<TargetFrameworkProfile></TargetFrameworkProfile>
<!-- MSbuild works out the assembly references -->
</PropertyGroup>
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

0 comments on commit ac0a91d

Please sign in to comment.