-
Notifications
You must be signed in to change notification settings - Fork 102
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
Convert LDoc to lua-language-server #1775
base: master
Are you sure you want to change the base?
Convert LDoc to lua-language-server #1775
Conversation
Is there a way to stop CI from running while the PR is in draft? I didn't realize it was going to keep spinning up CI every time I pushed. |
In that case check the other files because sometimes you do Lines 61 to 62 in f9d2bc7
spring/rts/Lua/LuaSyncedRead.cpp Lines 1346 to 1347 in f9d2bc7
|
Sorry it's really going to take a while, I have a full time job. I spent the entire weekend writing the code extractor, and then did a first pass with Happy to receive feedback, but pls focus on the files I've checked off in the folded up "manual conversion checklist" in the PR description. |
Hm, actually you're right. The initial |
9e70eb3
to
aae1c98
Compare
adc2667
to
54b564b
Compare
I've opened a draft PR on BAR repo with my latest generated docs: beyond-all-reason/Beyond-All-Reason#3949 |
d7284c9
to
f22ef88
Compare
Using a set of simple regexp replacements to convert from LDoc compatible lua doc syntax. Script used: https://github.com/rhys-vdw/spring-lua-doc-converter
To contain type definitions shared between the various cpp lua files
And move some more definitions into `Types.lua`
To be replace with github action
dab73e0
to
c2fe27b
Compare
Written by badosu
196d616
to
802c044
Compare
802c044
to
6f071d8
Compare
Goal
Completely convert over to lua-language-server compatible Lua type annotations that can be imported into BAR and other projects that use Recoil.
Plan has been discussed with @badosu. It's going to take a little while.
Steps
LuaConstCMD.cpp
CMD enumLuaConstCMDTYPE.cpp
CMDTYPE enumluarc.json
to springrts/Lua/*.cpp
).Merge steps:
recoil-lua-library
RECOIL_LUA_LIBRARY_GITHUB_TOKEN
in Spring repoPost-merge steps:
Stuff to follow up on
spring/rts/Lua/LuaFBOs.cpp
Lines 412 to 415 in 38598d1
LuaHandle
functions on?spring/rts/Lua/LuaHandle.cpp
Lines 490 to 493 in 38598d1
LuaMenu
☝️GetSolidObjectPieceInfoHelper
returns[x,y,z]
and other things return{ x:, y:, z: }
. Come up with good names for them (currently latter isfloat3
).PieceInfo
class to usefloat3
typergb
inLuaUnsyncedCtrl::SetAtmosphere
, this is an array, but would it also support a table?cmdOpts
— one claims that it can be provided as an array of values, but has different fields — confirm which is true and whether array is supported (and which params are supported in this array)LuaUnsyncedCtrl.cpp
LuaHandle.cpp
cmdSpec
☝️ (this is the same, but has the nestedcmdOpts
so is it the same?LuaUnsyncedCtrl::GiveOrder
— returns1
without pushing return value?GLenum
type name and table name (GL
). Bit confusing as is!@func x
and replace with@param x function
LuaZip.cpp
seems to be completely unused, it has some methods onSpring
andVFS
and others on a table calledZipFileWriter
but they're not referenced anywhere in Recoil in BAR.LuaConstGL.cpp
CLuaHandle::UnitCommand
CLuaHandle::UnitCmdDone
LuaOpenGL.cpp
is mostly undocumented.Manual conversion checklist
LuaBitOps.cpp
LuaConstCMD.cpp
(blocked by enums)LuaConstCMDTYPE.cpp
(blocked by enums)LuaConstCOB.cpp
LuaConstEngine.cpp
LuaConstGL.cpp
LuaConstGame.cpp
LuaConstPlatform.cpp
LuaFBOs.cpp
LuaHandle.cpp
LuaHandleSynced.cpp
LuaMathExtra.cpp
LuaMenu.cpp
LuaMetalMap.cpp
LuaOpenGL.cpp
LuaRBOs.cpp
LuaRules.cpp
LuaShaders.cpp
LuaSyncedCtrl.cpp
LuaSyncedMoveCtrl.cpp
LuaSyncedRead.cpp
LuaUnsyncedCtrl.cpp
LuaUnsyncedRead.cpp
LuaVAO.cpp
LuaVAOImpl.cpp
LuaVBO.cpp
LuaVBOImpl.cpp
LuaVFS.cpp
LuaZip.cpp