Add --table-mapping and --strip-helpers CLI options#74
Closed
keithharvey wants to merge 1 commit intorhys-vdw:mainfrom
Closed
Add --table-mapping and --strip-helpers CLI options#74keithharvey wants to merge 1 commit intorhys-vdw:mainfrom
keithharvey wants to merge 1 commit intorhys-vdw:mainfrom
Conversation
keithharvey
added a commit
to keithharvey/RecoilEngine
that referenced
this pull request
Mar 1, 2026
Publishes an EmmyLua type for Spring Synced/Unsynced/Shared. This allows us to create SpringMocks similar to depends on [lua-doc-extractor beyond-all-reason#74](rhys-vdw/lua-doc-extractor#74)
keithharvey
added a commit
to keithharvey/RecoilEngine
that referenced
this pull request
Mar 10, 2026
Publishes an EmmyLua type for Spring Synced/Unsynced/Shared. This allows us to create SpringMocks similar to depends on [lua-doc-extractor beyond-all-reason#74](rhys-vdw/lua-doc-extractor#74)
keithharvey
added a commit
to keithharvey/RecoilEngine
that referenced
this pull request
Mar 11, 2026
Publishes an EmmyLua type for Spring Synced/Unsynced/Shared. This allows us to create SpringMocks similar to depends on [lua-doc-extractor beyond-all-reason#74](rhys-vdw/lua-doc-extractor#74)
--table-mapping "OldName:NewName" remaps the first segment of qualified table names in function, table, field, enum, and global attributes. Useful for generating context-specific types (e.g. Spring -> SpringSynced). --strip-helpers removes standalone helper type definitions (classes, enums, aliases) from the output, keeping only function and table declarations. Prevents duplicate type definitions when generating context-specific outputs alongside per-file outputs. Bump version to 3.4.0.
Collaborator
Author
|
Closing in favor of #77 |
keithharvey
added a commit
to keithharvey/RecoilEngine
that referenced
this pull request
Mar 17, 2026
Publishes an EmmyLua type for Spring Synced/Unsynced/Shared. This allows us to create SpringMocks similar to depends on [lua-doc-extractor beyond-all-reason#74](rhys-vdw/lua-doc-extractor#74)
keithharvey
added a commit
to keithharvey/RecoilEngine
that referenced
this pull request
Mar 17, 2026
Publishes an EmmyLua type for Spring Synced/Unsynced/Shared. This allows us to create SpringMocks similar to depends on [lua-doc-extractor beyond-all-reason#74](rhys-vdw/lua-doc-extractor#74)
keithharvey
added a commit
to keithharvey/RecoilEngine
that referenced
this pull request
Mar 17, 2026
Publishes an EmmyLua type for Spring Synced/Unsynced/Shared. This allows us to create SpringMocks similar to depends on [lua-doc-extractor beyond-all-reason#74](rhys-vdw/lua-doc-extractor#74)
keithharvey
added a commit
to keithharvey/RecoilEngine
that referenced
this pull request
Mar 19, 2026
Publishes an EmmyLua type for Spring Synced/Unsynced/Shared. This allows us to create SpringMocks similar to depends on [lua-doc-extractor beyond-all-reason#74](rhys-vdw/lua-doc-extractor#74)
keithharvey
added a commit
to keithharvey/RecoilEngine
that referenced
this pull request
Mar 20, 2026
Publishes an EmmyLua type for Spring Synced/Unsynced/Shared. This allows us to create SpringMocks similar to depends on [lua-doc-extractor beyond-all-reason#74](rhys-vdw/lua-doc-extractor#74)
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.
Summary
Two new CLI options for generating context-specific type subsets from the same source files:
--table-mapping "OldName:NewName"remaps the first segment of qualified table names in the output (e.g.Spring.GetGameFrame→SpringSynced.GetGameFrame). Can be specified multiple times.--strip-helpersremoves standalone helper type definitions (classes, enums, aliases) from the output, keeping only function and table declarations. Prevents duplicate types when generating context-specific outputs alongside per-file outputs.Motivation
The Recoil engine exposes a single
Springtable in Lua, but different contexts (synced vs unsynced) have access to different subsets of functions. These options allow generatingSpringSyncedandSpringUnsyncedtype libraries from the same C++ sources without duplicating shared helper types that already exist in the per-file output.Enabled Recoil PR
beyond-all-reason/RecoilEngine#2799
Changes
src/tableMapping.ts— newDocProcessorthat remaps table name prefixessrc/stripHelpers.ts— newDocProcessorthat filters out non-function/table docssrc/cli.ts— two new CLI optionssrc/index.ts—processDocsnow acceptsProcessDocsOptionsobject (backward compatible)tableMapping.test.tsandstripHelpers.test.tsLLM Disclosure
Opus 4.6 with a lot of prodding and testing by me.