Git Product home page Git Product logo

Comments (7)

phated avatar phated commented on July 25, 2024

Implementation at 3536ee7 - needs tests

from undertaker.

erikkemperman avatar erikkemperman commented on July 25, 2024

@phated So, the idea is to use the branch property to make decisions about error propagation and log level, have I got that right?

I added the flag to be selective about when to do nodes.push in set-task.js -- before it'd always do that if metadata already existed for the fn at hand, the assumption apparently being that this would only happen for series/parallel constructions, which was no longer true with aliases.

I don't see how it would functionally wrong to have tasks "inherit" this property from their function (although I might not call it that)... But I didn't have a lot of time playing around with it.

With the gulp-cli branch branches-debug-log, which I assume is the intended corresponding change to passing the branch flag along in createExtensions, the output hides too much in my opinion. In stead of just suppressing <series> and <parallel> lines it also suppresses the parent task.

Maybe it's just me but if I run gulp foo I expect to see Starting foo and Finished foo in the output, without having to do -LLLL. So I guess that might be an argument against inheriting the branch property in this way.

I'm not too familiar with error propagation, but wouldn't it be pretty easy to just mark an error as having been logged, and not printing it again in that case? That way you could separate error propagation from error logging.

from undertaker.

phated avatar phated commented on July 25, 2024

@erikkemperman Yeah, I agree that running gulp foo should show "Starting foo" and "Finished foo" but if the branch flag doesn't transfer to the named task, some error logging doesn't get hidden (errors from series/parallel are hidden) with this change. Maybe that's okay. I don't know of a good way to handle the error propagation

from undertaker.

erikkemperman avatar erikkemperman commented on July 25, 2024

@phated Not at a computer atm, but just a thought: maybe pass along meta.tree.type as well? I.e., the combination of branch and type might allow you to print or suppress in the appropriate circumstances?

from undertaker.

erikkemperman avatar erikkemperman commented on July 25, 2024

Or, now looking at your gulp-cli change, maybe only use the branch property for logging errors, leaving the start/finish stuff same as before..

from undertaker.

phated avatar phated commented on July 25, 2024

@erikkemperman I'm going to close this. I've come up with a better way to handle the error propagation and I'm only going to filter the <series> and <parallel> logging based on the branch flag.

from undertaker.

erikkemperman avatar erikkemperman commented on July 25, 2024

@phated sounds good to me!

from undertaker.

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.