Comments (7)
With another commit pushed to this branch, we also support InformationVariable
and this makes "logging" of information more useful.
We may choose what to use, InformationAction
or InformationVariable
or both
InformationAction
just causes the records to be "printed".InformationVariable
tells where to keep them for the analysis with full meta information preserved.
Build-Parallel @(
@{File='.build.ps1'; Task='Test'; Verbose=$true; InformationAction='Continue'; InformationVariable='InformationVariable'}
)
$InformationVariable | Select-Object Tags, MessageData | Out-String
produces
Start (1/1) C:\ROM\z\_230513_0649-ib212\2\.build.ps1
Build (1/1) C:\ROM\z\_230513_0649-ib212\2\.build.ps1:
VERBOSE: Write-Verbose
Write-Host
Write-Information
Build Test C:\ROM\z\_230513_0649-ib212\2\.build.ps1
Task /Test
Write-Output
Done /Test 00:00:00.0312487
Build succeeded. 1 tasks, 0 errors, 0 warnings 00:00:00.1405902
Build (1/1) C:\ROM\z\_230513_0649-ib212\2\.build.ps1 succeeded.
Tasks: 1 tasks, 0 errors, 0 warnings
Builds succeeded. 1 builds, 0 failed 00:00:00.4062427
Tags MessageData
---- -----------
{PSHOST} Write-Host
{} Write-Information
from invoke-build.
When could it be released?
Pretty soon, hopefully today or tomorrow. I am catching up at work after the holiday...
from invoke-build.
v5.10.4
from invoke-build.
I would say it is expected, by design. Can we improve? Let me think about this, when I am back from my holiday 😁
from invoke-build.
We may partially support some streams like Verbose
and Information
(Host
is included to Information
). As a result, records are not lost, good. But we
cannot write them in the same order as they were written. All we can do is to
propagate record batches to the caller, one after another, e.g. verbose records
first, then information records.
Thus, in a sample similar to yours the call
Build-Parallel @(
@{File='.build.ps1'; Task='Test'; Verbose=$true; InformationAction='Continue'}
)
produces
Start (1/1) C:\ROM\z\_230513_0649-ib212\.build.ps1
Build (1/1) C:\ROM\z\_230513_0649-ib212\.build.ps1:
VERBOSE: Write-Verbose
Write-Host
Write-Information
Build Test C:\ROM\z\_230513_0649-ib212\.build.ps1
Task /Test
Write-Output
Done /Test 00:00:00.0320003
Build succeeded. 1 tasks, 0 errors, 0 warnings 00:00:00.1530057
Build (1/1) C:\ROM\z\_230513_0649-ib212\.build.ps1 succeeded.
Tasks: 1 tasks, 0 errors, 0 warnings
Builds succeeded. 1 builds, 0 failed 00:00:00.3950046
Here is the branch with these changes https://github.com/nightroman/Invoke-Build/tree/work-212.
You may take Build-Parallel.ps1
from it and replace your current for local testing.
from invoke-build.
Hi Roman,
Thanks for the quick reply! I've tested it, and the usage of InformationVariable
looks like a proper place for having those log entries.
from invoke-build.
When could it be released?
from invoke-build.
Related Issues (20)
- vscode outline view: no symbols found in document HOT 2
- Different module and package versions HOT 2
- Parallel execution based on dependency tree 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
- 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.