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

Migrate off the cached primitives polyfill #406

Open
NullVoxPopuli opened this issue Jun 23, 2023 · 4 comments
Open

Migrate off the cached primitives polyfill #406

NullVoxPopuli opened this issue Jun 23, 2023 · 4 comments

Comments

@NullVoxPopuli
Copy link
Contributor

} from 'ember-tracked-storage-polyfill';

@MichalBryxi
Copy link

I think this could influence #405 (read: should be done before).

What will be the process of removing ember-tracked-storage-polyfill? How would one go about replacing respective methods (TrackedStorage, createStorage, getValue, setValue, ...)? Is there a known pattern that can replace them? Or is it even as simple as just removing the code that calls those altogether?

@NullVoxPopuli
Copy link
Contributor Author

NullVoxPopuli commented Jan 26, 2024

Migrating to the builtins is what needs to happen:

import { 
  createStorage, getValue, setValue 
} from '@glimmer/tracking/primitives/storage';

But i don't know at what minimum ember-source these become available

@MichalBryxi
Copy link

Ah, those are described in this RFC, which was merged here on Feb 12, 2021. But it seems to me that even v5.8.0-apha.1 does not contain @glimmer/tracking/primitives/storage. So I guess your sentence:

But i don't know at what minimum ember-source these become available

Talks about the future and I'd have to wait for said code to land before I can do anything here?

Making sure as the wording is a bit confusing :)

@NullVoxPopuli
Copy link
Contributor Author

looks like you understand the situation 😅

Timing is a bit goofy with storage primitives, because the ideal is that starbeam replaces the need for all this. but we'll see. the packages will still need to exist tho, so it may still be worth PRing an actual implementation -- though, I don't know if that'd help with perf. 😅 (I don't know that it wouldn't either!)

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

No branches or pull requests

2 participants