Comments (7)
Implementation at 3536ee7 - needs tests
from undertaker.
@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.
@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.
@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.
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.
@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.
@phated sounds good to me!
from undertaker.
Related Issues (20)
- Undertaker links to protestware - blocks pipelines HOT 1
- Can't get task description and flags because returning wrapped function HOT 7
- Error handling HOT 5
- Tasks composition without gulp HOT 5
- Error run gulp serve HOT 2
- Test fails on Node v6.9.1+ HOT 3
- Consider removing lodash modules
- Series/parallel arguments should not have 0 length
- Add test for array as only argument in series/parallel
- settle not working with es2015 async functions HOT 1
- stack trace is unintelligible since error is not serialized properly HOT 1
- Custom registry must have `get` function HOT 2
- timeResolution -> precision
- Raise node version minbar to 0.12 to eliminate the biggest dependencies HOT 1
- Sharing Functionalities example not working for `serial` and `parallel` tasks. HOT 1
- Build failing with AssertionError: Task function must be specified HOT 2
- TypeError: browserSync is not a function HOT 1
- Remove UNDERTAKER_TIME_RESOLUTION HOT 2
- Update repository scaffold
- Namespace 'Undertaker' has no exported member 'TaskCallback'. HOT 1
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 undertaker.