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

Need to return SourceRoot Items to for referenced projects #43476

Closed
clairernovotny opened this issue Apr 18, 2020 · 4 comments · Fixed by #43706
Closed

Need to return SourceRoot Items to for referenced projects #43476

clairernovotny opened this issue Apr 18, 2020 · 4 comments · Fixed by #43706
Assignees

Comments

@clairernovotny
Copy link
Member

Version Used:
Latest

We need to return the SourceRoot items calculated by InitializeSourceRootMappedPaths so that other tools can access the map outside of the immediate project. No target returns the SourceRoot items today.

This was needed to enable Coverlet, and likely other tools to work. Coverlet had to get the SourceRoot items for each of the projects referenced by a test project.

@tmat and I worked with @MarcoRossignoli to come up with a solution. To work, we need to either add a new target like this:

  <Target Name="GetPathMap"
          DependsOnTargets="InitializeSourceRootMappedPaths"
          Returns="@(_LocalTopLevelSourceRoot)"
          Condition="'$(DeterministicSourcePaths)' == 'true'">
    <ItemGroup>
      <_LocalTopLevelSourceRoot Include="@(SourceRoot)" Condition="'%(SourceRoot.NestedRoot)' == ''"/>
    </ItemGroup>
  </Target>  

Or return the SourceRoot's from InitializeSourceRootMappedPaths directly.

See coverlet-coverage/coverlet#363

@clairernovotny
Copy link
Member Author

Can we get this into 3.1.xxx servicing?

@clairernovotny
Copy link
Member Author

clairernovotny commented May 26, 2020

Ping on servicing? This affects code coverage tools that will need this data.

@tmat
Copy link
Member

tmat commented May 26, 2020

@dsplaisted @jaredpar

@clairernovotny
Copy link
Member Author

Jared answered in the PR, master goes to both 5.0.xxx and 3.1.xxx branches, so the answer is yes.

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

Successfully merging a pull request may close this issue.

2 participants