smanders / externpro

build external projects with cmake
MIT License
13 stars 12 forks source link

dotnet-reportgenerator-globaltool no longer supports .net3.1 #390

Closed camerbam closed 5 months ago

camerbam commented 10 months ago

When we generate coverage, we install a tool in order to generate c sharp coverage (dotnet-reportgenerator-globaltool): https://github.com/smanders/externpro/blob/master/modules/xpfunmac.cmake#L1963 That package just updated three days ago and no longer supports .net3.1... In order for it to work, we need to pass --version 5.1.26 to that command.

Turns out, this was just a ticking time bomb.... I should have thought about locking down that version...

Note: It honestly makes sense to me if this command was part buildpro... If we moved it to buildpro, it would be something like:

RUN dotnet tool install dotnet-reportgenerator-globaltool --version 5.1.26 --global

Then we could remove both of the lines in externpro: https://github.com/smanders/externpro/blob/master/modules/xpfunmac.cmake#L1962-L1963

smanders commented 5 months ago

I believe these are now the lines to remove in externpro, right? https://github.com/externpro/externpro/blob/a492948d46caf7d89ba277ea6d1ff8038d5e0ce7/cmake/xpfunmac.cmake#L2155-L2156

I had to go to a tag, not the master branch https://github.com/smanders/externpro/blob/23.04/modules/xpfunmac.cmake#L1962-L1963

camerbam commented 5 months ago

K, sorry that took so long, but this is what I figured out: We can remove both of those lines. However, we also need to change https://github.com/smanders/externpro/blob/23.04/modules/xpfunmac.cmake#L1968 It should say:

    add_custom_target(postcoveragecsharp
      COMMAND reportgenerator -reports:TestResults/**/coverage.cobertura.xml
        -targetdir:${CMAKE_BINARY_DIR}/coveragecsharp -reporttypes:Html
      WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/coveragecsharp
      )
smanders commented 5 months ago

completed with commits in buildpro and externpro/externpro -- issues referenced above https://github.com/externpro/buildpro/commit/cc5de8d2283e87e91a79d75b80aae7d2d91c2e4c https://github.com/externpro/externpro/commit/440ae37f2915d2aab607024757d3248c1b8ddd7c