-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[BUGFIX canary]: Remove the last Symbols #6428
[BUGFIX canary]: Remove the last Symbols #6428
Conversation
..by IDENTIFIERS WeakMap
External Partner Travis is failing in Azure, but not in Travis. |
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.
The existing work is good however we will want to ensure that the identifier is removed from the WeakMap when removed from the identifiers cache here https://github.com/emberjs/data/blob/master/packages/store/addon/-private/identifiers/cache.ts#L376
(We should do this because although WeakMap's allow for key GC they don't guarantee it)
Ya, if there are for sure places where we know we can remove, we totally should. |
identifier from the WeakMap when it is removed from the identifier cache.
It's added. Also, I've added a naive unit test for
What am I missing? |
Whoo tests are passing. What do you think of the added test @runspired? |
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.
Overall looks good, I'd like to use getOrCreateRecordIdentifier
as we're testing a resource-hash with a constant ID, and add one assertion.
Description
This is an attempt at removing the last
Symbol
s from master. The goal is to fix IE compatibility regarding Symbol support, as detailed in this issue: #6380.It won't have to be backported. Indeed, the Identifier feature has been turned on in #6366 and included in a tag for the first time in
v3.14.0-alpha.2
.Thank you for pointing me to that solution @rwjblue (#6389).
Concerns
With the implementation I've done, I'm concerned by the fact:
StableIdentifier
interfaceisStableIdentifier
signature is modifiedBut as it is still on canary, it might be fine?
Is the
symbol
fix good enough? It has been suggested it could be replaced by the WeakMap fix every timesymbol
is used.Tests
I've run the tests with the command:
yarn test
. Identifier feature flag being turned on, the test seemed to be fine. I'd be happy to add more if needed.