You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think at the moment the generators just run in order, but there's a minor race condition possible when you have a generator that makes an asset run after the asset listing generator, because the new asset won't be picked up.
Think about how to formulate the generators so that the order is known and good.
The text was updated successfully, but these errors were encountered:
What we currently have is an effective, but dumb set up of code generators - just a list of generators that run in order - that work well but lack sophistication. A high quality problem to be sure. 🙂
What we can't do right now is the sort of feedback loop wanted in #845, or any sort of order guarantees.
To solve that, I propose changing the set up of the generators so that:
All 'resource' generators run first. (Things that make assets)
All code generators run next, but do not actually write out their data, instead they provide metadata that can be completed later and then written.
Config gen, Asset listing happens next (ALWAYS, whether the dev uses it or not), both writing files and producing meta data that can be used by...
Finalised code generators (from step 2), and...
A new BootData generator that uses the metadata to automagically wire up all the basic fonts and assets and so on. (?)
For bonus points, we should have a formal (or way to define) "initial assets / things" set of things that are safe to include in the BootData.
I think at the moment the generators just run in order, but there's a minor race condition possible when you have a generator that makes an asset run after the asset listing generator, because the new asset won't be picked up.
Think about how to formulate the generators so that the order is known and good.
The text was updated successfully, but these errors were encountered: