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

Failing tests for ArrayProxy#length cacheing issue #12218

Closed
wants to merge 1 commit into from

Conversation

bmac
Copy link
Member

@bmac bmac commented Aug 26, 2015

The Ember Data tests are currently failing (issue started on August 24th) with the canary build of ember.

I've tracked in down to an issue with the length property of an ArrayProxy. In Ember beta (2.1) and release (2.0) channels length updates when setting a new content array on the ArrayProxy. However, in the canary channel the length property is not updated until there is some other mutation performed on the ArrayProxy.

When debugging this issue I also noticed it only seems to happen when there is an computed property that depends on the length property. If there is no depended computed property length will return the correct value.

@fivetanley
Copy link
Member

cc @ef4 (just because you were tagged on the PR here #12083)


equal(proxy.get('length'), 3, 'precond - length is 3');

// Trigger computed property that depends on length
Copy link
Member

Choose a reason for hiding this comment

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

trigger -> consume

@bmac bmac force-pushed the failing-array-proxy-length branch from e0c8a6a to 941f245 Compare August 26, 2015 22:22
@bmac
Copy link
Member Author

bmac commented Aug 27, 2015

git bisect suggests the issue was introduce in this commit b799c3b

@rwjblue
Copy link
Member

rwjblue commented Aug 27, 2015

@bmac - Awesome, thank you for bisecting!

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.

4 participants