Skip to content

🏗 Debug Compilation Lifecycles via gulp dist --debug#27700

Merged
kristoferbaxter merged 1 commit intoampproject:masterfrom
kristoferbaxter:debug-lifecycles
Apr 10, 2020
Merged

🏗 Debug Compilation Lifecycles via gulp dist --debug#27700
kristoferbaxter merged 1 commit intoampproject:masterfrom
kristoferbaxter:debug-lifecycles

Conversation

@kristoferbaxter
Copy link
Copy Markdown
Contributor

Introduces a new debugger for gulp dist with our evolving compilation pipeline.

Screen Shot 2020-04-10 at 9 14 23 AM

This file is updated with each compilation lifecycle event.

Screen Shot 2020-04-10 at 9 15 29 AM

As a result, when debugging the pipeline you can see per event the operation, filename, and current status of the contents (written to temp).

This allows you to disect problems with the pipeline by looking at individual operations.

`${pad(lifecycle, 20)}: ${pad(
path.basename(fullpath),
30
)} ${tempy.writeSync(content)}\n`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kristoferbaxter still plan on doing temp dir or a static directory instead?

Copy link
Copy Markdown
Contributor Author

@kristoferbaxter kristoferbaxter Apr 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file you tail is static in the dist directory, but the individual lifecycle outputs are in the temp directories.

It's always dist/debug-compilation.log, so you can tail -f ./dist/debug-compilation.log.

Copy link
Copy Markdown
Contributor

@rsimha rsimha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for creating this!


function displayLifecycleDebugging() {
if (argv.debug) {
log(colors.white('Debug Lifecycles: ') + colors.red(logFile));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Print the name of the logfile in cyan to follow the build tooling convention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants