GithubHelp home page GithubHelp logo

Comments (7)

nightroman avatar nightroman commented on September 27, 2024 1

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.

nightroman avatar nightroman commented on September 27, 2024 1

When could it be released?

Pretty soon, hopefully today or tomorrow. I am catching up at work after the holiday...

from invoke-build.

nightroman avatar nightroman commented on September 27, 2024 1

v5.10.4

from invoke-build.

nightroman avatar nightroman commented on September 27, 2024

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.

nightroman avatar nightroman commented on September 27, 2024

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.

GreatTeacherBasshead avatar GreatTeacherBasshead commented on September 27, 2024

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.

GreatTeacherBasshead avatar GreatTeacherBasshead commented on September 27, 2024

When could it be released?

from invoke-build.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.