chocolatey / Chocolatey.Cake.Recipe

A set of convention based Cake scripts for building Chocolatey projects
Apache License 2.0
5 stars 9 forks source link

Dependency graph is incorrect when running `RunDotNet` instead of `Run` #119

Closed gep13 closed 10 months ago

gep13 commented 10 months ago

Checklist

What You Are Seeing?

When running the build.bat for a project that is running Chocolatey.Cake.Recipe, and is making use of the RunDotNet entry point, the tasks for SonarQube are not run at the right time. In addition, tasks that should not be run, are run, for example Build and Restore.

This is due to the fact that the DAG of dependencies is being constructed at runtime, based on whether RunDotNet or Run is called, and as a result, the hard-coded dependencies for the SonarQube tasks are not being altered when they should be.

What is Expected?

The required dependencies should be run, in the correct order, to ensure that all the necessary tasks are completed as part of the build.

How Did You Get This To Happen?

  1. On a project that is using Chocolatey.Cake.Recipe and makes use of RunDotNet run the build.bat file
  2. This will run the build
  3. Assuming that it runs to completion, look at all the Tasks that were run
  4. You will see that the Initialize-SonarQube task runs near the end of the list, when it should be near the top
  5. Also not that it runs the Build and Restore tasks, which should not be run, instead, only the DotNetBuild and DotNetRestore tasks should be run

System Details

Installed Packages

N/A

Output Log

N/A

Additional Context

N/A

choco-bot commented 10 months ago

:tada: This issue has been resolved in version 0.24.1 :tada:

The release is available on:

Your GitReleaseManager bot :package::rocket: