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

Enable source path mapping for deteministic builds #9874

Merged
merged 6 commits into from Aug 7, 2020

Conversation

baronfel
Copy link
Member

@baronfel baronfel commented Aug 4, 2020

This fixes #8883 by copying/translating the Roslyn build tasks for SourceRoot mapping, along with the test cases they have identified, into FSharp.Build. In addition this sets up the changes to the msbuild targets so that the new task is called at the appropriate point in the compilation so enable deterministic build path mappings.

In an ideal world we'd just be picking up and consuming the shared build task, but until that blessed time we must forge our own paths.

@baronfel
Copy link
Member Author

baronfel commented Aug 4, 2020

I haven't end to end tested compiling some stuff with the task, I wasn't sure if there were integration-style tests that used the targets to prove things like that.

Ideally I'd sourcelink a library with this task, then use the sourcelink tool to dump the file paths and verify the correct deterministic paths are written.

@KevinRansom
Copy link
Member

@baronfel , thanks for this, I'll try to look at this later in the week.

Kevin

@cartermp
Copy link
Contributor

cartermp commented Aug 7, 2020

Thanks @baronfel 😸

@cartermp cartermp merged commit d9e070a into dotnet:master Aug 7, 2020
abelbraaksma pushed a commit to abelbraaksma/fsharp that referenced this pull request Aug 9, 2020
* initial version

* finish porting tests, last test fails

* fix test

* fix end tag

* use cross-framework implementation of endsWithDirectorySeparator

* UsingTask instead of fully-qualified names
nosami pushed a commit to xamarin/visualfsharp that referenced this pull request Feb 23, 2021
* initial version

* finish porting tests, last test fails

* fix test

* fix end tag

* use cross-framework implementation of endsWithDirectorySeparator

* UsingTask instead of fully-qualified names
@baronfel baronfel deleted the mapsourceroots-build-task branch May 28, 2021 03:24
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

Successfully merging this pull request may close these issues.

Non deterministic base dir in stack traces
3 participants