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

[DOC release] updated docs regarding ember debug methods #13272

Merged
merged 1 commit into from
Apr 9, 2016

Conversation

webark
Copy link
Contributor

@webark webark commented Apr 6, 2016

This brings them all in line with #13180

Was brought up during conversation in ember-cli/rfcs#50 (comment)

`Ember.deprecate()` when doing a production build.
(Chrome and Firefox only). Ember build tools will remove any calls
to `Ember.deprecate()` when doing an Ember.js framework production build
and will make the assertion a no-op for an application production build.

Choose a reason for hiding this comment

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

Is make the assertion a copy/paste mistake from the assert jsdoc?

Copy link
Member

Choose a reason for hiding this comment

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

Seems like it should say deprecation. Is that really the app-space behavior for deprecate in prod?

Choose a reason for hiding this comment

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

I think this was to eventually match the behavior to be implemented by ember-cli/rfcs#50. Although it's not clear from the discussion thus far if the impl will remove the calls or noop the impl.

We recently came across this when we removed all custom deprecation handlers and the default Ember console.log implementation started to flood our prod consoles. The docs definitely mislead us in this case.

I took from my slack conversation that this RFC was to land quickly. Which might be the motivation not to updated the docs to match current behavior only to change them back after impl?

Copy link
Member

Choose a reason for hiding this comment

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

We should definitely not add documentation that is incorrect, but would be if/when some other work lands. Right?

@webark
Copy link
Contributor Author

webark commented Apr 8, 2016

Ya, I was simply copying and pasting from what was decided in #13180 and seems like some better wording should be done. The motivation for this PR was two things. First, based off of the current documentation, I thought that Ember.info would behave the same in production, cause it never said elsewise in the documentation. Second, it does seem based off of the wording that it will actually remove the calls, not just turn them into a empty function.

@webark
Copy link
Contributor Author

webark commented Apr 8, 2016

I'll update the wording for them though so that it's a little better then a ✂️ 🍯 (didn't have a brush or glue. figure honey could be used as glue in a pinch)

@webark
Copy link
Contributor Author

webark commented Apr 8, 2016

was just basing which methods where 'no-op'ed from this. https://github.com/emberjs/ember.js/blob/master/packages/ember-metal/lib/debug.js I left out the debug seal cause there was no documentation on that as is.

@mixonic
Copy link
Member

mixonic commented Apr 8, 2016

Seems totally great to move forward with! We should just be sure the docs are accurate 😄

@webark webark force-pushed the updated-debug-docs branch from cfd2821 to 209c426 Compare April 9, 2016 09:28
@webark
Copy link
Contributor Author

webark commented Apr 9, 2016

@mixonic @justinaray Updated to hopefully be more strait forward and less wordy. Once ember-cli/rfcs#50 is complete, the documentation could be updated to reflect the eventual implementation.

`Ember.deprecate()` when doing a production build.
(Chrome and Firefox only).

* In a production build, this method is defined as an empty function (NOP).
Copy link
Member

Choose a reason for hiding this comment

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

Can we note both behaviors?

  • In a production build, this method is defined as an empty function (NOP). Uses of this method in Ember itself are stripped from the ember.prod.js build.

@mixonic
Copy link
Member

mixonic commented Apr 9, 2016

I've noted two spots where we should mention the calls being stripped from production, but you should look to the actual list for confirmation:

Thanks! 👏

@webark webark force-pushed the updated-debug-docs branch from 209c426 to c24c876 Compare April 9, 2016 21:33
@webark
Copy link
Contributor Author

webark commented Apr 9, 2016

@mixonic updated! And no worries! 😄

@mixonic mixonic merged commit 422662d into emberjs:master Apr 9, 2016
@mixonic
Copy link
Member

mixonic commented Apr 9, 2016

Thanks @webark!

@webark webark deleted the updated-debug-docs branch April 10, 2016 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants