nuke-build / nuke

🏗 The AKEless Build System for C#/.NET
https://nuke.build
MIT License
2.92k stars 355 forks source link

--skip no longer executes specifically invoked target #1429

Closed EamonHetherton closed 2 hours ago

EamonHetherton commented 2 hours ago

Usage Information

Nuke.Common v8.1

Description

with Nuke.Common v8.0.0 I used to be able to execute a single target and skip all dependencies with the --skip parameter.

I have a small sample build with two targets where "Compile" depends on "Dependency". When run with Nuke.Common v8.0.0 I get this: ./build.cmd Compile --skip ═══════════════════════════════════════ Target             Status      Duration ─────────────────────────────────────── Dependency         Skipped                // Skipped: via parameter Compile            Succeeded     < 1sec ─────────────────────────────────────── Total                            < 1sec ═══════════════════════════════════════

after updating to Nuke.Common v8.1.0, the same command also skips the explicitly invoked target: ./build.cmd Compile --skip ═══════════════════════════════════════ Target             Status      Duration ─────────────────────────────────────── Dependency         Skipped                // Skipped: via parameter Compile            Skipped                // Skipped: via parameter ─────────────────────────────────────── Total                            < 1sec ═══════════════════════════════════════

Reproduction Steps

class Build : NukeBuild
{
    public static int Main() => Execute<Build>(x => x.Compile);

    protected virtual Target Dependency => _ => _
            .Executes(() => { });

    protected virtual Target Compile => _ => _
            .DependsOn(Dependency)
            .Executes(() => { });
}

./build.cmd Compile --skip

Expected Behavior

target "Compile" should execute and "Dependency" should be skipped

Actual Behavior

Both targets are skipped

Regression?

yes

Known Workarounds

No response

Could you help with a pull-request?

No

EamonHetherton commented 2 hours ago

oops... looks like a duplicate of #1415, #1416, I had only searched open tickets.