-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Introduce new verb between compile and publish / Allow users to add functionality between verbs #4584
Comments
This is what scripts are for. How would this verb work? |
I think the problem needs to be split in 2:
Whatever the implementation decision, in the current CLI model these arbitrary scripts that can do anything should not be invoked from within the execution of built-in CLI verbs (restore, build, compile, run, publish, etc) but should be aggregated in special phases that have the explicit semantics of running user provided functionality. If they are not separated from built-in verbs and contained, CLI would be prone to hard to debug crashes since the happy path of each built-in CLI verb would risk being perturbed by the scripts they invoke during their own execution. This problem is not entirely removed by moving the arbitrary user scripts between built-in verbs, but at least it makes things a bit more sane and debugable. |
I see that issue #4407 discussed problem nr. 2 from my previous post: introducing a generic mechanism which allows users to hook up event listeners (or just script runs) on pre / post dotnet verb execution. This is different from problem 1. for which we need to create a |
Having PreCompile and PostCompile scripts tightly wrapping each actual compiler invocation is problematic for reliable incrementality, so we need to offer something better. Options are a separate "deploy" verb that runs deployment scripts, or a new concept of a PostBuild script that runs after the entire build is done. If the goal of the CLI is to tease apart pieces of functionality that are logically different, then I feel that a "deploy" verb would be the cleanest approach. But it's also confusing to have "deploy" and "publish" --- what's the difference? That would speak for PostBuild or PrePublish script. If we expect these scripts to be or become somewhat involved, then maybe PostBuild would be best, and one day we might enhance the "build" verb to perform the tasks that PostBuild scripts tend to do, but in a way that supports incrementality. If we expect the scripts to always remain shallow, than a PrePublish script might be better. |
The team is actively working on enabling MSBuild and the component affected will be superseded by the new project system, so I am closing this issue. |
Adding ClassLibrary (.NET Core) and Creating new VSIX for ClassLibrary (.NET Standard)
* Update dependencies from https://github.com/microsoft/msbuild build 20200521.1 Microsoft.Build.Localization , Microsoft.Build From Version 16.7.0-preview-20270-03 -> To Version 16.7.0-preview-20271-01 * Update dependencies from https://github.com/microsoft/msbuild build 20200521.2 Microsoft.Build.Localization , Microsoft.Build From Version 16.7.0-preview-20270-03 -> To Version 16.7.0-preview-20271-02 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
There's a set of build functionality which sits somewhere between compile and publish:
place-binaries
scriptsI suggest we introduce a new build verb between compile and publish that covers this responsibility (possible names:
deploy
,post-build
,pre-publish
).A quick scan of issues that will benefit from this:
place-binaries
scripts currently break incremental safety checksThe text was updated successfully, but these errors were encountered: