Comments (2)
Thank you for the response, I see the reasons you decided to avoid implementing it. At the moment we're using a similar approach with one you suggested with Build-Parallel. And what we found that there are many places which are not executed efficiently and the best approach to handle it is building this dependencies graph. What we see is making dependencies run in parallel would make our procedures faster 1.5 times. But I see how this increases tool's complexity significantly and if there's no that much demand this may not worth it. Thank you.
from invoke-build.
I started thinking about this feature from the year one of Invoke-Build, especially on development of Build-Parallel
.
Because it looks somewhat natural, academically interesting, and "can do this" (probably, with some caveats).
Now it's the second decade of Invoke-Build and the feature is still not there :)
And full disclose, I am not planning it until I see frequent and solid use cases.
Reasons (excuses?)
(1) Many tasks are fast, running them all in parallel without thinking may be slower due to inevitable overhead of parallelism.
(2) Many tasks involve file reading and writing, parallel execution of them is not necessarily faster.
(3) Many tasks are formally independent by design and yet cannot be parallel.
Example: a script with by design independent tasks build
, test
.
They are independent because each of them may be invoked on its own.
Maybe not always, e.g. test
cannot be run when nothing is built.
But when it's built one can and often runs just test
(working on tests).
(4) Composing scripts knowing that every task is potentially parallel with who knows what (now or later when tasks are added or changed) is so much harder.
It is not possible to have a natural task build-and-test
composed as build, test
from example (3).
Not to mention constant thinking of shared state, variables, files, resources, etc.
What to do
Understand what tasks really consume build time and can be parallel, then make them parallel manually, e.g. by Build-Parallel
.
Boring? Probably. But in reality this approach may work much better, save time including development, with less problems.
Note that problems in parallel scenarios are not always discoverable right away.
Use cases?
Like I said, if there are frequent and solid use cases... who knows... Do you have some "not too contrived", but ideally real, build script examples that might benefit from this feature?
from invoke-build.
Related Issues (20)
- vscode outline view: no symbols found in document HOT 2
- Different module and package versions HOT 2
- invoke-build discovery fails in powershell container HOT 3
- Please consider adding -Computername and -Session parameter to Task HOT 8
- GitHub action output is not colored
- Color and formatting text in Azure DevOps Pipelines HOT 8
- Use-BuildEnv should make parameters mandatory
- Invoke-BuildExec spitting out service principal secret as current directory HOT 6
- Exec doesn't work well with forward slash arguments HOT 7
- Use `[System.Management.Automation.Cmdlet]::CommonParameters` to get the names of all common parameters HOT 3
- Task condition does not work HOT 8
- Build-Parallel writes only to Output stream HOT 7
- property 'File' cannot be found on this object HOT 17
- Do not wrap internal errors in Resolve-MSBuild
- Fix cryptic errors on unknown parameters
- Invoke-BuildExec should pass the original stderr error to the thrown terminating error HOT 38
- dotnet tool ib run script by default as powershell. Possible to configure? HOT 9
- echo output of exec {} block prints out entire parent object of a parameter when property of an object passed as parameter HOT 3
- Dot-sourcing common build script for multiple subprojects and parameters HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from invoke-build.