-
Notifications
You must be signed in to change notification settings - Fork 783
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
pdb files are not deterministic #9379
Comments
The |
What happens if you use PathMap in the project file? Perhaps the F# targets just need to get updated to do that by default, since I'm pretty sure they don't
|
I'm not following? |
@clairernovotny, yes, <ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<Deterministic>true</Deterministic>
<DeterministicSourcePaths>true</DeterministicSourcePaths> |
@cartermp, thanks for the <PathMap>C:\Users\cataggar\io\AAD.fs\=/</PathMap>
<PathMap>C:\Users\cataggar\io\AAD.fs\=/</PathMap>
<PathMap>C:\Users\cataggar\io\AAD.fs\*=/</PathMap>
<PathMap>C:\\Users\\cataggar\\io\\AAD.fs\\=/</PathMap>
<PathMap>C:/Users/cataggar/io/AAD.fs/=/</PathMap>
<PathMap>C:\Users\=/</PathMap> And I could see each option being passed to
It just does not have an impact on the produced sourcelink json. |
F# compiler msbuild targets might be missing SourceRoot mapping logic: Besides that we will need F# to implement this feature as well at some point (for next level badge): |
Using the example project, I see the SourceRoot mapping logic which is in this file on my laptop:
Based on that, I hardcoded this: <PathMap>C:\Users\cataggar\.nuget\packages\=/_1/;C:\Users\cataggar\io\AAD.fs\=/_/</PathMap> Which made it to
but no impact on the produced sourcelink json. 😢 |
That's because PathMap is csc parameter. The SourceRoot items themselves need to be updated like so in order to be picked up by Source Link. |
Perhaps we should move these targets down to the msbuild Common targets, so that all languages can benefit from a common path mapping implementaiton. |
@tmat I agree as it's important that this functionality is available everywhere. Do you want to create the work item in Roslyn for it or should I? |
Oh, got it. I see SourceRoot is what Source Link uses. It is just passing |
Last time I tried, I could not debug into source-linked F# DLLs in VS. Getting source linked debugging working is high on my priority list. I searched and there is no open issue for this specifically. |
@clairernovotny The work would be in msbuild Common targets, not in Roslyn. @ctaggart I don't think you should include |
This is possibly a duplicate of #8883, what do you think? Also, is there any chance of the targets getting moved in time for .Net 5/F# 5.0? If not, does F# want to embed the task/targets to enable this before that time? |
Yes, good catch - this should be closed in favor of #8883 I think we should strive to re-use this in F# even if it means a little copypasta. |
The goal Azure/AAD.fs#1 is to enable best practices by enabling Source Link and creating deterministic nuget packages. To have deterministic nuget packages, the assemblies & the pdb files must be deterministic. Following @clairernovotny's instructions, but it is not working for fsharp projects Azure/AAD.fs#3. The MSBuild log shows fsc is being passed
--deterministic+
, but the pdb file looks like:(NuGet Package Explorer is just checking for a source path like
/_/
)It should looks like:
Steps to reproduce:
Windows 10 Version 2004
dotnet --version
3.1.300
This looks like relevant Roslyn code: cc @tmat
https://github.com/dotnet/roslyn/blob/master/src/Compilers/Core/MSBuildTask/MapSourceRoots.cs#L14-L26
The text was updated successfully, but these errors were encountered: