-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Conversation
`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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
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 |
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) |
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. |
Seems totally great to move forward with! We should just be sure the docs are accurate 😄 |
cfd2821
to
209c426
Compare
@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). |
There was a problem hiding this comment.
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.
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! 👏 |
209c426
to
c24c876
Compare
@mixonic updated! And no worries! 😄 |
Thanks @webark! |
This brings them all in line with #13180
Was brought up during conversation in ember-cli/rfcs#50 (comment)