Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
ef0949c
Copy sources from Versions.props to NuGet.config (#7191)
Jul 11, 2019
0c9ccae
Only check distinct errors (#7140)
forki Jul 11, 2019
598db3e
Use 1-based column numbers in tests (#7141)
forki Jul 11, 2019
fe0426a
Merge pull request #7197 from dotnet/merges/master-to-release/dev16.3
KevinRansom Jul 11, 2019
bf1055c
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Jul 11, 2019
13596c4
Merge pull request #7201 from dotnet/merges/master-to-release/dev16.3
KevinRansom Jul 12, 2019
da432e1
Better record and value formatting in tools (#7021)
cartermp Jul 12, 2019
660a545
fix portable PDBs for anon records (#7099)
dsyme Jul 12, 2019
9dc9d0e
fix portable PDBs for anon records (#7099)
dsyme Jul 12, 2019
60c915a
Moving ElseBranchHasWrongTypeTests over to NUnit (#7104)
forki Jul 12, 2019
869c2bb
Port tests for missing else branch to NUnit (#7209)
forki Jul 12, 2019
c80a0cb
Merge pull request #7208 from KevinRansom/cherrypickfix
KevinRansom Jul 12, 2019
2fabdaa
Merge pull request #7213 from dotnet/merges/master-to-release/dev16.3
brettfo Jul 12, 2019
59bfc83
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Jul 12, 2019
8ab272a
Update dependencies from https://github.com/dotnet/arcade build 20190…
Jul 13, 2019
1ad5657
Merge pull request #7222 from dotnet/merges/master-to-release/dev16.3
KevinRansom Jul 13, 2019
b7d5efd
Merge branch 'release/dev16.3' into merges/release/fsharp47-to-releas…
KevinRansom Jul 13, 2019
7780cab
Fix Supplementary Character / Surrogate Pair info (no code changes) (…
srutzky Jul 13, 2019
30cce45
Merge pull request #7228 from dotnet/merges/master-to-release/dev16.3
KevinRansom Jul 14, 2019
0abf39c
Merge pull request #7223 from dotnet/merges/release/fsharp47-to-relea…
KevinRansom Jul 14, 2019
f9a8e2a
Update IlxGen.fs (#7227)
TIHan Jul 14, 2019
c79a8ab
Merge pull request #7225 from dotnet/darc-master-1d1b7b40-d7f9-4b9d-9…
KevinRansom Jul 14, 2019
ec8a424
Check for exit code in compiler tests (#7211)
forki Jul 14, 2019
c4dba1f
Moving AccessOfTypeAbbreviationTests over to NUnit (#7226)
sergey-tihon Jul 14, 2019
f720c73
Merge pull request #7230 from dotnet/merges/master-to-release/dev16.3
KevinRansom Jul 14, 2019
75cef56
Moving ConstructorTests over to NUnit (#7236)
sergey-tihon Jul 15, 2019
c7cd220
[master] Update dependencies from dotnet/arcade (#7233)
dotnet-maestro[bot] Jul 15, 2019
0f24b3e
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Jul 16, 2019
863ec25
Moving UpcastDowncastTests over to NUnit (#7229)
sergey-tihon Jul 16, 2019
c8bac72
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Jul 17, 2019
6980587
Move ErrorMessages/NameResolution Tests to NUnit (#7237)
kMutagene Jul 17, 2019
4cf7b5b
Moving WarnExpressionTests over to NUnit (#7232)
sergey-tihon Jul 17, 2019
2f270f2
Merge pull request #7241 from dotnet/merges/master-to-release/dev16.3
KevinRansom Jul 17, 2019
650805b
move some error and warning tests to NUnit (#7244)
smcl Jul 17, 2019
375fd7c
Update dependencies from https://github.com/dotnet/arcade build 20190…
Jul 18, 2019
8d74566
Merge pull request #7253 from dotnet/darc-master-648345c2-b59c-4cd2-9…
KevinRansom Jul 19, 2019
c423de9
Move UnitGenericAbstractType To Nunit (#7257)
falfaddaghi Jul 19, 2019
4151eb2
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Jul 19, 2019
bdb2b79
Moving TypeMismatchTests over to NUnit (#7250)
sergey-tihon Jul 19, 2019
b0e5926
publish pdbs in FSharp.Core.nupkg (#7255)
brettfo Jul 19, 2019
3e7b66d
Enable hash algorithm selection (#7252)
KevinRansom Jul 20, 2019
c70ead8
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Jul 20, 2019
ff7b8ff
Improve netcore reference selection (#7263)
KevinRansom Jul 22, 2019
d53a38c
Moving Libraries Control tests to NUnit (#7234)
thinkbeforecoding Jul 22, 2019
5efa8a7
Member constraints and PrimitiveConstraints (#7210)
forki Jul 22, 2019
a7c68c3
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Jul 23, 2019
a67156b
Merge branch 'master' into merges/release/dev16.2-to-master
brettfo Jul 24, 2019
0bd851b
Merge pull request #7272 from dotnet/merges/release/dev16.2-to-master
Jul 25, 2019
37970b4
fixes issue #6832 (#7259)
KevinRansom Jul 25, 2019
8e843ae
[master] Update dependencies from dotnet/arcade (#7269)
dotnet-maestro[bot] Jul 26, 2019
b3811d2
Merge pull request #7279 from dotnet/merges/release/fsharp47-to-relea…
Jul 26, 2019
ce483c0
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Jul 26, 2019
969a9c4
Fix test assert (#7283)
KevinRansom Jul 26, 2019
2304ea4
merge
KevinRansom Jul 26, 2019
c03755f
disablewarningtests
KevinRansom Jul 27, 2019
d488458
Merge pull request #7266 from dotnet/merges/master-to-release/dev16.3
Jul 27, 2019
cc60ed6
code cleanup prior to optional interop improvements (#7276)
dsyme Jul 27, 2019
e72ded1
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Jul 27, 2019
bdb229c
Moving ClassesTests over to NUnit (#7264)
sergey-tihon Jul 27, 2019
8370ef6
Move Basic Constants to NUnit (#7262)
falfaddaghi Jul 27, 2019
3ce8eb1
Moved Don't Suggest Tests over to NUnit (#7288)
sergey-tihon Jul 29, 2019
868b76a
[master] Update dependencies from dotnet/arcade (#7287)
dotnet-maestro[bot] Jul 29, 2019
9c1a0d1
Fix langversion with multiple projects (#7293)
KevinRansom Jul 30, 2019
8edf449
Merge remote-tracking branch 'upstream/master' into merges/master-to-…
brettfo Jul 30, 2019
54f13f0
Merge pull request #7292 from dotnet/merges/master-to-release/dev16.3
Jul 30, 2019
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
Prev Previous commit
Next Next commit
fixes issue #6832 (#7259)
* fixes issue #6832

* Fix comment

* Forgot to remove pdbs from fsharp.compiler.nuget

* Rename Program.fs and exclude FSharpSdk from checks

* Embedded doesn't need to verify tmp or obj directories.

* typo

* typo

* Don't check FSharpSdk for hash

* Make comment match code

* Empty commit to force rebuild
  • Loading branch information
KevinRansom authored Jul 25, 2019
commit 37970b41db5c858411fc42876233e608844c9f58
3 changes: 2 additions & 1 deletion FSharpBuild.Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
<RepositoryUrl Condition="'$(RepositoryUrl)' == ''">https://github.com/Microsoft/visualfsharp</RepositoryUrl>
<RepositoryType Condition="'$(RepositoryType)' == ''">git</RepositoryType>
</PropertyGroup>

<PropertyGroup Condition="'$(FSharpSourceBuild)' == 'true' AND '$(RepositoryCommit)' == ''">
<_DotGitDir>$(RepoRoot).git</_DotGitDir>
<_HeadFileContent Condition="Exists('$(_DotGitDir)/HEAD')">$([System.IO.File]::ReadAllText('$(_DotGitDir)/HEAD').Trim())</_HeadFileContent>
Expand All @@ -87,7 +88,7 @@
<PropertyGroup>
<NoWarn Condition="'$(Language)' == 'F#'">$(NoWarn);FS2003</NoWarn><!-- warning when AssemblyInformationalVersion looks like '1.2.3-dev' -->
<NoCompilerStandardLib>true</NoCompilerStandardLib><!-- necessary for resource generation using csc.exe -->
<DebugType>portable</DebugType>
<DebugType>embedded</DebugType>
<MicroBuildAssemblyFileLanguage>fs</MicroBuildAssemblyFileLanguage>
<UseStandardResourceNames>false</UseStandardResourceNames>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down
11 changes: 6 additions & 5 deletions eng/Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,14 @@ function UpdatePath() {
TestAndAddToPath "$ArtifactsDir\bin\fsiAnyCpu\$configuration\net472"
}

function VerifyAssemblyVersions() {
$fsiPath = Join-Path $ArtifactsDir "bin\fsi\Proto\net472\publish\fsi.exe"
function VerifyAssemblyVersionsAndSymbols() {
$assemblyVerCheckPath = Join-Path $ArtifactsDir "Bootstrap\AssemblyCheck\AssemblyCheck.dll"

# Only verify versions on CI or official build
if ($ci -or $official) {
$asmVerCheckPath = "$RepoRoot\scripts"
Exec-Console $fsiPath """$asmVerCheckPath\AssemblyVersionCheck.fsx"" -- ""$ArtifactsDir"""
$dotnetPath = InitializeDotNetCli
$dotnetExe = Join-Path $dotnetPath "dotnet.exe"
Exec-Console $dotnetExe """$assemblyVerCheckPath"" ""$ArtifactsDir"""
}
}

Expand Down Expand Up @@ -307,7 +308,7 @@ try {
}

if ($build) {
VerifyAssemblyVersions
VerifyAssemblyVersionsAndSymbols
}

$desktopTargetFramework = "net472"
Expand Down
3 changes: 2 additions & 1 deletion eng/build-utils.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,11 @@ function Make-BootstrapBuild() {
Remove-Item -re $dir -ErrorAction SilentlyContinue
Create-Directory $dir

# prepare FsLex and Fsyacc
# prepare FsLex and Fsyacc and AssemblyCheck
Run-MSBuild "$RepoRoot\src\buildtools\buildtools.proj" "/restore /t:Publish" -logFileName "BuildTools" -configuration $bootstrapConfiguration
Copy-Item "$ArtifactsDir\bin\fslex\$bootstrapConfiguration\netcoreapp2.1\publish" -Destination "$dir\fslex" -Force -Recurse
Copy-Item "$ArtifactsDir\bin\fsyacc\$bootstrapConfiguration\netcoreapp2.1\publish" -Destination "$dir\fsyacc" -Force -Recurse
Copy-Item "$ArtifactsDir\bin\AssemblyCheck\$bootstrapConfiguration\netcoreapp2.1\publish" -Destination "$dir\AssemblyCheck" -Force -Recurse

# prepare compiler
$projectPath = "$RepoRoot\proto.proj"
Expand Down
2 changes: 1 addition & 1 deletion src/absil/ilwritepdb.fs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ let pdbGetEmbeddedPdbDebugInfo (embeddedPdbChunk: BinaryChunk) (uncompressedLeng
Buffer.BlockCopy(stream.ToArray(), 0, buffer, offset, size)
buffer
{ iddCharacteristics = 0 // Reserved
iddMajorVersion = 0 // VersionMajor should be 0
iddMajorVersion = 0x0100 // VersionMajor should be 0x0100
iddMinorVersion = 0x0100 // VersionMinor should be 0x0100
iddType = 17 // IMAGE_DEBUG_TYPE_EMBEDDEDPDB
iddTimestamp = 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,50 @@
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.

open System
open System.Diagnostics
open System.IO
open System.Reflection
open System.Reflection.PortableExecutable
open System.Text.RegularExpressions

module AssemblyVersionCheck =
module AssemblyCheck =

let private versionZero = Version(0, 0, 0, 0)
let private versionOne = Version(1, 0, 0, 0)
let private commitHashPattern = new Regex(@"Commit Hash: (<developer build>)|([0-9a-fA-F]{40})", RegexOptions.Compiled)
let private devVersionPattern = new Regex(@"-(ci|dev)", RegexOptions.Compiled)

let verifyAssemblyVersions (binariesPath:string) =
let verifyEmbeddedPdb (filename:string) =
use fileStream = File.OpenRead(filename)
let reader = new PEReader(fileStream)
let mutable hasEmbeddedPdb = false

try
for entry in reader.ReadDebugDirectory() do
match entry.Type with
| DebugDirectoryEntryType.CodeView ->
let _ = reader.ReadCodeViewDebugDirectoryData(entry)
()

| DebugDirectoryEntryType.EmbeddedPortablePdb ->
let _ = reader.ReadEmbeddedPortablePdbDebugDirectoryData(entry)
hasEmbeddedPdb <- true
()

| DebugDirectoryEntryType.PdbChecksum ->
let _ = reader.ReadPdbChecksumDebugDirectoryData(entry)
()

| _ -> ()
with | e -> printfn "Error validating assembly %s\nMessage: %s" filename (e.ToString())
hasEmbeddedPdb

let verifyAssemblies (binariesPath:string) =

let excludedAssemblies =
[ "FSharp.Data.TypeProviders.dll" ]
|> Set.ofList

let fsharpAssemblies =
[ "FSharp*.dll"
"fsc.exe"
Expand All @@ -28,12 +56,17 @@ module AssemblyVersionCheck =
|> List.ofSeq
|> List.filter (fun p -> (Set.contains (Path.GetFileName(p)) excludedAssemblies) |> not)

let fsharpExecutingWithEmbeddedPdbs =
fsharpAssemblies
|> List.filter (fun p -> not (p.Contains(@"\Proto\") || p.Contains(@"\Bootstrap\") || p.Contains(@".resources.") || p.Contains(@"\FSharpSdk\") || p.Contains(@"\tmp\") || p.Contains(@"\obj\")))

// verify that all assemblies have a version number other than 0.0.0.0 or 1.0.0.0
let failedVersionCheck =
fsharpAssemblies
|> List.filter (fun a ->
let assemblyVersion = AssemblyName.GetAssemblyName(a).Version
assemblyVersion = versionZero || assemblyVersion = versionOne)

if failedVersionCheck.Length > 0 then
printfn "The following assemblies had a version of %A or %A" versionZero versionOne
printfn "%s\r\n" <| String.Join("\r\n", failedVersionCheck)
Expand All @@ -43,27 +76,36 @@ module AssemblyVersionCheck =
// verify that all assemblies have a commit hash
let failedCommitHash =
fsharpAssemblies
|> List.filter (fun p -> not (p.Contains(@"\FSharpSdk\")))
|> List.filter (fun a ->
let fileProductVersion = FileVersionInfo.GetVersionInfo(a).ProductVersion
not (commitHashPattern.IsMatch(fileProductVersion) || devVersionPattern.IsMatch(fileProductVersion)))

if failedCommitHash.Length > 0 then
printfn "The following assemblies don't have a commit hash set"
printfn "%s\r\n" <| String.Join("\r\n", failedCommitHash)
else
printfn "All shipping assemblies had an appropriate commit hash."

// verify that all assemblies have an embedded pdb
let failedVerifyEmbeddedPdb =
fsharpExecutingWithEmbeddedPdbs
|> List.filter (fun a -> not (verifyEmbeddedPdb a))

if failedVerifyEmbeddedPdb.Length > 0 then
printfn "The following assemblies don't have an embedded pdb"
printfn "%s\r\n" <| String.Join("\r\n", failedVerifyEmbeddedPdb)
else
printfn "All shipping assemblies had an embedded PDB."

// return code is the number of failures
failedVersionCheck.Length + failedCommitHash.Length
failedVersionCheck.Length + failedCommitHash.Length + failedVerifyEmbeddedPdb.Length


[<EntryPoint>]
let main (argv:string array) =
if argv.Length <> 1 then
printfn "Usage: fsi.exe AssemblyVersionCheck.fsx -- path/to/binaries"
printfn "Usage: dotnet AssemblyCheck.dll -- path/to/binaries"
1
else
AssemblyVersionCheck.verifyAssemblyVersions argv.[0]

Environment.GetCommandLineArgs()
|> Seq.skipWhile ((<>) "--")
|> Seq.skip 1
|> Array.ofSeq
|> main
AssemblyCheck.verifyAssemblies argv.[0]
17 changes: 17 additions & 0 deletions src/buildtools/AssemblyCheck/AssemblyCheck.fsproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
</PropertyGroup>

<ItemGroup>
<Compile Include="AssemblyCheck.fs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="$(MSBuildThisFileDirectory)..\..\fsharp\FSharp.Core\FSharp.Core.fsproj" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions src/buildtools/buildtools.proj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<ItemGroup>
<Projects Include="fslex\fslex.fsproj" />
<Projects Include="fsyacc\fsyacc.fsproj" />
<Projects Include="AssemblyCheck\AssemblyCheck.fsproj" />
</ItemGroup>

<Target Name="Build">
Expand Down
14 changes: 3 additions & 11 deletions src/fsharp/FSharp.Compiler.nuget/Microsoft.FSharp.Compiler.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,7 @@
<file src="FSharp.Compiler.Private\$Configuration$\netstandard2.0\FSharp.Compiler.Private.dll" target="lib\netcoreapp2.1" />
<file src="FSharp.Build\$Configuration$\netcoreapp2.1\FSharp.Build.dll" target="lib\netcoreapp2.1" />
<file src="FSharp.Compiler.Interactive.Settings\$Configuration$\netstandard2.0\FSharp.Compiler.Interactive.Settings.dll"
target="lib\netcoreapp2.1" />
<!-- symbols -->
<file src="fsc\$Configuration$\netcoreapp2.1\fsc.pdb" target="lib\netcoreapp2.1" />
<file src="fsi\$Configuration$\netcoreapp2.1\fsi.pdb" target="lib\netcoreapp2.1" />
<file src="FSharp.Core\$Configuration$\netstandard1.6\FSharp.Core.pdb" target="lib\netcoreapp2.1" />
<file src="FSharp.Compiler.Private\$Configuration$\netstandard2.0\FSharp.Compiler.Private.pdb" target="lib\netcoreapp2.1" />
<file src="FSharp.Build\$Configuration$\netcoreapp2.1\FSharp.Build.pdb" target="lib\netcoreapp2.1" />
<file src="FSharp.Compiler.Interactive.Settings\$Configuration$\netstandard2.0\FSharp.Compiler.Interactive.Settings.pdb"
target="lib\netcoreapp2.1" />
target="lib\netcoreapp2.1" />
<!-- additional files -->
<file src="fsc\$Configuration$\netcoreapp2.1\default.win32manifest" target="contentFiles\any\any" />
<file src="FSharp.Build\$Configuration$\netcoreapp2.1\Microsoft.FSharp.Targets" target="contentFiles\any\any" />
Expand All @@ -69,9 +61,9 @@
<!-- resources -->
<file src="FSharp.Core\$Configuration$\netstandard1.6\**\FSharp.Core.resources.dll" target="lib\netcoreapp2.1" />
<file src="FSharp.Compiler.Private\$Configuration$\netstandard2.0\**\FSharp.Compiler.Private.resources.dll"
target="lib\netcoreapp2.1" />
target="lib\netcoreapp2.1" />
<file src="FSharp.Compiler.Interactive.Settings\$Configuration$\netstandard2.0\**\FSharp.Compiler.Interactive.Settings.resources.dll"
target="lib\netcoreapp2.1" />
target="lib\netcoreapp2.1" />
<file src="FSharp.Build\$Configuration$\netcoreapp2.1\**\FSharp.Build.resources.dll" target="lib\netcoreapp2.1" />
</files>
</package>
2 changes: 0 additions & 2 deletions src/fsharp/FSharp.Core.nuget/FSharp.Core.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,11 @@
</metadata>
<files>
<file src="FSharp.Core\$Configuration$\netstandard1.6\FSharp.Core.dll" target="lib\netstandard1.6" />
<file src="FSharp.Core\$Configuration$\netstandard1.6\FSharp.Core.pdb" target="lib\netstandard1.6" />
<file src="FSharp.Core\$Configuration$\netstandard1.6\FSharp.Core.sigdata" target="lib\netstandard1.6" />
<file src="FSharp.Core\$Configuration$\netstandard1.6\FSharp.Core.optdata" target="lib\netstandard1.6" />
<file src="FSharp.Core\$Configuration$\netstandard1.6\FSharp.Core.xml" target="lib\netstandard1.6" />

<file src="FSharp.Core\$Configuration$\net45\FSharp.Core.dll" target="lib\net45" />
<file src="FSharp.Core\$Configuration$\net45\FSharp.Core.pdb" target="lib\net45" />
<file src="FSharp.Core\$Configuration$\net45\FSharp.Core.sigdata" target="lib\net45" />
<file src="FSharp.Core\$Configuration$\net45\FSharp.Core.optdata" target="lib\net45" />
<file src="FSharp.Core\$Configuration$\net45\FSharp.Core.xml" target="lib\net45" />
Expand Down