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

Add support for configurable hashing for source checksums #1223

Closed
KevinRansom opened this issue May 26, 2016 · 4 comments
Closed

Add support for configurable hashing for source checksums #1223

KevinRansom opened this issue May 26, 2016 · 4 comments
Assignees
Milestone

Comments

@KevinRansom
Copy link
Member

Internal thread:

From: Mike Lai
Sent: Monday, May 23, 2016 3:44 PM
To: Kevin Ransom [email protected]
Cc: Michael Fanning (DEVDIV) [email protected]; Tomas Matousek [email protected]
Subject: RE: F# Compiler (fsc.exe)

I see, Kevin. Would you mind to consider our request to make SHA256 as one of available sections, please?

All the following compilers support SHA256 today.

Thanks
Mike

• cl.exe /ZH:SHA_256
• ml.exe /ZH:SHA_256
• ml64.exe /ZH:SHA_256
• armasm.exe -gh:SHA_256
• armasm64.exe -gh:SHA_256
• csc.exe /checksumalgorithm:SHA256

From: Kevin Ransom
Sent: Monday, May 23, 2016 3:40 PM
To: Mike Lai [email protected]
Cc: Michael Fanning (DEVDIV) [email protected]; Tomas Matousek [email protected]
Subject: Re: F# Compiler (fsc.exe)

Not selectable and MD5

https://github.com/Microsoft/visualfsharp/blob/master/src/absil/ilwritepdb.fs#L126

Kevin
From: Mike Lai [email protected]
Date: Monday, May 23, 2016 at 3:30 PM
To: Kevin Ransom [email protected]
Cc: "Michael Fanning (DEVDIV)" [email protected], Tomas Matousek [email protected]
Subject: RE: F# Compiler (fsc.exe)

Hi Kevin -- It is about the hashes of compiled source files being written by the compiler to the pdb files?

What kind (SHA1 or SHA256) of hashes does the F# Compiler (fsc.exe) put in the pdb files ?

CSC.exe can put either based on the “/checksumalgorithm:” switch. I am wondering if fsc.exe can support the same please?

Thanks

Mike

From: Kevin Ransom
Sent: Monday, May 23, 2016 3:26 PM
To: Mike Lai [email protected]
Cc: Michael Fanning (DEVDIV) [email protected]; Tomas Matousek [email protected]
Subject: Re: F# Compiler (fsc.exe)

Hey Mike,

Can you let me know what this is about?

Thanks

Kevin

From: Mike Lai [email protected]
Date: Monday, May 23, 2016 at 2:10 PM
To: Kevin Ransom [email protected]
Cc: "Michael Fanning (DEVDIV)" [email protected], Tomas Matousek [email protected]
Subject: RE: F# Compiler (fsc.exe)

Thanks Tomas for the introduction! Hi Kevin – please find enclosed the background information on why we are driving this. Please feel free to let me know if you have additional questions.

Thanks
Mike

From: Tomas Matousek
Sent: Monday, May 23, 2016 1:56 PM
To: Kevin Ransom [email protected]
Cc: Michael Fanning (DEVDIV) [email protected]; Mike Lai [email protected]
Subject: RE: F# Compiler (fsc.exe)

Kevin, F# needs “/checksumalgorithm:” command line switch to set the algorithm to calculate document hash saved to PDB.
Mike is driving the effort to get the option to all compilers.

Thanks,
Tomas

@tmat
Copy link
Member

tmat commented Feb 15, 2018

This switch determines the algorithm used to calculate source file checksums stored in PDB.

The corresponding MSBuild task property is ChecksumAlgorithm.

Supported values should include SHA1 and SHA256. See Roslyn for details:

http://source.roslyn.io/#Microsoft.CodeAnalysis.CSharp/CommandLine/CSharpCommandLineParser.cs,286

The default in Roslyn is currently SHA1. We are considering switching to SHA256:

dotnet/roslyn#24820

@tmat
Copy link
Member

tmat commented Feb 15, 2018

@KevinRansom Can we do this work for 15.7?

@KevinRansom
Copy link
Member Author

@tmat I will add it to my list

@KevinRansom KevinRansom self-assigned this Feb 15, 2018
@cartermp cartermp added this to the 16.0 milestone Aug 10, 2018
@cartermp cartermp modified the milestones: 16.0, 16.1 Feb 21, 2019
@cartermp cartermp modified the milestones: 16.1, 16.2 Apr 23, 2019
@cartermp cartermp modified the milestones: 16.2, Backlog Apr 30, 2019
@tmat
Copy link
Member

tmat commented May 28, 2019

The default in Roslyn is currently SHA1. We are considering switching to SHA256.

We did switch Roslyn to SHA256. F# should also default to SHA256.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants