-
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
Chunk version checking #4343
Chunk version checking #4343
Conversation
|
As part of engine v1.55 release I think we should start documenting chunk changes. Once we've decided where and how we can update the log message. (Though I am hesitant at the idea of printing URLs, seems a bit strange...). Perhaps we can add a |
From a quick glance, it doesn't look like all this new functionality is restricted to a debug build. Is that right? |
Yes the validation happens in all builds so that only valid chunks are used. The warning messages only appear in debug build. |
My concern is that this is going to bloat the release build over time as we continue to bump versions. Do we really have to carry around what is essentially a debugging aid in production builds of apps? |
That's a good point. As long as the behaviour of the code with and without validation is the same (for example to always use user chunks, even when not up to date), we can drop the validation in release I think. |
Done. Also corrected chunk versions. |
By not providing version property in chunks, it will lead to warnings? So pretty much every current developer will get a lot of warnings in their code after this update. |
@Maksims user will get warnings for chunks listed in chunk-validation.js, not all chunks. The message is only printed once and I have found them very useful. |
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.
looks good to me.
Followup to #4254.
This PR adds a chunk system runtime compatibility check based on the engine version.
Applications use
StandardMaterial.chunks.APIVersion
to specify which engine version the overridden chunks implement. If any of the overridden chunks have a newer API defined in the engine (or the chunk was removed), a warning is printed to the debug console.This helps app developers know which chunks have changed in their apps and in what version.