-
-
Notifications
You must be signed in to change notification settings - Fork 216
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
feat: granular codegen updates & internal refactoring #1641
Conversation
refactor(recipes): merge assignRules in save refactor(builder): simplify config change logic refactor(postcss): mv Builder to module level so share it between runs so that we don't always have to reload context
🦋 Changeset detectedLatest commit: 091ca1a The changes in this PR will be included in the next version bump. This PR includes changesets to release 20 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
the point is to be able to just update the config and get most of the context working reactively with the new values without much efforts
I initally wanted to inject/update just the engines parts that changed in the current context, I have no doubts it can be done but due to the way it's currently working, the refactor needed for that to happen would be huge and can probably be done in another PR, if needed we would need to find a way to make the config reactive across engines, e.g, change the config once in the context (after a diff has been detected) and it transitively gets updated across every engines (-> could be done with class getters) currently each engines gets created with an option object and we would end up with stale config options everywhere also, a lot of work is done in the constructor or shortly after for most engines (TokenDictionary, Utility, Recipes, Patterns) and was meant to be done only once, we would need to refactor/move that logic to be easily re-usable so for now we get pretty much the same behaviour as before (nuke/rebuild almost everything on config change) but at least we don't rewrite every files and can selectively/incrementally migrate to updating just the diffs in the setConfig method
fix: stale closure with createSheet can't destructure it anymore without losing "this" context chore: revert preact config
Any news on progress on this @segunadebayo ? 😇 |
@olafurns7 No updates yet. I plan to get to it this week. |
Note to self: Once this PR is sorted, we can do two things:
|
📝 Description
Only rewrite files affecteds by a config change, fix config change detection
💣 Is this a breaking change (Yes/No):
no
📝 Additional Information
wip(cli): granular codegen on config change
feat(diffs): granular deletes, split index artifacts
refactor(recipes): merge assignRules in save
refactor(builder): simplify config change logic
refactor(postcss): mv Builder to module level to share it between runs so that we don't always have to reload context
refactor(engines): as es6 class, merge base/context