Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add broccoli-conditional-debug and begin instrumenting. #407

Merged

Conversation

@rwjblue
Copy link
Member

@rwjblue rwjblue commented May 5, 2017

Adds broccoli-conditional-debug as a dependency and begins instrumenting the styles portions of the build.

Once this lands, we can run a build like:

BROCCOLI_DEBUG=ember-engines:* ember b

And the instrumented trees are copied into ./DEBUG/ subfolder so that you can easily inspect them:

ember-engines:eager-in-eager:engine-style:input
ember-engines:eager-in-eager:styles
ember-engines:eager-in-lazy-in-lazy:engine-style:input
ember-engines:eager-in-lazy-in-lazy:styles
ember-engines:eager-in-lazy:engine-style:input
ember-engines:eager-in-lazy:styles
ember-engines:eager:engine-style:input
ember-engines:eager:styles
ember-engines:lazy-in-eager:engine-style:input
ember-engines:lazy-in-eager:engine-style:output
ember-engines:lazy-in-eager:engine-style:postprocessed
ember-engines:lazy-in-eager:styles
ember-engines:lazy-in-eager:vendor-style:input
ember-engines:lazy-in-eager:vendor-style:pre-import
ember-engines:lazy-in-lazy:engine-style:input
ember-engines:lazy-in-lazy:engine-style:output
ember-engines:lazy-in-lazy:engine-style:postprocessed
ember-engines:lazy-in-lazy:styles
ember-engines:lazy-in-lazy:vendor-style:input
ember-engines:lazy-in-lazy:vendor-style:pre-import
ember-engines:lazy:engine-style:input
ember-engines:lazy:engine-style:output
ember-engines:lazy:engine-style:postprocessed
ember-engines:lazy:styles
ember-engines:lazy:vendor-style:input
ember-engines:lazy:vendor-style:pre-import
ember-engines:tree-invocation-order:engine-style:input
ember-engines:tree-invocation-order:engine-style:output
ember-engines:tree-invocation-order:engine-style:postprocessed
ember-engines:tree-invocation-order:styles
ember-engines:tree-invocation-order:vendor-style:input
ember-engines:tree-invocation-order:vendor-style:pre-import

To only debug a single engine, you could run:

BROCCOLI_DEBUG=ember-engines:<engine name here>:* ember b

Which would output:

ember-engines:lazy-in-lazy:engine-style:input
ember-engines:lazy-in-lazy:engine-style:output
ember-engines:lazy-in-lazy:engine-style:postprocessed
ember-engines:lazy-in-lazy:styles
ember-engines:lazy-in-lazy:vendor-style:input
ember-engines:lazy-in-lazy:vendor-style:pre-import
Copy link
Member

@trentmwillis trentmwillis left a comment

One smallish thing, but overall I like it!

include: ['**/*.css'],
exclude: ['vendor/**/*.*']
});

return new BroccoliDebug(vendorCSSTree, this._debugLabel + ':vendor-style:input');

This comment has been minimized.

@trentmwillis

trentmwillis May 5, 2017
Member

Minor suggestion: Can we create a helper function for constructing these labels? Maybe something like this._debugLabel('vendor-style:input'); and change the current _debugLabel to be _debugLabelPrefix or something?

It's not 100% necessary, but I feel it would be nicer and makes maintainability better in the long run (e.g. if we want to change the format or the labels).

This comment has been minimized.

@rwjblue

rwjblue May 6, 2017
Author Member

Good point! I actually built something into broccoli-conditional-debug for this in https://github.com/rwjblue/broccoli-conditional-debug/pull/1.

@rwjblue rwjblue force-pushed the rwjblue:add-conditional-debuggers branch from 06d23d7 to 432d8bc May 6, 2017
Adds [broccoli-conditional-debug](https://github.com/rwjblue/broccoli-conditional-debug)
as a dependency and begins instrumenting the styles portions of the build.

Once this lands, we can run a build like:

```
BROCCOLI_DEBUG=ember-engines:* ember b
```

And the instrumented trees are copied into `./DEBUG/` subfolder so that you can easily
inspect them.
@rwjblue rwjblue force-pushed the rwjblue:add-conditional-debuggers branch from 432d8bc to 09d5bed May 6, 2017
@rwjblue
Copy link
Member Author

@rwjblue rwjblue commented May 6, 2017

@trentmwillis - Ready for another look when you have time...

@trentmwillis trentmwillis merged commit 739afb6 into ember-engines:master May 6, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.