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

remove _toString, always use NAME_KEY #14485

Merged
merged 1 commit into from
Oct 19, 2016
Merged

remove _toString, always use NAME_KEY #14485

merged 1 commit into from
Oct 19, 2016

Conversation

stefanpenner
Copy link
Member

@stefanpenner stefanpenner commented Oct 17, 2016

no longer:

  • have two concepts
  • processAllNamespaces + find NAME_KEY if the name was pre-determined by the container (previously _toString was set, but not NAME_KEY, which made this code assume it must calculate the name again)
  • change shape of this with a constant descriptor of toString
  • have _toString (NAME_KEY is now used)

I noticed ember-data's test suite was spending an unexpected amount of time in processAllNamespaces, which lead me to realize _toString is not consider in classToString, but it really should have been.

@stefanpenner
Copy link
Member Author

@krisselden r?

@stefanpenner stefanpenner force-pushed the name-key branch 4 times, most recently from abdefe5 to d269b8d Compare October 17, 2016 12:27
@@ -1,6 +1,6 @@
import { dictionary, symbol, setOwner, OWNER } from 'ember-utils';
import { ENV } from 'ember-environment';
import { assert, deprecate, runInDebug } from 'ember-metal';
import { assert, deprecate, runInDebug, NAME_KEY } from 'ember-metal';
Copy link
Member

Choose a reason for hiding this comment

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

Can you move NAME_KEY (which I think is just a symbol right?) into the ember-utils package instead? We are ultimately trying to make container package not rely on ember-metal (the assert, deprecate, runInDebug functionality was the only remaining bit).

Copy link
Member Author

Choose a reason for hiding this comment

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

sure

Copy link
Member Author

Choose a reason for hiding this comment

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

i made the change, but something after moving that stuff around has broken things ... need to figure out what

@stefanpenner stefanpenner force-pushed the name-key branch 3 times, most recently from 951beff to b65e1a8 Compare October 17, 2016 20:02
no longer:

* have two concepts
* processAllNamespaces + find NAME_KEY if the name was pre-determined by the container (previously _toString was set, but not NAME_KEY, which made this code assume it must calculate the name again)
* change shape of `this` with a constant descriptor of toString
* have _toString (NAME_KEY is now used)
@rwjblue
Copy link
Member

rwjblue commented Oct 17, 2016

This looks good to me...

@krisselden krisselden merged commit e601285 into master Oct 19, 2016
@stefanpenner stefanpenner deleted the name-key branch October 19, 2016 21:39
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