chore(core): drop the unused VOS_VERSION constant from compiled output - #80
Merged
Conversation
Every compiled module opened `initVos` with `const VOS_VERSION = <n>;` and nothing ever read it — not the runtime, not the bridge, not any consumer. Removing the emit also retires the `version` local that existed only to interpolate into it. The config's `version` field is untouched and still load-bearing: it is the discriminator `migrateConfig` reads to upgrade older configs, and a required field on `vosConfigJsonSchema`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every compiled module opened
initVoswithconst VOS_VERSION = <n>;and nothing ever read it — not the runtime, not the bridge, not any consumer. This removes the emit, and with it theversionlocal that existed only to interpolate into it.The config's
versionfield is untouched and stays load-bearing: it is the discriminatormigrateConfigreads to upgrade older configs, and a required field onvosConfigJsonSchema. Only the dead emit goes.Diff
export const initVos = async (container, deps) => { - const VOS_VERSION = ${version}; const { THREE, gsap, resolution } = deps;Verification
pnpm build,pnpm typecheck,pnpm lint,pnpm testall pass repo-wide (150 core tests, unchanged from the baseline onmain; typecheck matters here because dropping the emit would otherwise leaveversionunused).vosandgsap):VOS_VERSIONis absent and the emitted module still parses as valid JS.Compiled output bytes shift by one line for every config, so downstream committed build artifacts want a regenerate on the next engine bump.