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

Implicit bootstrapping of modules #2833

Closed
gep13 opened this issue Jul 26, 2020 · 12 comments · Fixed by #2849
Closed

Implicit bootstrapping of modules #2833

gep13 opened this issue Jul 26, 2020 · 12 comments · Fixed by #2849
Assignees
Milestone

Comments

@gep13
Copy link
Member

gep13 commented Jul 26, 2020

Currently, when using Cake Modules, if it first necessary to do something like the following:

.\build.ps1 --bootstrap

To force Cake to first check and download any Modules that are included within the Cake Script, and then you run the build as normal:

.\build.ps1

This is a minor change to the default bootstrapper to make this happen, however, it would be very nice, if possible, that Cake implicitly did this check and download for any modules added to the Cake, so that it is a single execution of Cake.

@gep13
Copy link
Member Author

gep13 commented Sep 9, 2020

@cake-build/cake-team switching this to a breaking change, since we are removing the --bootstrap option, from what I can see.

@patriksvensson
Copy link
Member

@gep13 @cake-build/cake-team Not sure if I would call it a breaking change. --bootstrap parameter will not throw or return an error, and bootstrapping will still be performed so scripts will continue to work as expected.

@devlead
Copy link
Member

devlead commented Sep 9, 2020

This isn't a breaking change, just tried to build Cake with cake using 1.0.0-GH-2833-0001 in a clean repo, and it runs

& "$CakeExePath" ./build.cake --bootstrap
if ($LASTEXITCODE -eq 0)
{
    & "$CakeExePath" ./build.cake $args
}
exit $LASTEXITCODE

@gep13
Copy link
Member Author

gep13 commented Sep 9, 2020

@devlead did it run the build twice?

If so, if it isn't a breaking change, then it should be a breaking change.

@devlead
Copy link
Member

devlead commented Sep 9, 2020

@devlead did it run the build twice?

If so, if it isn't a breaking change, then it should be a breaking change.

@gep13 It only ran the build once, so no change in behavior.

@gep13
Copy link
Member Author

gep13 commented Sep 9, 2020

so this:

& "$CakeExePath" ./build.cake --bootstrap

Is a no-op? If the bootstrap option is being removed, how is it doing this? If I misread the PR when I had a brief look at it, I apologise.

@devlead
Copy link
Member

devlead commented Sep 9, 2020

Ah no your correct, but that should be corrected in the PR imho, I'll give that feedback on PR.

@ecampidoglio
Copy link
Member

As a side note, the same would be true for cake-build/cake-action. Existing workflows can still pass the cake-bootstrap parameter and it just wouldn't be passed on to the Cake executable.

@augustoproiete
Copy link
Member

Wouldn't it make sense for --bootstrap to continue to be a known (but hidden) parameter that does a no-op, to avoid existing build pipelines to run the cake build process twice? The same goes for cake-build/cake-action.

& "$CakeExePath" ./build.cake --bootstrap
# Does nothing, displays an info message explaining --bootstrap is no longer needed
# Returns 0 in exit code to let the script to continue
if ($LASTEXITCODE -eq 0)
{
    & "$CakeExePath" ./build.cake $args
}
exit $LASTEXITCODE

@devlead
Copy link
Member

devlead commented Sep 9, 2020

It's not a noop in the current PR or works as previously. So no breaking change there.

Only difference is that it'll also run implicitly without extra step when you execute scripts unless you opt out.

@augustoproiete
Copy link
Member

Only difference is that it'll also run implicitly without extra step when you execute scripts unless you opt out.

Got it. Thanks. So only the bootstrap process would run twice in the scenario above.

@cake-build-bot
Copy link

🎉 This issue has been resolved in version v1.0.0 🎉

The release is available on:

Your GitReleaseManager bot 📦🚀

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.

6 participants