-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Elimination of global shared state #4573
Comments
While I really want to do this part. I don't quite see how we can without a major version bump to the extension API. |
Lets see. I think we have some ideas, but haven’t tested them about yet. |
Note: Added Red flag trigger words to description
|
Hear hear: elimination of shared global state is the current Team Technical Focus (TTF). |
Should the checkmarks really be checked for PRs that are closed and not merged? |
Closing as the bulk work is now done. Just need to remove as many uses of the 🎉 |
- https://github.com/lensapp/lens/blob/master/packages/core/src/extensions/extension-store.ts - lensapp/lens#6690 ("Make base store non Singleton") - lensapp/lens#4573 ("Elimination of global shared state") The `createInstance()` and `getInstance()` methods had been deprecated in the Lens Extensions API, so they have been eliminated from our code base also. But we're still using "global shared state" Cloud and Sync store instances. It's just that Lens isn't the one creating and holding the instance anymore, we are.
…ase (#1359) - https://github.com/lensapp/lens/blob/master/packages/core/src/extensions/extension-store.ts - lensapp/lens#6690 ("Make base store non Singleton") - lensapp/lens#4573 ("Elimination of global shared state") The `createInstance()` and `getInstance()` methods had been deprecated in the Lens Extensions API, so they have been eliminated from our code base also. But we're still using "global shared state" Cloud and Sync store instances. It's just that Lens isn't the one creating and holding the instance anymore, we are.
This issue is a way to track progress with elimination of global shared state in OpenLens.
Things to consider
Red flag trigger words
On encounter of any of these phrases in codebase, one is likely to be dealing with global shared state.
Singleton -base-class usages
Registries
Most of the registries can be replaced with reactive solutions relatively easily. Think if this is feasible at the same time.
Stores
Other stuff
Exporting already instantiated class
Global search with RegExp:
export const .* = new
Other stuff
The text was updated successfully, but these errors were encountered: